2024-04-22 21:31:02

by Prabhakar

[permalink] [raw]
Subject: [PATCH 0/6] Update compat strings for SD/MMC nodes on RZ/{G2L (family), G3S, V2M} SoCs

From: Lad Prabhakar <[email protected]>

Hi All,

- RZ/G2UL and RZ/Five ("r9a07g043")
- RZ/G2L(C) ("r9a07g044")
- RZ/V2L ("r9a07g054")
- RZ/G3S ("r9a08g045")
- RZ/V2M ("r9a09g011")

The SD/MMC Interface in the above listed SoCs is not identical to that of
R-Car Gen3. These SoCs have HS400 disabled and use fixed address mode.
Therefore, we need to apply fixed_addr_mode and hs400_disabled quirks.
'renesas,rzg2l-sdhi' is introduced as a generic compatible string for the
above SoCs where fixed_addr_mode and hs400_disabled quirks will be applied.

Cheers,
Prabhakar

Lad Prabhakar (6):
dt-bindings: mmc: renesas,sdhi: Drop 'items' keyword
dt-bindings: mmc: renesas,sdhi: Document RZ/G2L family compatibility
mmc: renesas_sdhi: Add compatible string for RZ/G2L family, RZ/G3S,
and RZ/V2M SoCs
arm64: dts: renesas: r9a09g011: Update fallback string for SDHI nodes
arm64: dts: renesas: rzg2l-family: Update fallback string for SDHI
nodes
arm64: dts: renesas: r9a08g045: Update fallback string for SDHI nodes

.../devicetree/bindings/mmc/renesas,sdhi.yaml | 38 ++++++++-----------
arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 4 +-
arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 4 +-
arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 4 +-
arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 6 +--
arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 6 +--
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 8 ++--
7 files changed, 31 insertions(+), 39 deletions(-)

--
2.34.1



2024-04-22 21:31:11

by Prabhakar

[permalink] [raw]
Subject: [PATCH 1/6] dt-bindings: mmc: renesas,sdhi: Drop 'items' keyword

From: Lad Prabhakar <[email protected]>

Drop 'items' keyword from compatible list which have single const value.

Signed-off-by: Lad Prabhakar <[email protected]>
---
.../devicetree/bindings/mmc/renesas,sdhi.yaml | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
index 29f2400247eb..90c8b1b727a8 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
+++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
@@ -12,16 +12,11 @@ maintainers:
properties:
compatible:
oneOf:
- - items:
- - const: renesas,sdhi-sh73a0 # R-Mobile APE6
- - items:
- - const: renesas,sdhi-r7s72100 # RZ/A1H
- - items:
- - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
- - items:
- - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
- - items:
- - const: renesas,sdhi-r8a7740 # R-Mobile A1
+ - const: renesas,sdhi-sh73a0 # R-Mobile APE6
+ - const: renesas,sdhi-r7s72100 # RZ/A1H
+ - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
+ - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
+ - const: renesas,sdhi-r8a7740 # R-Mobile A1
- items:
- enum:
- renesas,sdhi-r8a7778 # R-Car M1
@@ -40,8 +35,7 @@ properties:
- renesas,sdhi-r8a7793 # R-Car M2-N
- renesas,sdhi-r8a7794 # R-Car E2
- const: renesas,rcar-gen2-sdhi # R-Car Gen2 and RZ/G1
- - items:
- - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
+ - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
- items:
- enum:
- renesas,sdhi-r8a774a1 # RZ/G2M
--
2.34.1


2024-04-22 21:31:28

by Prabhakar

[permalink] [raw]
Subject: [PATCH 2/6] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L family compatibility

From: Lad Prabhakar <[email protected]>

- RZ/G2UL and RZ/Five ("r9a07g043")
- RZ/G2L(C) ("r9a07g044")
- RZ/V2L ("r9a07g054")
- RZ/G3S ("r9a08g045")
- RZ/V2M ("r9a09g011")

The SD/MMC Interface in the above listed SoCs is not identical to that of
R-Car Gen3. These SoCs have HS400 disabled and use fixed address mode.
Therefore, we need to apply fixed_addr_mode and hs400_disabled quirks.

Document 'renesas,rzg2l-sdhi' as a generic compatible string for the
above SoCs.

Also now use the 'renesas,rzg2l-sdhi' string in the if check for making
sure the required clocks are present.

Signed-off-by: Lad Prabhakar <[email protected]>
---
.../devicetree/bindings/mmc/renesas,sdhi.yaml | 20 +++++++++----------
1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
index 90c8b1b727a8..bbfac046a3a8 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
+++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
@@ -50,11 +50,6 @@ properties:
- renesas,sdhi-r8a77980 # R-Car V3H
- renesas,sdhi-r8a77990 # R-Car E3
- renesas,sdhi-r8a77995 # R-Car D3
- - renesas,sdhi-r9a07g043 # RZ/G2UL and RZ/Five
- - renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
- - renesas,sdhi-r9a07g054 # RZ/V2L
- - renesas,sdhi-r9a08g045 # RZ/G3S
- - renesas,sdhi-r9a09g011 # RZ/V2M
- const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2
- items:
- enum:
@@ -63,6 +58,14 @@ properties:
- renesas,sdhi-r8a779g0 # R-Car V4H
- renesas,sdhi-r8a779h0 # R-Car V4M
- const: renesas,rcar-gen4-sdhi # R-Car Gen4
+ - items:
+ - enum:
+ - renesas,sdhi-r9a07g043 # RZ/G2UL and RZ/Five
+ - renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
+ - renesas,sdhi-r9a07g054 # RZ/V2L
+ - renesas,sdhi-r9a08g045 # RZ/G3S
+ - renesas,sdhi-r9a09g011 # RZ/V2M
+ - const: renesas,rzg2l-sdhi

reg:
maxItems: 1
@@ -114,12 +117,7 @@ allOf:
properties:
compatible:
contains:
- enum:
- - renesas,sdhi-r9a07g043
- - renesas,sdhi-r9a07g044
- - renesas,sdhi-r9a07g054
- - renesas,sdhi-r9a08g045
- - renesas,sdhi-r9a09g011
+ const: renesas,rzg2l-sdhi
then:
properties:
clocks:
--
2.34.1


2024-04-22 21:31:45

by Prabhakar

[permalink] [raw]
Subject: [PATCH 3/6] mmc: renesas_sdhi: Add compatible string for RZ/G2L family, RZ/G3S, and RZ/V2M SoCs

From: Lad Prabhakar <[email protected]>

- RZ/G2UL and RZ/Five ("r9a07g043")
- RZ/G2L(C) ("r9a07g044")
- RZ/V2L ("r9a07g054")
- RZ/G3S ("r9a08g045")
- RZ/V2M ("r9a09g011")

The above SoCs have HS400 disabled and use fixed address mode. Add a
generic compatible 'renesas,rzg2l-sdhi' fallback string for these SoCs,
where fixed_addr_mode and hs400_disabled quirks are applied.

Note, 'renesas,sdhi-r9a09g011' is dropped as we will be using
'renesas,rzg2l-sdhi' as a fallback string for RZ/V2M SoC.

Signed-off-by: Lad Prabhakar <[email protected]>
---
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 53d34c3eddce..1828c37e0198 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -210,7 +210,7 @@ static const struct renesas_sdhi_quirks sdhi_quirks_r8a77990 = {
.manual_tap_correction = true,
};

-static const struct renesas_sdhi_quirks sdhi_quirks_r9a09g011 = {
+static const struct renesas_sdhi_quirks sdhi_quirks_rzg2l = {
.fixed_addr_mode = true,
.hs400_disabled = true,
};
@@ -255,9 +255,9 @@ static const struct renesas_sdhi_of_data_with_quirks of_r8a77990_compatible = {
.quirks = &sdhi_quirks_r8a77990,
};

-static const struct renesas_sdhi_of_data_with_quirks of_r9a09g011_compatible = {
+static const struct renesas_sdhi_of_data_with_quirks of_rzg2l_compatible = {
.of_data = &of_data_rcar_gen3,
- .quirks = &sdhi_quirks_r9a09g011,
+ .quirks = &sdhi_quirks_rzg2l,
};

static const struct renesas_sdhi_of_data_with_quirks of_rcar_gen3_compatible = {
@@ -283,7 +283,7 @@ static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = {
{ .compatible = "renesas,sdhi-r8a77970", .data = &of_r8a77970_compatible, },
{ .compatible = "renesas,sdhi-r8a77990", .data = &of_r8a77990_compatible, },
{ .compatible = "renesas,sdhi-r8a77995", .data = &of_rcar_gen3_nohs400_compatible, },
- { .compatible = "renesas,sdhi-r9a09g011", .data = &of_r9a09g011_compatible, },
+ { .compatible = "renesas,rzg2l-sdhi", .data = &of_rzg2l_compatible, },
{ .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, },
{ .compatible = "renesas,rcar-gen4-sdhi", .data = &of_rcar_gen3_compatible, },
{},
--
2.34.1


2024-04-22 21:32:28

by Prabhakar

[permalink] [raw]
Subject: [PATCH 4/6] arm64: dts: renesas: r9a09g011: Update fallback string for SDHI nodes

From: Lad Prabhakar <[email protected]>

Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where
hs400_disabled and fixed_addr_mode quirks are applied.

Signed-off-by: Lad Prabhakar <[email protected]>
---
arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
index 50ed66d42a24..e008236c3d2d 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
@@ -71,7 +71,7 @@ gic: interrupt-controller@82010000 {

sdhi0: mmc@85000000 {
compatible = "renesas,sdhi-r9a09g011",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x85000000 0 0x2000>;
interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
@@ -87,7 +87,7 @@ sdhi0: mmc@85000000 {

sdhi1: mmc@85010000 {
compatible = "renesas,sdhi-r9a09g011",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x85010000 0 0x2000>;
interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>;
@@ -103,7 +103,7 @@ sdhi1: mmc@85010000 {

emmc: mmc@85020000 {
compatible = "renesas,sdhi-r9a09g011",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x85020000 0 0x2000>;
interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
--
2.34.1


2024-04-22 21:32:55

by Prabhakar

[permalink] [raw]
Subject: [PATCH 5/6] arm64: dts: renesas: rzg2l-family: Update fallback string for SDHI nodes

From: Lad Prabhakar <[email protected]>

Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where
hs400_disabled and fixed_addr_mode quirks are applied.

Signed-off-by: Lad Prabhakar <[email protected]>
---
arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 4 ++--
arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 4 ++--
arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
index 6212ee550f33..2eccab9c8962 100644
--- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
@@ -646,7 +646,7 @@ dmac: dma-controller@11820000 {

sdhi0: mmc@11c00000 {
compatible = "renesas,sdhi-r9a07g043",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x11c00000 0 0x10000>;
interrupts = <SOC_PERIPHERAL_IRQ(104) IRQ_TYPE_LEVEL_HIGH>,
<SOC_PERIPHERAL_IRQ(105) IRQ_TYPE_LEVEL_HIGH>;
@@ -662,7 +662,7 @@ sdhi0: mmc@11c00000 {

sdhi1: mmc@11c10000 {
compatible = "renesas,sdhi-r9a07g043",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x11c10000 0 0x10000>;
interrupts = <SOC_PERIPHERAL_IRQ(106) IRQ_TYPE_LEVEL_HIGH>,
<SOC_PERIPHERAL_IRQ(107) IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/renesas/r9a07g044.dtsi b/arch/arm64/boot/dts/renesas/r9a07g044.dtsi
index 88634ae43287..c07ddd8124e6 100644
--- a/arch/arm64/boot/dts/renesas/r9a07g044.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a07g044.dtsi
@@ -1050,7 +1050,7 @@ gic: interrupt-controller@11900000 {

sdhi0: mmc@11c00000 {
compatible = "renesas,sdhi-r9a07g044",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x11c00000 0 0x10000>;
interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
@@ -1066,7 +1066,7 @@ sdhi0: mmc@11c00000 {

sdhi1: mmc@11c10000 {
compatible = "renesas,sdhi-r9a07g044",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x11c10000 0 0x10000>;
interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/renesas/r9a07g054.dtsi b/arch/arm64/boot/dts/renesas/r9a07g054.dtsi
index e89bfe4085f5..8448afa8be54 100644
--- a/arch/arm64/boot/dts/renesas/r9a07g054.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a07g054.dtsi
@@ -1058,7 +1058,7 @@ gic: interrupt-controller@11900000 {

sdhi0: mmc@11c00000 {
compatible = "renesas,sdhi-r9a07g054",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x11c00000 0 0x10000>;
interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
@@ -1074,7 +1074,7 @@ sdhi0: mmc@11c00000 {

sdhi1: mmc@11c10000 {
compatible = "renesas,sdhi-r9a07g054",
- "renesas,rcar-gen3-sdhi";
+ "renesas,rzg2l-sdhi";
reg = <0x0 0x11c10000 0 0x10000>;
interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
--
2.34.1


2024-04-22 21:33:05

by Prabhakar

[permalink] [raw]
Subject: [PATCH 6/6] arm64: dts: renesas: r9a08g045: Update fallback string for SDHI nodes

From: Lad Prabhakar <[email protected]>

Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where
hs400_disabled and fixed_addr_mode quirks are applied.

Signed-off-by: Lad Prabhakar <[email protected]>
---
arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
index f5f3f4f4c8d6..2162c247d6de 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
@@ -182,7 +182,7 @@ irqc: interrupt-controller@11050000 {
};

sdhi0: mmc@11c00000 {
- compatible = "renesas,sdhi-r9a08g045", "renesas,rcar-gen3-sdhi";
+ compatible = "renesas,sdhi-r9a08g045", "renesas,rzg2l-sdhi";
reg = <0x0 0x11c00000 0 0x10000>;
interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
@@ -197,7 +197,7 @@ sdhi0: mmc@11c00000 {
};

sdhi1: mmc@11c10000 {
- compatible = "renesas,sdhi-r9a08g045", "renesas,rcar-gen3-sdhi";
+ compatible = "renesas,sdhi-r9a08g045", "renesas,rzg2l-sdhi";
reg = <0x0 0x11c10000 0 0x10000>;
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
@@ -212,7 +212,7 @@ sdhi1: mmc@11c10000 {
};

sdhi2: mmc@11c20000 {
- compatible = "renesas,sdhi-r9a08g045", "renesas,rcar-gen3-sdhi";
+ compatible = "renesas,sdhi-r9a08g045", "renesas,rzg2l-sdhi";
reg = <0x0 0x11c20000 0 0x10000>;
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
--
2.34.1


2024-04-23 06:29:33

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/6] dt-bindings: mmc: renesas,sdhi: Drop 'items' keyword

On 22/04/2024 23:30, Prabhakar wrote:
> From: Lad Prabhakar <[email protected]>
>
> Drop 'items' keyword from compatible list which have single const value.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> ---
> .../devicetree/bindings/mmc/renesas,sdhi.yaml | 18 ++++++------------
> 1 file changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> index 29f2400247eb..90c8b1b727a8 100644
> --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> @@ -12,16 +12,11 @@ maintainers:
> properties:
> compatible:
> oneOf:
> - - items:
> - - const: renesas,sdhi-sh73a0 # R-Mobile APE6
> - - items:
> - - const: renesas,sdhi-r7s72100 # RZ/A1H
> - - items:
> - - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
> - - items:
> - - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
> - - items:
> - - const: renesas,sdhi-r8a7740 # R-Mobile A1
> + - const: renesas,sdhi-sh73a0 # R-Mobile APE6
> + - const: renesas,sdhi-r7s72100 # RZ/A1H
> + - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
> + - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
> + - const: renesas,sdhi-r8a7740 # R-Mobile A1

That's just an enum.

> - items:
> - enum:
> - renesas,sdhi-r8a7778 # R-Car M1
> @@ -40,8 +35,7 @@ properties:
> - renesas,sdhi-r8a7793 # R-Car M2-N
> - renesas,sdhi-r8a7794 # R-Car E2
> - const: renesas,rcar-gen2-sdhi # R-Car Gen2 and RZ/G1
> - - items:
> - - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
> + - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)

This as well



Best regards,
Krzysztof


2024-04-23 06:30:12

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/6] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L family compatibility

On 22/04/2024 23:30, Prabhakar wrote:
> From: Lad Prabhakar <[email protected]>
>
> - RZ/G2UL and RZ/Five ("r9a07g043")
> - RZ/G2L(C) ("r9a07g044")
> - RZ/V2L ("r9a07g054")
> - RZ/G3S ("r9a08g045")
> - RZ/V2M ("r9a09g011")

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-04-23 06:53:53

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 3/6] mmc: renesas_sdhi: Add compatible string for RZ/G2L family, RZ/G3S, and RZ/V2M SoCs

Hi Prabhakar,

On Mon, Apr 22, 2024 at 11:30 PM Prabhakar <[email protected]> wrote:
> From: Lad Prabhakar <[email protected]>
>
> - RZ/G2UL and RZ/Five ("r9a07g043")
> - RZ/G2L(C) ("r9a07g044")
> - RZ/V2L ("r9a07g054")
> - RZ/G3S ("r9a08g045")
> - RZ/V2M ("r9a09g011")
>
> The above SoCs have HS400 disabled and use fixed address mode. Add a
> generic compatible 'renesas,rzg2l-sdhi' fallback string for these SoCs,
> where fixed_addr_mode and hs400_disabled quirks are applied.

Thanks for your patch!
>
> Note, 'renesas,sdhi-r9a09g011' is dropped as we will be using
> 'renesas,rzg2l-sdhi' as a fallback string for RZ/V2M SoC.

Doesn't that break backwards compatibility with existing DTBs?

> Signed-off-by: Lad Prabhakar <[email protected]>
> ---
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> index 53d34c3eddce..1828c37e0198 100644
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -210,7 +210,7 @@ static const struct renesas_sdhi_quirks sdhi_quirks_r8a77990 = {
> .manual_tap_correction = true,
> };
>
> -static const struct renesas_sdhi_quirks sdhi_quirks_r9a09g011 = {
> +static const struct renesas_sdhi_quirks sdhi_quirks_rzg2l = {
> .fixed_addr_mode = true,
> .hs400_disabled = true,
> };
> @@ -255,9 +255,9 @@ static const struct renesas_sdhi_of_data_with_quirks of_r8a77990_compatible = {
> .quirks = &sdhi_quirks_r8a77990,
> };
>
> -static const struct renesas_sdhi_of_data_with_quirks of_r9a09g011_compatible = {
> +static const struct renesas_sdhi_of_data_with_quirks of_rzg2l_compatible = {
> .of_data = &of_data_rcar_gen3,
> - .quirks = &sdhi_quirks_r9a09g011,
> + .quirks = &sdhi_quirks_rzg2l,
> };
>
> static const struct renesas_sdhi_of_data_with_quirks of_rcar_gen3_compatible = {
> @@ -283,7 +283,7 @@ static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = {
> { .compatible = "renesas,sdhi-r8a77970", .data = &of_r8a77970_compatible, },
> { .compatible = "renesas,sdhi-r8a77990", .data = &of_r8a77990_compatible, },
> { .compatible = "renesas,sdhi-r8a77995", .data = &of_rcar_gen3_nohs400_compatible, },
> - { .compatible = "renesas,sdhi-r9a09g011", .data = &of_r9a09g011_compatible, },

Hence I think the above line should be kept, but changed to point
to &of_rzg2l_compatible.

> + { .compatible = "renesas,rzg2l-sdhi", .data = &of_rzg2l_compatible, },
> { .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, },
> { .compatible = "renesas,rcar-gen4-sdhi", .data = &of_rcar_gen3_compatible, },
> {},

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2024-04-23 07:01:28

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 0/6] Update compat strings for SD/MMC nodes on RZ/{G2L (family), G3S, V2M} SoCs

Hi Prabhakar,

On Mon, Apr 22, 2024 at 11:30 PM Prabhakar <[email protected]> wrote:
> From: Lad Prabhakar <[email protected]>
> - RZ/G2UL and RZ/Five ("r9a07g043")
> - RZ/G2L(C) ("r9a07g044")
> - RZ/V2L ("r9a07g054")
> - RZ/G3S ("r9a08g045")
> - RZ/V2M ("r9a09g011")
>
> The SD/MMC Interface in the above listed SoCs is not identical to that of
> R-Car Gen3. These SoCs have HS400 disabled and use fixed address mode.
> Therefore, we need to apply fixed_addr_mode and hs400_disabled quirks.
> 'renesas,rzg2l-sdhi' is introduced as a generic compatible string for the
> above SoCs where fixed_addr_mode and hs400_disabled quirks will be applied.

Thanks for your series!

> Lad Prabhakar (6):
> dt-bindings: mmc: renesas,sdhi: Drop 'items' keyword
> dt-bindings: mmc: renesas,sdhi: Document RZ/G2L family compatibility
> mmc: renesas_sdhi: Add compatible string for RZ/G2L family, RZ/G3S,
> and RZ/V2M SoCs
> arm64: dts: renesas: r9a09g011: Update fallback string for SDHI nodes
> arm64: dts: renesas: rzg2l-family: Update fallback string for SDHI
> nodes
> arm64: dts: renesas: r9a08g045: Update fallback string for SDHI nodes

The DTS patches have a hard dependency on the driver changes, right?
So they cannot be applied in parallel.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2024-04-23 07:12:08

by Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 3/6] mmc: renesas_sdhi: Add compatible string for RZ/G2L family, RZ/G3S, and RZ/V2M SoCs

Hi Geert,

Thank you for the review.

On Tue, Apr 23, 2024 at 7:53 AM Geert Uytterhoeven <[email protected]> wrote:
>
> Hi Prabhakar,
>
> On Mon, Apr 22, 2024 at 11:30 PM Prabhakar <[email protected]> wrote:
> > From: Lad Prabhakar <[email protected]>
> >
> > - RZ/G2UL and RZ/Five ("r9a07g043")
> > - RZ/G2L(C) ("r9a07g044")
> > - RZ/V2L ("r9a07g054")
> > - RZ/G3S ("r9a08g045")
> > - RZ/V2M ("r9a09g011")
> >
> > The above SoCs have HS400 disabled and use fixed address mode. Add a
> > generic compatible 'renesas,rzg2l-sdhi' fallback string for these SoCs,
> > where fixed_addr_mode and hs400_disabled quirks are applied.
>
> Thanks for your patch!
> >
> > Note, 'renesas,sdhi-r9a09g011' is dropped as we will be using
> > 'renesas,rzg2l-sdhi' as a fallback string for RZ/V2M SoC.
>
> Doesn't that break backwards compatibility with existing DTBs?
>
I was in two minds here, as similarly to the RZ/G2L family the RZ/V2M
has Gen3 compat string as a fallback in the DTSI. So for existing DTBs
this would still work (but with no quirks applied). But as you say
I'll keep this to make sure we dont break anything,

> > Signed-off-by: Lad Prabhakar <[email protected]>
> > ---
> > drivers/mmc/host/renesas_sdhi_internal_dmac.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> > index 53d34c3eddce..1828c37e0198 100644
> > --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> > +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> > @@ -210,7 +210,7 @@ static const struct renesas_sdhi_quirks sdhi_quirks_r8a77990 = {
> > .manual_tap_correction = true,
> > };
> >
> > -static const struct renesas_sdhi_quirks sdhi_quirks_r9a09g011 = {
> > +static const struct renesas_sdhi_quirks sdhi_quirks_rzg2l = {
> > .fixed_addr_mode = true,
> > .hs400_disabled = true,
> > };
> > @@ -255,9 +255,9 @@ static const struct renesas_sdhi_of_data_with_quirks of_r8a77990_compatible = {
> > .quirks = &sdhi_quirks_r8a77990,
> > };
> >
> > -static const struct renesas_sdhi_of_data_with_quirks of_r9a09g011_compatible = {
> > +static const struct renesas_sdhi_of_data_with_quirks of_rzg2l_compatible = {
> > .of_data = &of_data_rcar_gen3,
> > - .quirks = &sdhi_quirks_r9a09g011,
> > + .quirks = &sdhi_quirks_rzg2l,
> > };
> >
> > static const struct renesas_sdhi_of_data_with_quirks of_rcar_gen3_compatible = {
> > @@ -283,7 +283,7 @@ static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = {
> > { .compatible = "renesas,sdhi-r8a77970", .data = &of_r8a77970_compatible, },
> > { .compatible = "renesas,sdhi-r8a77990", .data = &of_r8a77990_compatible, },
> > { .compatible = "renesas,sdhi-r8a77995", .data = &of_rcar_gen3_nohs400_compatible, },
> > - { .compatible = "renesas,sdhi-r9a09g011", .data = &of_r9a09g011_compatible, },
>
> Hence I think the above line should be kept, but changed to point
> to &of_rzg2l_compatible.
>
OK, will do.

Cheers,
Prabhakar

2024-04-23 07:15:13

by Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 0/6] Update compat strings for SD/MMC nodes on RZ/{G2L (family), G3S, V2M} SoCs

Hi Geert,

On Tue, Apr 23, 2024 at 7:57 AM Geert Uytterhoeven <[email protected]> wrote:
>
> Hi Prabhakar,
>
> On Mon, Apr 22, 2024 at 11:30 PM Prabhakar <[email protected]> wrote:
> > From: Lad Prabhakar <[email protected]>
> > - RZ/G2UL and RZ/Five ("r9a07g043")
> > - RZ/G2L(C) ("r9a07g044")
> > - RZ/V2L ("r9a07g054")
> > - RZ/G3S ("r9a08g045")
> > - RZ/V2M ("r9a09g011")
> >
> > The SD/MMC Interface in the above listed SoCs is not identical to that of
> > R-Car Gen3. These SoCs have HS400 disabled and use fixed address mode.
> > Therefore, we need to apply fixed_addr_mode and hs400_disabled quirks.
> > 'renesas,rzg2l-sdhi' is introduced as a generic compatible string for the
> > above SoCs where fixed_addr_mode and hs400_disabled quirks will be applied.
>
> Thanks for your series!
>
> > Lad Prabhakar (6):
> > dt-bindings: mmc: renesas,sdhi: Drop 'items' keyword
> > dt-bindings: mmc: renesas,sdhi: Document RZ/G2L family compatibility
> > mmc: renesas_sdhi: Add compatible string for RZ/G2L family, RZ/G3S,
> > and RZ/V2M SoCs
> > arm64: dts: renesas: r9a09g011: Update fallback string for SDHI nodes
> > arm64: dts: renesas: rzg2l-family: Update fallback string for SDHI
> > nodes
> > arm64: dts: renesas: r9a08g045: Update fallback string for SDHI nodes
>
> The DTS patches have a hard dependency on the driver changes, right?
> So they cannot be applied in parallel.
>
Agreed, I sent them together to make the DT bot happy for the dtbs
checks. While sending a v2 Ill split them up.

Cheers,
Prabhakar

2024-04-23 07:22:10

by Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 1/6] dt-bindings: mmc: renesas,sdhi: Drop 'items' keyword

Hi Krzysztof,

Thank you for the review.

On Tue, Apr 23, 2024 at 7:29 AM Krzysztof Kozlowski <[email protected]> wrote:
>
> On 22/04/2024 23:30, Prabhakar wrote:
> > From: Lad Prabhakar <[email protected]>
> >
> > Drop 'items' keyword from compatible list which have single const value.
> >
> > Signed-off-by: Lad Prabhakar <[email protected]>
> > ---
> > .../devicetree/bindings/mmc/renesas,sdhi.yaml | 18 ++++++------------
> > 1 file changed, 6 insertions(+), 12 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> > index 29f2400247eb..90c8b1b727a8 100644
> > --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> > @@ -12,16 +12,11 @@ maintainers:
> > properties:
> > compatible:
> > oneOf:
> > - - items:
> > - - const: renesas,sdhi-sh73a0 # R-Mobile APE6
> > - - items:
> > - - const: renesas,sdhi-r7s72100 # RZ/A1H
> > - - items:
> > - - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
> > - - items:
> > - - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
> > - - items:
> > - - const: renesas,sdhi-r8a7740 # R-Mobile A1
> > + - const: renesas,sdhi-sh73a0 # R-Mobile APE6
> > + - const: renesas,sdhi-r7s72100 # RZ/A1H
> > + - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
> > + - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
> > + - const: renesas,sdhi-r8a7740 # R-Mobile A1
>
> That's just an enum.
>
Are you suggesting to group them into a single enum instead...?

> > - items:
> > - enum:
> > - renesas,sdhi-r8a7778 # R-Car M1
> > @@ -40,8 +35,7 @@ properties:
> > - renesas,sdhi-r8a7793 # R-Car M2-N
> > - renesas,sdhi-r8a7794 # R-Car E2
> > - const: renesas,rcar-gen2-sdhi # R-Car Gen2 and RZ/G1
> > - - items:
> > - - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
> > + - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
>
> This as well
.. including this?

Cheers,
Prabhakar

2024-04-23 09:59:56

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/6] dt-bindings: mmc: renesas,sdhi: Drop 'items' keyword

On 23/04/2024 09:21, Lad, Prabhakar wrote:
> Hi Krzysztof,
>
> Thank you for the review.
>
> On Tue, Apr 23, 2024 at 7:29 AM Krzysztof Kozlowski <[email protected]> wrote:
>>
>> On 22/04/2024 23:30, Prabhakar wrote:
>>> From: Lad Prabhakar <[email protected]>
>>>
>>> Drop 'items' keyword from compatible list which have single const value.
>>>
>>> Signed-off-by: Lad Prabhakar <[email protected]>
>>> ---
>>> .../devicetree/bindings/mmc/renesas,sdhi.yaml | 18 ++++++------------
>>> 1 file changed, 6 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
>>> index 29f2400247eb..90c8b1b727a8 100644
>>> --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
>>> +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
>>> @@ -12,16 +12,11 @@ maintainers:
>>> properties:
>>> compatible:
>>> oneOf:
>>> - - items:
>>> - - const: renesas,sdhi-sh73a0 # R-Mobile APE6
>>> - - items:
>>> - - const: renesas,sdhi-r7s72100 # RZ/A1H
>>> - - items:
>>> - - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
>>> - - items:
>>> - - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
>>> - - items:
>>> - - const: renesas,sdhi-r8a7740 # R-Mobile A1
>>> + - const: renesas,sdhi-sh73a0 # R-Mobile APE6
>>> + - const: renesas,sdhi-r7s72100 # RZ/A1H
>>> + - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
>>> + - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
>>> + - const: renesas,sdhi-r8a7740 # R-Mobile A1
>>
>> That's just an enum.
>>
> Are you suggesting to group them into a single enum instead...?

Yes. That's preferred form, easier to read, because it clearly documents
that binding enumerates.

But just in case you start changing all const to enums: don't. Comment
is for this patch, since you already want to touch these things.

Best regards,
Krzysztof


2024-04-23 11:28:26

by Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 1/6] dt-bindings: mmc: renesas,sdhi: Drop 'items' keyword

On Tue, Apr 23, 2024 at 10:59 AM Krzysztof Kozlowski <[email protected]> wrote:
>
> On 23/04/2024 09:21, Lad, Prabhakar wrote:
> > Hi Krzysztof,
> >
> > Thank you for the review.
> >
> > On Tue, Apr 23, 2024 at 7:29 AM Krzysztof Kozlowski <[email protected]> wrote:
> >>
> >> On 22/04/2024 23:30, Prabhakar wrote:
> >>> From: Lad Prabhakar <[email protected]>
> >>>
> >>> Drop 'items' keyword from compatible list which have single const value.
> >>>
> >>> Signed-off-by: Lad Prabhakar <[email protected]>
> >>> ---
> >>> .../devicetree/bindings/mmc/renesas,sdhi.yaml | 18 ++++++------------
> >>> 1 file changed, 6 insertions(+), 12 deletions(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> >>> index 29f2400247eb..90c8b1b727a8 100644
> >>> --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> >>> +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> >>> @@ -12,16 +12,11 @@ maintainers:
> >>> properties:
> >>> compatible:
> >>> oneOf:
> >>> - - items:
> >>> - - const: renesas,sdhi-sh73a0 # R-Mobile APE6
> >>> - - items:
> >>> - - const: renesas,sdhi-r7s72100 # RZ/A1H
> >>> - - items:
> >>> - - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
> >>> - - items:
> >>> - - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
> >>> - - items:
> >>> - - const: renesas,sdhi-r8a7740 # R-Mobile A1
> >>> + - const: renesas,sdhi-sh73a0 # R-Mobile APE6
> >>> + - const: renesas,sdhi-r7s72100 # RZ/A1H
> >>> + - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
> >>> + - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
> >>> + - const: renesas,sdhi-r8a7740 # R-Mobile A1
> >>
> >> That's just an enum.
> >>
> > Are you suggesting to group them into a single enum instead...?
>
> Yes. That's preferred form, easier to read, because it clearly documents
> that binding enumerates.
>
Agreed.

> But just in case you start changing all const to enums: don't. Comment
> is for this patch, since you already want to touch these things.
>
Indeed.

Cheers,
Prabhakar

2024-04-24 14:41:17

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 5/6] arm64: dts: renesas: rzg2l-family: Update fallback string for SDHI nodes

On Mon, Apr 22, 2024 at 11:30 PM Prabhakar <[email protected]> wrote:
> From: Lad Prabhakar <[email protected]>
>
> Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where
> hs400_disabled and fixed_addr_mode quirks are applied.
>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2024-04-24 14:42:26

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 6/6] arm64: dts: renesas: r9a08g045: Update fallback string for SDHI nodes

On Mon, Apr 22, 2024 at 11:30 PM Prabhakar <[email protected]> wrote:
> From: Lad Prabhakar <[email protected]>
>
> Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where
> hs400_disabled and fixed_addr_mode quirks are applied.
>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2024-04-24 14:48:01

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 4/6] arm64: dts: renesas: r9a09g011: Update fallback string for SDHI nodes

On Mon, Apr 22, 2024 at 11:30 PM Prabhakar <[email protected]> wrote:
> From: Lad Prabhakar <[email protected]>
>
> Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where
> hs400_disabled and fixed_addr_mode quirks are applied.
>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds