diff mbox series

[v2,2/3] dt-bindings: dma: rz-dmac: Document RZ/A1H SoC

Message ID 20241001124310.2336-3-wsa+renesas@sang-engineering.com (mailing list archive)
State Superseded
Headers show
Series dmaengine: sh: rz-dmac: add r7s72100 support | expand

Commit Message

Wolfram Sang Oct. 1, 2024, 12:43 p.m. UTC
Document the Renesas RZ/A1H DMAC block. This one does not require clocks
and resets, so update the bindings accordingly. Introduce a generic name
in the header to make future additions easier.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 .../bindings/dma/renesas,rz-dmac.yaml         | 27 +++++++++++++------
 1 file changed, 19 insertions(+), 8 deletions(-)

Comments

Krzysztof Kozlowski Oct. 2, 2024, 6:19 a.m. UTC | #1
On Tue, Oct 01, 2024 at 02:43:08PM +0200, Wolfram Sang wrote:
> Document the Renesas RZ/A1H DMAC block. This one does not require clocks
> and resets, so update the bindings accordingly. Introduce a generic name
> in the header to make future additions easier.

Does not require or does not have? What does it mean that device does
not require clocks? It has its own, internal clock oscillator? But then
how does it match with external clocks which are still apparently
supplied?

It looks like constrains are relaxed because of current driver
structure or current DTS...

Best regards,
Krzysztof
Wolfram Sang Oct. 2, 2024, 6:37 a.m. UTC | #2
> Does not require or does not have? What does it mean that device does
> not require clocks? It has its own, internal clock oscillator? But then

You are right, it requires "clocks" but not "clock-names". Seems I got
carried away when removing the reset properties :(

Thanks!
Geert Uytterhoeven Oct. 4, 2024, 2:46 p.m. UTC | #3
Hi Wolfram,

On Wed, Oct 2, 2024 at 8:37 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > Does not require or does not have? What does it mean that device does
> > not require clocks? It has its own, internal clock oscillator? But then
>
> You are right, it requires "clocks" but not "clock-names". Seems I got
> carried away when removing the reset properties :(

According to the documentation, there is no bit in a Standby Control
Register to control the DMAC clock.  The driver doesn't care about the
clock or its rate, so you can use P0 if you want.

Anyway:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert
Wolfram Sang Oct. 4, 2024, 7:57 p.m. UTC | #4
> According to the documentation, there is no bit in a Standby Control
> Register to control the DMAC clock.  The driver doesn't care about the
> clock or its rate, so you can use P0 if you want.

Would you prefer using 'p0' or leaving this patch as is?
Geert Uytterhoeven Oct. 7, 2024, 7:30 a.m. UTC | #5
Hi Wolfram,

On Fri, Oct 4, 2024 at 9:57 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > According to the documentation, there is no bit in a Standby Control
> > Register to control the DMAC clock.  The driver doesn't care about the
> > clock or its rate, so you can use P0 if you want.
>
> Would you prefer using 'p0' or leaving this patch as is?

Leaving the patch as-is is fine for me.

Gr{oetje,eeting}s,

                        Geert
Geert Uytterhoeven Oct. 7, 2024, 7:34 a.m. UTC | #6
Hi Wolfram,

On Mon, Oct 7, 2024 at 9:30 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Fri, Oct 4, 2024 at 9:57 PM Wolfram Sang
> <wsa+renesas@sang-engineering.com> wrote:
> > > According to the documentation, there is no bit in a Standby Control
> > > Register to control the DMAC clock.  The driver doesn't care about the
> > > clock or its rate, so you can use P0 if you want.
> >
> > Would you prefer using 'p0' or leaving this patch as is?
>
> Leaving the patch as-is is fine for me.

Upon second thought: the clock would only be used by the PM Domain
code.  So without a clocks property, "power-domains = <&cpg_clocks>"
would not make any sense, and the power-domains property should be
made optional.  The pinctrl and irqc also don't have it.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml b/Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml
index ca24cf48769f..83d79b7d85d2 100644
--- a/Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml
+++ b/Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml
@@ -4,18 +4,16 @@ 
 $id: http://devicetree.org/schemas/dma/renesas,rz-dmac.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Renesas RZ/{G2L,G2UL,V2L} DMA Controller
+title: Renesas RZ DMA Controller
 
 maintainers:
   - Biju Das <biju.das.jz@bp.renesas.com>
 
-allOf:
-  - $ref: dma-controller.yaml#
-
 properties:
   compatible:
     items:
       - enum:
+          - renesas,r7s72100-dmac # RZ/A1H
           - renesas,r9a07g043-dmac # RZ/G2UL and RZ/Five
           - renesas,r9a07g044-dmac # RZ/G2{L,LC}
           - renesas,r9a07g054-dmac # RZ/V2L
@@ -93,13 +91,26 @@  required:
   - reg
   - interrupts
   - interrupt-names
-  - clocks
-  - clock-names
   - '#dma-cells'
   - dma-channels
   - power-domains
-  - resets
-  - reset-names
+
+allOf:
+  - $ref: dma-controller.yaml#
+
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - renesas,r7s72100-dmac
+    then:
+      required:
+        - clocks
+        - clock-names
+        - resets
+        - reset-names
 
 additionalProperties: false