All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Document RZ/G2L SDHI controller bindings
@ 2021-08-17  9:03 Biju Das
  2021-08-17  9:03 ` [PATCH v4 1/2] dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning Biju Das
  2021-08-17  9:03 ` [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings Biju Das
  0 siblings, 2 replies; 11+ messages in thread
From: Biju Das @ 2021-08-17  9:03 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: Biju Das, Wolfram Sang, linux-mmc, devicetree,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, linux-renesas-soc

This patch series aims to document RZ/G2L SDHI controller bindings.

v3->v4:
 * Removed duplicate clock-names for sdhi-r7sxxxx SoC's
 * Defined clock-names for RZ/G2L SoC and made this as required property.
v2->v3:
 * Created a separate patch to fix the dtbs-warning check reported by [1].
 * RZ/G2L SDHI binding patch depends up on the above the patch.
 [1] https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20210804091940.23983-1-biju.das.jz@bp.renesas.com/
v1->v2:
 * Fixed dtbs-check issue for RZ/A{1,2} platforms.

v1->
 * newpatch

Biju Das (2):
  dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning
  dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings

 .../devicetree/bindings/mmc/renesas,sdhi.yaml | 133 ++++++++++++------
 1 file changed, 89 insertions(+), 44 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v4 1/2] dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning
  2021-08-17  9:03 [PATCH v4 0/2] Document RZ/G2L SDHI controller bindings Biju Das
@ 2021-08-17  9:03 ` Biju Das
  2021-08-18 14:12   ` Rob Herring
  2021-08-24 14:56   ` Ulf Hansson
  2021-08-17  9:03 ` [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings Biju Das
  1 sibling, 2 replies; 11+ messages in thread
From: Biju Das @ 2021-08-17  9:03 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: Biju Das, Wolfram Sang, linux-mmc, devicetree,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, linux-renesas-soc

Fix dtbs-check warning pinctrl-names:0:'default' was expected
for r8a77470-iwg23s-sbc.dts file.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v3->v4:
 * Removed duplicate clock-names for sdhi-r7sxxxx SoC's
 Ref:- https://patchwork.kernel.org/project/linux-renesas-soc/patch/20210804161325.26996-2-biju.das.jz@bp.renesas.com/
v3:
 * New patch to fix the dtbs-check warnings
 Ref:- https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20210804091940.23983-1-biju.das.jz@bp.renesas.com/
---
 .../devicetree/bindings/mmc/renesas,sdhi.yaml | 60 ++++++++++++-------
 1 file changed, 37 insertions(+), 23 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
index 677989bc5924..43584f4f4c7e 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
+++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
@@ -9,9 +9,6 @@ title: Renesas SDHI SD/MMC controller
 maintainers:
   - Wolfram Sang <wsa+renesas@sang-engineering.com>
 
-allOf:
-  - $ref: "mmc-controller.yaml"
-
 properties:
   compatible:
     oneOf:
@@ -104,14 +101,46 @@ properties:
   pinctrl-1:
     maxItems: 1
 
-  pinctrl-names:
-    minItems: 1
-    items:
-      - const: default
-      - const: state_uhs
+  pinctrl-names: true
 
   max-frequency: true
 
+allOf:
+  - $ref: "mmc-controller.yaml"
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: renesas,sdhi-mmc-r8a77470
+    then:
+      properties:
+        pinctrl-names:
+          items:
+            - const: state_uhs
+    else:
+      properties:
+        pinctrl-names:
+          minItems: 1
+          items:
+            - const: default
+            - const: state_uhs
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - renesas,sdhi-r7s72100
+              - renesas,sdhi-r7s9210
+    then:
+      required:
+        - clock-names
+      description:
+        The internal card detection logic that exists in these controllers is
+        sectioned off to be run by a separate second clock source to allow
+        the main core clock to be turned off to save power.
+
 required:
   - compatible
   - reg
@@ -119,21 +148,6 @@ required:
   - clocks
   - power-domains
 
-if:
-  properties:
-    compatible:
-      contains:
-        enum:
-          - renesas,sdhi-r7s72100
-          - renesas,sdhi-r7s9210
-then:
-  required:
-    - clock-names
-  description:
-    The internal card detection logic that exists in these controllers is
-    sectioned off to be run by a separate second clock source to allow
-    the main core clock to be turned off to save power.
-
 unevaluatedProperties: false
 
 examples:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings
  2021-08-17  9:03 [PATCH v4 0/2] Document RZ/G2L SDHI controller bindings Biju Das
  2021-08-17  9:03 ` [PATCH v4 1/2] dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning Biju Das
@ 2021-08-17  9:03 ` Biju Das
  2021-08-18 14:21   ` Rob Herring
                     ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Biju Das @ 2021-08-17  9:03 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: Biju Das, Wolfram Sang, linux-mmc, devicetree,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, linux-renesas-soc

Document RZ/G2L SDHI controller bindings.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v3->v4:
 * Defined clock-names for RZ/G2L SoC and make it as a required property
v2->v3:
 * split the patch into 2, first one for fixing dtbs-check issue and
   later one for documenting RZ/G2L SDHI bindings.
v1->v2:
 * Fixed dtbs-check issue for RZ/A{1,2} platforms.
---
 .../devicetree/bindings/mmc/renesas,sdhi.yaml | 73 +++++++++++++------
 1 file changed, 52 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
index 43584f4f4c7e..9f1e7092cf44 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
+++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
@@ -44,19 +44,20 @@ properties:
           - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
       - items:
           - enum:
-              - renesas,sdhi-r8a774a1 # RZ/G2M
-              - renesas,sdhi-r8a774b1 # RZ/G2N
-              - renesas,sdhi-r8a774c0 # RZ/G2E
-              - renesas,sdhi-r8a774e1 # RZ/G2H
-              - renesas,sdhi-r8a7795  # R-Car H3
-              - renesas,sdhi-r8a7796  # R-Car M3-W
-              - renesas,sdhi-r8a77961 # R-Car M3-W+
-              - renesas,sdhi-r8a77965 # R-Car M3-N
-              - renesas,sdhi-r8a77970 # R-Car V3M
-              - renesas,sdhi-r8a77980 # R-Car V3H
-              - renesas,sdhi-r8a77990 # R-Car E3
-              - renesas,sdhi-r8a77995 # R-Car D3
-              - renesas,sdhi-r8a779a0 # R-Car V3U
+              - renesas,sdhi-r8a774a1  # RZ/G2M
+              - renesas,sdhi-r8a774b1  # RZ/G2N
+              - renesas,sdhi-r8a774c0  # RZ/G2E
+              - renesas,sdhi-r8a774e1  # RZ/G2H
+              - renesas,sdhi-r8a7795   # R-Car H3
+              - renesas,sdhi-r8a7796   # R-Car M3-W
+              - renesas,sdhi-r8a77961  # R-Car M3-W+
+              - renesas,sdhi-r8a77965  # R-Car M3-N
+              - renesas,sdhi-r8a77970  # R-Car V3M
+              - renesas,sdhi-r8a77980  # R-Car V3H
+              - renesas,sdhi-r8a77990  # R-Car E3
+              - renesas,sdhi-r8a77995  # R-Car D3
+              - renesas,sdhi-r8a779a0  # R-Car V3U
+              - renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
           - const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2
 
   reg:
@@ -66,15 +67,9 @@ properties:
     minItems: 1
     maxItems: 3
 
-  clocks:
-    minItems: 1
-    maxItems: 2
+  clocks: true
 
-  clock-names:
-    minItems: 1
-    items:
-      - const: core
-      - const: cd
+  clock-names: true
 
   dmas:
     minItems: 4
@@ -108,6 +103,42 @@ properties:
 allOf:
   - $ref: "mmc-controller.yaml"
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: renesas,sdhi-r9a07g044
+    then:
+      properties:
+        clocks:
+          items:
+            - description: IMCLK, SDHI channel main clock1.
+            - description: IMCLK2, SDHI channel main clock2. When this clock is
+                           turned off, external SD card detection cannot be
+                           detected.
+            - description: CLK_HS, SDHI channel High speed clock which operates
+                           4 times that of SDHI channel main clock1.
+            - description: ACLK, SDHI channel bus clock.
+        clock-names:
+          items:
+            - const: imclk
+            - const: imclk2
+            - const: clk_hs
+            - const: aclk
+      required:
+        - clock-names
+        - resets
+    else:
+      properties:
+        clocks:
+          minItems: 1
+          maxItems: 2
+        clock-names:
+          minItems: 1
+          items:
+            - const: core
+            - const: cd
+
   - if:
       properties:
         compatible:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/2] dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning
  2021-08-17  9:03 ` [PATCH v4 1/2] dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning Biju Das
@ 2021-08-18 14:12   ` Rob Herring
  2021-08-24 14:56   ` Ulf Hansson
  1 sibling, 0 replies; 11+ messages in thread
From: Rob Herring @ 2021-08-18 14:12 UTC (permalink / raw)
  To: Biju Das
  Cc: Prabhakar Mahadev Lad, Ulf Hansson, Chris Paterson,
	linux-renesas-soc, Geert Uytterhoeven, Wolfram Sang, devicetree,
	linux-mmc, Rob Herring, Biju Das

On Tue, 17 Aug 2021 10:03:12 +0100, Biju Das wrote:
> Fix dtbs-check warning pinctrl-names:0:'default' was expected
> for r8a77470-iwg23s-sbc.dts file.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v3->v4:
>  * Removed duplicate clock-names for sdhi-r7sxxxx SoC's
>  Ref:- https://patchwork.kernel.org/project/linux-renesas-soc/patch/20210804161325.26996-2-biju.das.jz@bp.renesas.com/
> v3:
>  * New patch to fix the dtbs-check warnings
>  Ref:- https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20210804091940.23983-1-biju.das.jz@bp.renesas.com/
> ---
>  .../devicetree/bindings/mmc/renesas,sdhi.yaml | 60 ++++++++++++-------
>  1 file changed, 37 insertions(+), 23 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings
  2021-08-17  9:03 ` [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings Biju Das
@ 2021-08-18 14:21   ` Rob Herring
  2021-08-24 14:56   ` Ulf Hansson
  2021-11-12 11:14   ` Geert Uytterhoeven
  2 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2021-08-18 14:21 UTC (permalink / raw)
  To: Biju Das
  Cc: linux-renesas-soc, Biju Das, Prabhakar Mahadev Lad, devicetree,
	Ulf Hansson, Wolfram Sang, Chris Paterson, Rob Herring,
	linux-mmc, Geert Uytterhoeven

On Tue, 17 Aug 2021 10:03:13 +0100, Biju Das wrote:
> Document RZ/G2L SDHI controller bindings.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v3->v4:
>  * Defined clock-names for RZ/G2L SoC and make it as a required property
> v2->v3:
>  * split the patch into 2, first one for fixing dtbs-check issue and
>    later one for documenting RZ/G2L SDHI bindings.
> v1->v2:
>  * Fixed dtbs-check issue for RZ/A{1,2} platforms.
> ---
>  .../devicetree/bindings/mmc/renesas,sdhi.yaml | 73 +++++++++++++------
>  1 file changed, 52 insertions(+), 21 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/2] dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning
  2021-08-17  9:03 ` [PATCH v4 1/2] dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning Biju Das
  2021-08-18 14:12   ` Rob Herring
@ 2021-08-24 14:56   ` Ulf Hansson
  1 sibling, 0 replies; 11+ messages in thread
From: Ulf Hansson @ 2021-08-24 14:56 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Wolfram Sang, linux-mmc, DTML, Geert Uytterhoeven,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Linux-Renesas

On Tue, 17 Aug 2021 at 11:03, Biju Das <biju.das.jz@bp.renesas.com> wrote:
>
> Fix dtbs-check warning pinctrl-names:0:'default' was expected
> for r8a77470-iwg23s-sbc.dts file.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
> v3->v4:
>  * Removed duplicate clock-names for sdhi-r7sxxxx SoC's
>  Ref:- https://patchwork.kernel.org/project/linux-renesas-soc/patch/20210804161325.26996-2-biju.das.jz@bp.renesas.com/
> v3:
>  * New patch to fix the dtbs-check warnings
>  Ref:- https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20210804091940.23983-1-biju.das.jz@bp.renesas.com/
> ---
>  .../devicetree/bindings/mmc/renesas,sdhi.yaml | 60 ++++++++++++-------
>  1 file changed, 37 insertions(+), 23 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> index 677989bc5924..43584f4f4c7e 100644
> --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> @@ -9,9 +9,6 @@ title: Renesas SDHI SD/MMC controller
>  maintainers:
>    - Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> -allOf:
> -  - $ref: "mmc-controller.yaml"
> -
>  properties:
>    compatible:
>      oneOf:
> @@ -104,14 +101,46 @@ properties:
>    pinctrl-1:
>      maxItems: 1
>
> -  pinctrl-names:
> -    minItems: 1
> -    items:
> -      - const: default
> -      - const: state_uhs
> +  pinctrl-names: true
>
>    max-frequency: true
>
> +allOf:
> +  - $ref: "mmc-controller.yaml"
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: renesas,sdhi-mmc-r8a77470
> +    then:
> +      properties:
> +        pinctrl-names:
> +          items:
> +            - const: state_uhs
> +    else:
> +      properties:
> +        pinctrl-names:
> +          minItems: 1
> +          items:
> +            - const: default
> +            - const: state_uhs
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - renesas,sdhi-r7s72100
> +              - renesas,sdhi-r7s9210
> +    then:
> +      required:
> +        - clock-names
> +      description:
> +        The internal card detection logic that exists in these controllers is
> +        sectioned off to be run by a separate second clock source to allow
> +        the main core clock to be turned off to save power.
> +
>  required:
>    - compatible
>    - reg
> @@ -119,21 +148,6 @@ required:
>    - clocks
>    - power-domains
>
> -if:
> -  properties:
> -    compatible:
> -      contains:
> -        enum:
> -          - renesas,sdhi-r7s72100
> -          - renesas,sdhi-r7s9210
> -then:
> -  required:
> -    - clock-names
> -  description:
> -    The internal card detection logic that exists in these controllers is
> -    sectioned off to be run by a separate second clock source to allow
> -    the main core clock to be turned off to save power.
> -
>  unevaluatedProperties: false
>
>  examples:
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings
  2021-08-17  9:03 ` [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings Biju Das
  2021-08-18 14:21   ` Rob Herring
@ 2021-08-24 14:56   ` Ulf Hansson
  2021-11-12 11:14   ` Geert Uytterhoeven
  2 siblings, 0 replies; 11+ messages in thread
From: Ulf Hansson @ 2021-08-24 14:56 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Wolfram Sang, linux-mmc, DTML, Geert Uytterhoeven,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Linux-Renesas

On Tue, 17 Aug 2021 at 11:03, Biju Das <biju.das.jz@bp.renesas.com> wrote:
>
> Document RZ/G2L SDHI controller bindings.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
> v3->v4:
>  * Defined clock-names for RZ/G2L SoC and make it as a required property
> v2->v3:
>  * split the patch into 2, first one for fixing dtbs-check issue and
>    later one for documenting RZ/G2L SDHI bindings.
> v1->v2:
>  * Fixed dtbs-check issue for RZ/A{1,2} platforms.
> ---
>  .../devicetree/bindings/mmc/renesas,sdhi.yaml | 73 +++++++++++++------
>  1 file changed, 52 insertions(+), 21 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> index 43584f4f4c7e..9f1e7092cf44 100644
> --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> @@ -44,19 +44,20 @@ properties:
>            - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
>        - items:
>            - enum:
> -              - renesas,sdhi-r8a774a1 # RZ/G2M
> -              - renesas,sdhi-r8a774b1 # RZ/G2N
> -              - renesas,sdhi-r8a774c0 # RZ/G2E
> -              - renesas,sdhi-r8a774e1 # RZ/G2H
> -              - renesas,sdhi-r8a7795  # R-Car H3
> -              - renesas,sdhi-r8a7796  # R-Car M3-W
> -              - renesas,sdhi-r8a77961 # R-Car M3-W+
> -              - renesas,sdhi-r8a77965 # R-Car M3-N
> -              - renesas,sdhi-r8a77970 # R-Car V3M
> -              - renesas,sdhi-r8a77980 # R-Car V3H
> -              - renesas,sdhi-r8a77990 # R-Car E3
> -              - renesas,sdhi-r8a77995 # R-Car D3
> -              - renesas,sdhi-r8a779a0 # R-Car V3U
> +              - renesas,sdhi-r8a774a1  # RZ/G2M
> +              - renesas,sdhi-r8a774b1  # RZ/G2N
> +              - renesas,sdhi-r8a774c0  # RZ/G2E
> +              - renesas,sdhi-r8a774e1  # RZ/G2H
> +              - renesas,sdhi-r8a7795   # R-Car H3
> +              - renesas,sdhi-r8a7796   # R-Car M3-W
> +              - renesas,sdhi-r8a77961  # R-Car M3-W+
> +              - renesas,sdhi-r8a77965  # R-Car M3-N
> +              - renesas,sdhi-r8a77970  # R-Car V3M
> +              - renesas,sdhi-r8a77980  # R-Car V3H
> +              - renesas,sdhi-r8a77990  # R-Car E3
> +              - renesas,sdhi-r8a77995  # R-Car D3
> +              - renesas,sdhi-r8a779a0  # R-Car V3U
> +              - renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
>            - const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2
>
>    reg:
> @@ -66,15 +67,9 @@ properties:
>      minItems: 1
>      maxItems: 3
>
> -  clocks:
> -    minItems: 1
> -    maxItems: 2
> +  clocks: true
>
> -  clock-names:
> -    minItems: 1
> -    items:
> -      - const: core
> -      - const: cd
> +  clock-names: true
>
>    dmas:
>      minItems: 4
> @@ -108,6 +103,42 @@ properties:
>  allOf:
>    - $ref: "mmc-controller.yaml"
>
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: renesas,sdhi-r9a07g044
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: IMCLK, SDHI channel main clock1.
> +            - description: IMCLK2, SDHI channel main clock2. When this clock is
> +                           turned off, external SD card detection cannot be
> +                           detected.
> +            - description: CLK_HS, SDHI channel High speed clock which operates
> +                           4 times that of SDHI channel main clock1.
> +            - description: ACLK, SDHI channel bus clock.
> +        clock-names:
> +          items:
> +            - const: imclk
> +            - const: imclk2
> +            - const: clk_hs
> +            - const: aclk
> +      required:
> +        - clock-names
> +        - resets
> +    else:
> +      properties:
> +        clocks:
> +          minItems: 1
> +          maxItems: 2
> +        clock-names:
> +          minItems: 1
> +          items:
> +            - const: core
> +            - const: cd
> +
>    - if:
>        properties:
>          compatible:
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings
  2021-08-17  9:03 ` [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings Biju Das
  2021-08-18 14:21   ` Rob Herring
  2021-08-24 14:56   ` Ulf Hansson
@ 2021-11-12 11:14   ` Geert Uytterhoeven
  2021-11-12 11:51     ` Biju Das
  2021-11-12 11:56     ` Wolfram Sang
  2 siblings, 2 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2021-11-12 11:14 UTC (permalink / raw)
  To: Biju Das
  Cc: Ulf Hansson, Rob Herring, Wolfram Sang, Linux MMC List,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, Linux-Renesas

Hi Biju,

On Tue, Aug 17, 2021 at 11:03 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Document RZ/G2L SDHI controller bindings.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Thanks for your patch, which is now commit bfadee4554c3782b
("dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings")
in v5.15.

> --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> @@ -44,19 +44,20 @@ properties:
>            - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
>        - items:
>            - enum:
> -              - renesas,sdhi-r8a774a1 # RZ/G2M
> -              - renesas,sdhi-r8a774b1 # RZ/G2N
> -              - renesas,sdhi-r8a774c0 # RZ/G2E
> -              - renesas,sdhi-r8a774e1 # RZ/G2H
> -              - renesas,sdhi-r8a7795  # R-Car H3
> -              - renesas,sdhi-r8a7796  # R-Car M3-W
> -              - renesas,sdhi-r8a77961 # R-Car M3-W+
> -              - renesas,sdhi-r8a77965 # R-Car M3-N
> -              - renesas,sdhi-r8a77970 # R-Car V3M
> -              - renesas,sdhi-r8a77980 # R-Car V3H
> -              - renesas,sdhi-r8a77990 # R-Car E3
> -              - renesas,sdhi-r8a77995 # R-Car D3
> -              - renesas,sdhi-r8a779a0 # R-Car V3U
> +              - renesas,sdhi-r8a774a1  # RZ/G2M
> +              - renesas,sdhi-r8a774b1  # RZ/G2N
> +              - renesas,sdhi-r8a774c0  # RZ/G2E
> +              - renesas,sdhi-r8a774e1  # RZ/G2H
> +              - renesas,sdhi-r8a7795   # R-Car H3
> +              - renesas,sdhi-r8a7796   # R-Car M3-W
> +              - renesas,sdhi-r8a77961  # R-Car M3-W+
> +              - renesas,sdhi-r8a77965  # R-Car M3-N
> +              - renesas,sdhi-r8a77970  # R-Car V3M
> +              - renesas,sdhi-r8a77980  # R-Car V3H
> +              - renesas,sdhi-r8a77990  # R-Car E3
> +              - renesas,sdhi-r8a77995  # R-Car D3
> +              - renesas,sdhi-r8a779a0  # R-Car V3U
> +              - renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
>            - const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2

I don't think SDHI on RZ/G2L is fully compatible with SDHI on R-Car Gen3...

>
>    reg:
> @@ -66,15 +67,9 @@ properties:
>      minItems: 1
>      maxItems: 3
>
> -  clocks:
> -    minItems: 1
> -    maxItems: 2
> +  clocks: true
>
> -  clock-names:
> -    minItems: 1
> -    items:
> -      - const: core
> -      - const: cd
> +  clock-names: true
>
>    dmas:
>      minItems: 4
> @@ -108,6 +103,42 @@ properties:
>  allOf:
>    - $ref: "mmc-controller.yaml"
>
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: renesas,sdhi-r9a07g044
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: IMCLK, SDHI channel main clock1.
> +            - description: IMCLK2, SDHI channel main clock2. When this clock is
> +                           turned off, external SD card detection cannot be
> +                           detected.
> +            - description: CLK_HS, SDHI channel High speed clock which operates
> +                           4 times that of SDHI channel main clock1.
> +            - description: ACLK, SDHI channel bus clock.
> +        clock-names:
> +          items:
> +            - const: imclk
> +            - const: imclk2
> +            - const: clk_hs
> +            - const: aclk
> +      required:
> +        - clock-names
> +        - resets
> +    else:
> +      properties:
> +        clocks:
> +          minItems: 1
> +          maxItems: 2
> +        clock-names:
> +          minItems: 1
> +          items:
> +            - const: core
> +            - const: cd
> +
>    - if:
>        properties:
>          compatible:

... as the clock handling is completely different.

Does this actually work with the current Linux SDHI driver? How are
the extra clocks handled?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings
  2021-11-12 11:14   ` Geert Uytterhoeven
@ 2021-11-12 11:51     ` Biju Das
  2021-11-12 11:56     ` Wolfram Sang
  1 sibling, 0 replies; 11+ messages in thread
From: Biju Das @ 2021-11-12 11:51 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ulf Hansson, Rob Herring, Wolfram Sang, Linux MMC List,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, Linux-Renesas

Hi Geert,

> Subject: Re: [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document
> RZ/G2L bindings
> 
> Hi Biju,
> 
> On Tue, Aug 17, 2021 at 11:03 AM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > Document RZ/G2L SDHI controller bindings.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Thanks for your patch, which is now commit bfadee4554c3782b
> ("dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings") in v5.15.
> 
> > --- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
> > @@ -44,19 +44,20 @@ properties:
> >            - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
> >        - items:
> >            - enum:
> > -              - renesas,sdhi-r8a774a1 # RZ/G2M
> > -              - renesas,sdhi-r8a774b1 # RZ/G2N
> > -              - renesas,sdhi-r8a774c0 # RZ/G2E
> > -              - renesas,sdhi-r8a774e1 # RZ/G2H
> > -              - renesas,sdhi-r8a7795  # R-Car H3
> > -              - renesas,sdhi-r8a7796  # R-Car M3-W
> > -              - renesas,sdhi-r8a77961 # R-Car M3-W+
> > -              - renesas,sdhi-r8a77965 # R-Car M3-N
> > -              - renesas,sdhi-r8a77970 # R-Car V3M
> > -              - renesas,sdhi-r8a77980 # R-Car V3H
> > -              - renesas,sdhi-r8a77990 # R-Car E3
> > -              - renesas,sdhi-r8a77995 # R-Car D3
> > -              - renesas,sdhi-r8a779a0 # R-Car V3U
> > +              - renesas,sdhi-r8a774a1  # RZ/G2M
> > +              - renesas,sdhi-r8a774b1  # RZ/G2N
> > +              - renesas,sdhi-r8a774c0  # RZ/G2E
> > +              - renesas,sdhi-r8a774e1  # RZ/G2H
> > +              - renesas,sdhi-r8a7795   # R-Car H3
> > +              - renesas,sdhi-r8a7796   # R-Car M3-W
> > +              - renesas,sdhi-r8a77961  # R-Car M3-W+
> > +              - renesas,sdhi-r8a77965  # R-Car M3-N
> > +              - renesas,sdhi-r8a77970  # R-Car V3M
> > +              - renesas,sdhi-r8a77980  # R-Car V3H
> > +              - renesas,sdhi-r8a77990  # R-Car E3
> > +              - renesas,sdhi-r8a77995  # R-Car D3
> > +              - renesas,sdhi-r8a779a0  # R-Car V3U
> > +              - renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
> >            - const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2
> 
> I don't think SDHI on RZ/G2L is fully compatible with SDHI on R-Car
> Gen3...

It is is same IP, it has 2 main clk(core clocks), 1 high speed clock and 1 bus clock.
Core clocks are same running at 133MHz, High speed clock is at 533 MHz(133 x4) and bus clock 
At 200MHz.

> 
> >
> >    reg:
> > @@ -66,15 +67,9 @@ properties:
> >      minItems: 1
> >      maxItems: 3
> >
> > -  clocks:
> > -    minItems: 1
> > -    maxItems: 2
> > +  clocks: true
> >
> > -  clock-names:
> > -    minItems: 1
> > -    items:
> > -      - const: core
> > -      - const: cd
> > +  clock-names: true
> >
> >    dmas:
> >      minItems: 4
> > @@ -108,6 +103,42 @@ properties:
> >  allOf:
> >    - $ref: "mmc-controller.yaml"
> >
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: renesas,sdhi-r9a07g044
> > +    then:
> > +      properties:
> > +        clocks:
> > +          items:
> > +            - description: IMCLK, SDHI channel main clock1.
> > +            - description: IMCLK2, SDHI channel main clock2. When this
> clock is
> > +                           turned off, external SD card detection
> cannot be
> > +                           detected.
> > +            - description: CLK_HS, SDHI channel High speed clock which
> operates
> > +                           4 times that of SDHI channel main clock1.
> > +            - description: ACLK, SDHI channel bus clock.
> > +        clock-names:
> > +          items:
> > +            - const: imclk
> > +            - const: imclk2
> > +            - const: clk_hs
> > +            - const: aclk
> > +      required:
> > +        - clock-names
> > +        - resets
> > +    else:
> > +      properties:
> > +        clocks:
> > +          minItems: 1
> > +          maxItems: 2
> > +        clock-names:
> > +          minItems: 1
> > +          items:
> > +            - const: core
> > +            - const: cd
> > +
> >    - if:
> >        properties:
> >          compatible:
> 
> ... as the clock handling is completely different.
> 
> Does this actually work with the current Linux SDHI driver? How are the
> extra clocks handled?

Yes, it works. Extra clocks are by PM framework. We added mutli-clock handling[1] in clock PM.

[1]:- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/renesas/rzg2l-cpg.c?h=v5.15#n585

First clock is core-clk[2], so it gets rate.

[2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mmc/host/renesas_sdhi_core.c?h=v5.15#n906

I need to apply the latest patch series from Wolfram to check, the introduction of SDH clock breaks anything on
RZ/G2L.

Regards,
biju

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
> 
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings
  2021-11-12 11:14   ` Geert Uytterhoeven
  2021-11-12 11:51     ` Biju Das
@ 2021-11-12 11:56     ` Wolfram Sang
  2021-11-12 12:17       ` Geert Uytterhoeven
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2021-11-12 11:56 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Biju Das, Ulf Hansson, Rob Herring, Linux MMC List,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, Linux-Renesas

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

Hi everyone,

> > +            - description: IMCLK, SDHI channel main clock1.

Sounds like "core"

> > +            - description: IMCLK2, SDHI channel main clock2. When this clock is
> > +                           turned off, external SD card detection cannot be
> > +                           detected.

"cd"

> > +            - description: CLK_HS, SDHI channel High speed clock which operates
> > +                           4 times that of SDHI channel main clock1.

"clkh" compared to the Gen3 bindings to me.

> > +            - description: ACLK, SDHI channel bus clock.

This I don't understand. The CPG-MSSR clock?

> Does this actually work with the current Linux SDHI driver? How are
> the extra clocks handled?

It may work out of the box if their HW can have "clkh" enabled all the
time and this is their default. Gen3 has recommendations to disable clkh
for slow transfer modes, so we need handling of clkh

Kind regards,

   Wolfram

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings
  2021-11-12 11:56     ` Wolfram Sang
@ 2021-11-12 12:17       ` Geert Uytterhoeven
  0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2021-11-12 12:17 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Biju Das, Ulf Hansson, Rob Herring, Linux MMC List,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, Linux-Renesas

Hi Wolfram,

On Fri, Nov 12, 2021 at 12:56 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > > +            - description: IMCLK, SDHI channel main clock1.
>
> Sounds like "core"
>
> > > +            - description: IMCLK2, SDHI channel main clock2. When this clock is
> > > +                           turned off, external SD card detection cannot be
> > > +                           detected.
>
> "cd"
>
> > > +            - description: CLK_HS, SDHI channel High speed clock which operates
> > > +                           4 times that of SDHI channel main clock1.
>
> "clkh" compared to the Gen3 bindings to me.
>
> > > +            - description: ACLK, SDHI channel bus clock.
>
> This I don't understand. The CPG-MSSR clock?

RZ/G2L has more fine-grained control of module clocks.
On e.g. R-Car SoCs, there is a single "MSTP" bit to disable "the"
module clock, but in practice it may control multiple clock inputs
to a module.  The actual clock tree is not documented, so we model
this as a single module clock.  So probably the MSTP bit controls
both the main channel clock and the bus clock.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-12 12:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17  9:03 [PATCH v4 0/2] Document RZ/G2L SDHI controller bindings Biju Das
2021-08-17  9:03 ` [PATCH v4 1/2] dt-bindings: mmc: renesas,sdhi: Fix dtbs-check warning Biju Das
2021-08-18 14:12   ` Rob Herring
2021-08-24 14:56   ` Ulf Hansson
2021-08-17  9:03 ` [PATCH v4 2/2] dt-bindings: mmc: renesas,sdhi: Document RZ/G2L bindings Biju Das
2021-08-18 14:21   ` Rob Herring
2021-08-24 14:56   ` Ulf Hansson
2021-11-12 11:14   ` Geert Uytterhoeven
2021-11-12 11:51     ` Biju Das
2021-11-12 11:56     ` Wolfram Sang
2021-11-12 12:17       ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.