Message ID | 20240605074936.578687-4-prabhakar.mahadev-lad.rj@bp.renesas.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | Add SD/MMC support for Renesas RZ/V2H(P) SoC | expand |
On Wed, Jun 05, 2024 at 08:49:35AM +0100, Prabhakar wrote: > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > The SD/MMC block on the RZ/V2H(P) ("R9A09G057") SoC is similar to that > of the R-Car Gen3, but it has some differences: > - HS400 is not supported. > - It supports the SD_IOVS bit to control the IO voltage level. > - It supports fixed address mode. > > To accommodate these differences, a SoC-specific 'renesas,sdhi-r9a09g057' > compatible string is added. > > A "vqmmc-r9a09g057-regulator" regulator object is added to handle the > voltage level switch of the SD/MMC pins. > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > .../devicetree/bindings/mmc/renesas,sdhi.yaml | 20 ++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > index 3d0e61e59856..154f5767cf03 100644 > --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > @@ -18,6 +18,7 @@ properties: > - renesas,sdhi-r7s9210 # SH-Mobile AG5 > - renesas,sdhi-r8a73a4 # R-Mobile APE6 > - renesas,sdhi-r8a7740 # R-Mobile A1 > + - renesas,sdhi-r9a09g057 # RZ/V2H(P) > - renesas,sdhi-sh73a0 # R-Mobile APE6 > - items: > - enum: > @@ -118,7 +119,9 @@ allOf: > properties: > compatible: > contains: > - const: renesas,rzg2l-sdhi > + enum: > + - renesas,sdhi-r9a09g057 > + - renesas,rzg2l-sdhi > then: > properties: > clocks: > @@ -204,6 +207,21 @@ allOf: > sectioned off to be run by a separate second clock source to allow > the main core clock to be turned off to save power. > > + - if: > + properties: > + compatible: > + contains: > + const: renesas,sdhi-r9a09g057 > + then: > + properties: > + vqmmc-r9a09g057-regulator: The node is already conditional on the compatible, so why the chip name? Then it doesn't work when the 2nd chip needs this. > + type: object > + description: VQMMC SD regulator > + $ref: /schemas/regulator/regulator.yaml# > + unevaluatedProperties: false > + required: > + - vqmmc-r9a09g057-regulator > + > required: > - compatible > - reg > -- > 2.34.1 >
Hi Rob, Thank you for the review. On Thu, Jun 6, 2024 at 1:26 AM Rob Herring <robh@kernel.org> wrote: > > On Wed, Jun 05, 2024 at 08:49:35AM +0100, Prabhakar wrote: > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > The SD/MMC block on the RZ/V2H(P) ("R9A09G057") SoC is similar to that > > of the R-Car Gen3, but it has some differences: > > - HS400 is not supported. > > - It supports the SD_IOVS bit to control the IO voltage level. > > - It supports fixed address mode. > > > > To accommodate these differences, a SoC-specific 'renesas,sdhi-r9a09g057' > > compatible string is added. > > > > A "vqmmc-r9a09g057-regulator" regulator object is added to handle the > > voltage level switch of the SD/MMC pins. > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > --- > > .../devicetree/bindings/mmc/renesas,sdhi.yaml | 20 ++++++++++++++++++- > > 1 file changed, 19 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > > index 3d0e61e59856..154f5767cf03 100644 > > --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > > +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > > @@ -18,6 +18,7 @@ properties: > > - renesas,sdhi-r7s9210 # SH-Mobile AG5 > > - renesas,sdhi-r8a73a4 # R-Mobile APE6 > > - renesas,sdhi-r8a7740 # R-Mobile A1 > > + - renesas,sdhi-r9a09g057 # RZ/V2H(P) > > - renesas,sdhi-sh73a0 # R-Mobile APE6 > > - items: > > - enum: > > @@ -118,7 +119,9 @@ allOf: > > properties: > > compatible: > > contains: > > - const: renesas,rzg2l-sdhi > > + enum: > > + - renesas,sdhi-r9a09g057 > > + - renesas,rzg2l-sdhi > > then: > > properties: > > clocks: > > @@ -204,6 +207,21 @@ allOf: > > sectioned off to be run by a separate second clock source to allow > > the main core clock to be turned off to save power. > > > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: renesas,sdhi-r9a09g057 > > + then: > > + properties: > > + vqmmc-r9a09g057-regulator: > > The node is already conditional on the compatible, so why the chip name? > Then it doesn't work when the 2nd chip needs this. > Are you suggesting to use a generic name "vqmmc-regulator"? Currently depending on the compat value "vqmmc-r9a09g057-regulator" in the driver the corresponding OF data is populated. In future if a different chip needs a regulator which varies slightly to the r9a09g057 chip this will have to have a different OF data. Hence I added the chip name in the regulator. Cheers, Prabhakar
On Thu, Jun 6, 2024 at 3:12 AM Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote: > > Hi Rob, > > Thank you for the review. > > On Thu, Jun 6, 2024 at 1:26 AM Rob Herring <robh@kernel.org> wrote: > > > > On Wed, Jun 05, 2024 at 08:49:35AM +0100, Prabhakar wrote: > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > The SD/MMC block on the RZ/V2H(P) ("R9A09G057") SoC is similar to that > > > of the R-Car Gen3, but it has some differences: > > > - HS400 is not supported. > > > - It supports the SD_IOVS bit to control the IO voltage level. > > > - It supports fixed address mode. > > > > > > To accommodate these differences, a SoC-specific 'renesas,sdhi-r9a09g057' > > > compatible string is added. > > > > > > A "vqmmc-r9a09g057-regulator" regulator object is added to handle the > > > voltage level switch of the SD/MMC pins. > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > --- > > > .../devicetree/bindings/mmc/renesas,sdhi.yaml | 20 ++++++++++++++++++- > > > 1 file changed, 19 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > > > index 3d0e61e59856..154f5767cf03 100644 > > > --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > > > +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml > > > @@ -18,6 +18,7 @@ properties: > > > - renesas,sdhi-r7s9210 # SH-Mobile AG5 > > > - renesas,sdhi-r8a73a4 # R-Mobile APE6 > > > - renesas,sdhi-r8a7740 # R-Mobile A1 > > > + - renesas,sdhi-r9a09g057 # RZ/V2H(P) > > > - renesas,sdhi-sh73a0 # R-Mobile APE6 > > > - items: > > > - enum: > > > @@ -118,7 +119,9 @@ allOf: > > > properties: > > > compatible: > > > contains: > > > - const: renesas,rzg2l-sdhi > > > + enum: > > > + - renesas,sdhi-r9a09g057 > > > + - renesas,rzg2l-sdhi > > > then: > > > properties: > > > clocks: > > > @@ -204,6 +207,21 @@ allOf: > > > sectioned off to be run by a separate second clock source to allow > > > the main core clock to be turned off to save power. > > > > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + const: renesas,sdhi-r9a09g057 > > > + then: > > > + properties: > > > + vqmmc-r9a09g057-regulator: > > > > The node is already conditional on the compatible, so why the chip name? > > Then it doesn't work when the 2nd chip needs this. > > > Are you suggesting to use a generic name "vqmmc-regulator"? Yes, but "regulator-vqmmc" or just "regulator". > > Currently depending on the compat value "vqmmc-r9a09g057-regulator" in > the driver the corresponding OF data is populated. In future if a > different chip needs a regulator which varies slightly to the > r9a09g057 chip this will have to have a different OF data. Hence I > added the chip name in the regulator. Yes, compatible values distinguish different chips, not node names. Rob
diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml index 3d0e61e59856..154f5767cf03 100644 --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml @@ -18,6 +18,7 @@ properties: - renesas,sdhi-r7s9210 # SH-Mobile AG5 - renesas,sdhi-r8a73a4 # R-Mobile APE6 - renesas,sdhi-r8a7740 # R-Mobile A1 + - renesas,sdhi-r9a09g057 # RZ/V2H(P) - renesas,sdhi-sh73a0 # R-Mobile APE6 - items: - enum: @@ -118,7 +119,9 @@ allOf: properties: compatible: contains: - const: renesas,rzg2l-sdhi + enum: + - renesas,sdhi-r9a09g057 + - renesas,rzg2l-sdhi then: properties: clocks: @@ -204,6 +207,21 @@ allOf: sectioned off to be run by a separate second clock source to allow the main core clock to be turned off to save power. + - if: + properties: + compatible: + contains: + const: renesas,sdhi-r9a09g057 + then: + properties: + vqmmc-r9a09g057-regulator: + type: object + description: VQMMC SD regulator + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + required: + - vqmmc-r9a09g057-regulator + required: - compatible - reg