diff mbox series

dt-bindings: serial: snps-dw-apb-uart: document RZ/N1 binding without DMA

Message ID 20250318085353.18990-2-wsa+renesas@sang-engineering.com
State Superseded
Headers show
Series dt-bindings: serial: snps-dw-apb-uart: document RZ/N1 binding without DMA | expand

Commit Message

Wolfram Sang March 18, 2025, 8:53 a.m. UTC
Renesas RZ/N1D has this UART with and without DMA support. Currently,
only the binding with DMA support is described. Add the missing one
without DMA support which can fallback even more.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 .../bindings/serial/snps-dw-apb-uart.yaml     | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Geert Uytterhoeven March 18, 2025, 9:05 a.m. UTC | #1
Hi Wolfram,

On Tue, 18 Mar 2025 at 09:54, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Renesas RZ/N1D has this UART with and without DMA support. Currently,
> only the binding with DMA support is described. Add the missing one
> without DMA support which can fallback even more.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
> +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
> @@ -13,6 +13,20 @@ allOf:
>    - $ref: serial.yaml#
>    - $ref: rs485.yaml#
>
> +  - if:
> +      properties:
> +        compatible:
> +          items:
> +            - enum:
> +                - renesas,r9a06g032-uart
> +                - renesas,r9a06g033-uart

I think you can simplify by replacing the enum by

    - pattern: "^renesas,.*$"

> +            - const: renesas,rzn1-uart
> +            - const: snps,dw-apb-uart
> +    then:
> +      properties:
> +        dmas: false
> +        dma-names: false
> +
>    - if:
>        properties:
>          compatible:

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

Gr{oetje,eeting}s,

                        Geert
Geert Uytterhoeven March 18, 2025, 9:22 a.m. UTC | #2
Hi Wolfram,

On Tue, 18 Mar 2025 at 10:11, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > > +            - enum:
> > > +                - renesas,r9a06g032-uart
> > > +                - renesas,r9a06g033-uart
> >
> > I think you can simplify by replacing the enum by
> >
> >     - pattern: "^renesas,.*$"
>
> I still plan to remove r9a06g033 bindings from the kernel because that
> SoC cannot run Linux with only 4MB of internal SRAM. So, all this will
> become "const: renesas,r9a06g032-uart" in the future anyhow. But one
> step after the other...

DT is not just for Linux. I guess it can run Zephyr?

Gr{oetje,eeting}s,

                        Geert
Miquel Raynal March 18, 2025, 9:32 a.m. UTC | #3
Hello Wolfram,

On 18/03/2025 at 09:53:53 +01, Wolfram Sang <wsa+renesas@sang-engineering.com> wrote:

> Renesas RZ/N1D has this UART with and without DMA support. Currently,
> only the binding with DMA support is described. Add the missing one
> without DMA support which can fallback even more.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

That's true indeed.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

Thanks,
Miquèl
Rob Herring March 21, 2025, 4:06 p.m. UTC | #4
On Tue, 18 Mar 2025 09:53:53 +0100, Wolfram Sang wrote:
> Renesas RZ/N1D has this UART with and without DMA support. Currently,
> only the binding with DMA support is described. Add the missing one
> without DMA support which can fallback even more.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  .../bindings/serial/snps-dw-apb-uart.yaml     | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
index 1c163cb5dff1..645b14ffde90 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
@@ -13,6 +13,20 @@  allOf:
   - $ref: serial.yaml#
   - $ref: rs485.yaml#
 
+  - if:
+      properties:
+        compatible:
+          items:
+            - enum:
+                - renesas,r9a06g032-uart
+                - renesas,r9a06g033-uart
+            - const: renesas,rzn1-uart
+            - const: snps,dw-apb-uart
+    then:
+      properties:
+        dmas: false
+        dma-names: false
+
   - if:
       properties:
         compatible:
@@ -30,6 +44,12 @@  allOf:
 properties:
   compatible:
     oneOf:
+      - items:
+          - enum:
+              - renesas,r9a06g032-uart
+              - renesas,r9a06g033-uart
+          - const: renesas,rzn1-uart
+          - const: snps,dw-apb-uart
       - items:
           - enum:
               - renesas,r9a06g032-uart