diff mbox series

[3/7] dt-bindings: misc: Add binding for R-Car DAB

Message ID 20210225225147.29920-4-fabrizio.castro.jz@renesas.com (mailing list archive)
State Under Review
Delegated to: Geert Uytterhoeven
Headers show
Series Add FFT Support for R-Car Gen3 devices | expand

Commit Message

Fabrizio Castro Feb. 25, 2021, 10:51 p.m. UTC
Document bindings for R-Car DAB hardware accelerator, currently
found on the r8a77990 SoC (a.k.a. R-Car E3) and on the r8a77965
SoC (a.k.a. R-Car M3-N).

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
---
 .../devicetree/bindings/misc/renesas,dab.yaml | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/renesas,dab.yaml

Comments

Geert Uytterhoeven Feb. 26, 2021, 8:41 a.m. UTC | #1
Hi Fabrizio,

On Thu, Feb 25, 2021 at 11:53 PM Fabrizio Castro
<fabrizio.castro.jz@renesas.com> wrote:
> Document bindings for R-Car DAB hardware accelerator, currently
> found on the r8a77990 SoC (a.k.a. R-Car E3) and on the r8a77965
> SoC (a.k.a. R-Car M3-N).
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>

Thanks for your patch!

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/renesas,dab.yaml

> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - renesas,dab-r8a77965     # R-Car M3-N
> +          - renesas,dab-r8a77990     # R-Car E3

Please use the recommended order for new bindings:

    renesas,r8a77965-dab
    renesas,r8a77990-dab

> +      - const: renesas,rcar-gen3-dab # Generic fallback for R-Car Gen3 devices
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: dab

fck?

Gr{oetje,eeting}s,

                        Geert
Sergey Shtylyov Feb. 26, 2021, 9:06 a.m. UTC | #2
Hello!

On 26.02.2021 1:51, Fabrizio Castro wrote:

> Document bindings for R-Car DAB hardware accelerator, currently
> found on the r8a77990 SoC (a.k.a. R-Car E3) and on the r8a77965
> SoC (a.k.a. R-Car M3-N).
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> ---
>   .../devicetree/bindings/misc/renesas,dab.yaml | 75 +++++++++++++++++++
>   1 file changed, 75 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/misc/renesas,dab.yaml
> 
> diff --git a/Documentation/devicetree/bindings/misc/renesas,dab.yaml b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> new file mode 100644
> index 000000000000..e9494add13d7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> @@ -0,0 +1,75 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) 2021 Renesas Electronics Corporation
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/misc/renesas,dab.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas R-Car DAB Hardware Accelerator
> +
> +maintainers:
> +  - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> +
> +description:
> +  The DAB hardware accelerator found on some R-Car devices is a hardware
> +  accelerator for software DAB demodulators.
> +  It consists of one FFT (Fast Fourier Transform) module and one decoder module,
> +  compatible with DAB specification (ETSI EN 300 401 and ETSI TS 102 563).
> +  The decoder module can perform FIC decoding and MSC decoding processing from
> +  de-puncture to final decoded result.
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - renesas,dab-r8a77965     # R-Car M3-N
> +          - renesas,dab-r8a77990     # R-Car E3

    Why not renesas,<soc>-dab?

> +      - const: renesas,rcar-gen3-dab # Generic fallback for R-Car Gen3 devices
[...]

MBR, Sergei
Laurent Pinchart Feb. 26, 2021, 1:01 p.m. UTC | #3
Hi Fabrizio,

Thank you for the patch.

On Thu, Feb 25, 2021 at 10:51:43PM +0000, Fabrizio Castro wrote:
> Document bindings for R-Car DAB hardware accelerator, currently
> found on the r8a77990 SoC (a.k.a. R-Car E3) and on the r8a77965
> SoC (a.k.a. R-Car M3-N).
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> ---
>  .../devicetree/bindings/misc/renesas,dab.yaml | 75 +++++++++++++++++++
>  1 file changed, 75 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/renesas,dab.yaml
> 
> diff --git a/Documentation/devicetree/bindings/misc/renesas,dab.yaml b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> new file mode 100644
> index 000000000000..e9494add13d7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> @@ -0,0 +1,75 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) 2021 Renesas Electronics Corporation
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/misc/renesas,dab.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas R-Car DAB Hardware Accelerator
> +
> +maintainers:
> +  - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> +
> +description:
> +  The DAB hardware accelerator found on some R-Car devices is a hardware
> +  accelerator for software DAB demodulators.
> +  It consists of one FFT (Fast Fourier Transform) module and one decoder module,
> +  compatible with DAB specification (ETSI EN 300 401 and ETSI TS 102 563).
> +  The decoder module can perform FIC decoding and MSC decoding processing from
> +  de-puncture to final decoded result.
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - renesas,dab-r8a77965     # R-Car M3-N
> +          - renesas,dab-r8a77990     # R-Car E3
> +      - const: renesas,rcar-gen3-dab # Generic fallback for R-Car Gen3 devices
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1

I usually try to describe clocks:

  clocks:
    items:
      - description: The module functional clock

but as there's a single clock, it may not be worth it. Up to you.

> +
> +  clock-names:
> +    const: dab

With Geert's and Sergei's comments addressed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +
> +  power-domains:
> +    maxItems: 1
> +
> +  resets:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - power-domains
> +  - resets
> +
> +additionalProperties: false
> +
> +examples:
> +  # R8A77990 (R-Car E3)
> +  - |
> +    #include <dt-bindings/clock/r8a77990-cpg-mssr.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/power/r8a77990-sysc.h>
> +
> +    dab: dab@e6730000 {
> +        compatible = "renesas,dab-r8a77990",
> +                     "renesas,rcar-gen3-dab";
> +        reg = <0xe6730000 0x120>;
> +        interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&cpg CPG_MOD 1016>;
> +        clock-names = "dab";
> +        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
> +        resets = <&cpg 1016>;
> +        status = "disabled";
> +    };
Fabrizio Castro March 1, 2021, 3:10 p.m. UTC | #4
Hi Geert,

Thanks for your feedback!

> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: 26 February 2021 08:41
> Subject: Re: [PATCH 3/7] dt-bindings: misc: Add binding for R-Car DAB
> 
> Hi Fabrizio,
> 
> On Thu, Feb 25, 2021 at 11:53 PM Fabrizio Castro
> <fabrizio.castro.jz@renesas.com> wrote:
> > Document bindings for R-Car DAB hardware accelerator, currently
> > found on the r8a77990 SoC (a.k.a. R-Car E3) and on the r8a77965
> > SoC (a.k.a. R-Car M3-N).
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> 
> Thanks for your patch!
> 
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> 
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - renesas,dab-r8a77965     # R-Car M3-N
> > +          - renesas,dab-r8a77990     # R-Car E3
> 
> Please use the recommended order for new bindings:
> 
>     renesas,r8a77965-dab
>     renesas,r8a77990-dab

Sorry about this, will change.

> 
> > +      - const: renesas,rcar-gen3-dab # Generic fallback for R-Car Gen3
> devices
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    const: dab
> 
> fck?

Agreed.

Thanks,
Fab

> 
> 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
Fabrizio Castro March 1, 2021, 3:11 p.m. UTC | #5
Hello Sergei,

Thanks for your feedback!

> From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
> Sent: 26 February 2021 09:07
> Subject: Re: [PATCH 3/7] dt-bindings: misc: Add binding for R-Car DAB
> 
> Hello!
> 
> On 26.02.2021 1:51, Fabrizio Castro wrote:
> 
> > Document bindings for R-Car DAB hardware accelerator, currently
> > found on the r8a77990 SoC (a.k.a. R-Car E3) and on the r8a77965
> > SoC (a.k.a. R-Car M3-N).
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> > ---
> >   .../devicetree/bindings/misc/renesas,dab.yaml | 75 +++++++++++++++++++
> >   1 file changed, 75 insertions(+)
> >   create mode 100644
> Documentation/devicetree/bindings/misc/renesas,dab.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> > new file mode 100644
> > index 000000000000..e9494add13d7
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> > @@ -0,0 +1,75 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +# Copyright (C) 2021 Renesas Electronics Corporation
> > +%YAML 1.2
> > +---
> > +$id:
> https://jpn01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetre
> e.org%2Fschemas%2Fmisc%2Frenesas%2Cdab.yaml%23&amp;data=04%7C01%7Cfabrizio
> .castro.jz%40renesas.com%7C4ea11a8f46fc4f4642ad08d8da35d682%7C53d82571da19
> 47e49cb4625a166a4a2a%7C0%7C0%7C637499272091083125%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&
> amp;sdata=p5MNncCLOIMaYLyBtmOl%2Br%2BIKe9ByUqxv1k05FbYj94%3D&amp;reserved=
> 0
> > +$schema:
> https://jpn01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetre
> e.org%2Fmeta-
> schemas%2Fcore.yaml%23&amp;data=04%7C01%7Cfabrizio.castro.jz%40renesas.com
> %7C4ea11a8f46fc4f4642ad08d8da35d682%7C53d82571da1947e49cb4625a166a4a2a%7C0
> %7C0%7C637499272091083125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ
> IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=dBI8WMPjxAEvhY
> 3cj7WKJW4FjCrfN5JpAoqC9XSPNaY%3D&amp;reserved=0
> > +
> > +title: Renesas R-Car DAB Hardware Accelerator
> > +
> > +maintainers:
> > +  - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> > +
> > +description:
> > +  The DAB hardware accelerator found on some R-Car devices is a
> hardware
> > +  accelerator for software DAB demodulators.
> > +  It consists of one FFT (Fast Fourier Transform) module and one
> decoder module,
> > +  compatible with DAB specification (ETSI EN 300 401 and ETSI TS 102
> 563).
> > +  The decoder module can perform FIC decoding and MSC decoding
> processing from
> > +  de-puncture to final decoded result.
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - renesas,dab-r8a77965     # R-Car M3-N
> > +          - renesas,dab-r8a77990     # R-Car E3
> 
>     Why not renesas,<soc>-dab?

Will change.


Thanks,
Fab

> 
> > +      - const: renesas,rcar-gen3-dab # Generic fallback for R-Car Gen3
> devices
> [...]
> 
> MBR, Sergei
Fabrizio Castro March 1, 2021, 3:13 p.m. UTC | #6
Hi Laurent,

Thanks for your feedback!

> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: 26 February 2021 13:02
> Subject: Re: [PATCH 3/7] dt-bindings: misc: Add binding for R-Car DAB
> 
> Hi Fabrizio,
> 
> Thank you for the patch.
> 
> On Thu, Feb 25, 2021 at 10:51:43PM +0000, Fabrizio Castro wrote:
> > Document bindings for R-Car DAB hardware accelerator, currently
> > found on the r8a77990 SoC (a.k.a. R-Car E3) and on the r8a77965
> > SoC (a.k.a. R-Car M3-N).
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> > ---
> >  .../devicetree/bindings/misc/renesas,dab.yaml | 75 +++++++++++++++++++
> >  1 file changed, 75 insertions(+)
> >  create mode 100644
> Documentation/devicetree/bindings/misc/renesas,dab.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> > new file mode 100644
> > index 000000000000..e9494add13d7
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
> > @@ -0,0 +1,75 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +# Copyright (C) 2021 Renesas Electronics Corporation
> > +%YAML 1.2
> > +---
> > +$id:
> https://jpn01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetre
> e.org%2Fschemas%2Fmisc%2Frenesas%2Cdab.yaml%23&amp;data=04%7C01%7Cfabrizio
> .castro.jz%40renesas.com%7Cb383aa9cfef34b6653e008d8da56c204%7C53d82571da19
> 47e49cb4625a166a4a2a%7C0%7C0%7C637499413468300421%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&
> amp;sdata=r95fhwTCpf0gkNoRtCLrUbZtaCbI3da9sbFLv0UXipE%3D&amp;reserved=0
> > +$schema:
> https://jpn01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetre
> e.org%2Fmeta-
> schemas%2Fcore.yaml%23&amp;data=04%7C01%7Cfabrizio.castro.jz%40renesas.com
> %7Cb383aa9cfef34b6653e008d8da56c204%7C53d82571da1947e49cb4625a166a4a2a%7C0
> %7C0%7C637499413468300421%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ
> IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ajJ%2BmBs4zOzK
> cJghYY89B6PMgrxRFgoVVuflZCFmHYc%3D&amp;reserved=0
> > +
> > +title: Renesas R-Car DAB Hardware Accelerator
> > +
> > +maintainers:
> > +  - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> > +
> > +description:
> > +  The DAB hardware accelerator found on some R-Car devices is a
> hardware
> > +  accelerator for software DAB demodulators.
> > +  It consists of one FFT (Fast Fourier Transform) module and one
> decoder module,
> > +  compatible with DAB specification (ETSI EN 300 401 and ETSI TS 102
> 563).
> > +  The decoder module can perform FIC decoding and MSC decoding
> processing from
> > +  de-puncture to final decoded result.
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - renesas,dab-r8a77965     # R-Car M3-N
> > +          - renesas,dab-r8a77990     # R-Car E3
> > +      - const: renesas,rcar-gen3-dab # Generic fallback for R-Car Gen3
> devices
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 1
> 
> I usually try to describe clocks:
> 
>   clocks:
>     items:
>       - description: The module functional clock
> 
> but as there's a single clock, it may not be worth it. Up to you.

Will change as per your suggestion.

Thanks,
Fab

> 
> > +
> > +  clock-names:
> > +    const: dab
> 
> With Geert's and Sergei's comments addressed,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  resets:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - clocks
> > +  - clock-names
> > +  - power-domains
> > +  - resets
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  # R8A77990 (R-Car E3)
> > +  - |
> > +    #include <dt-bindings/clock/r8a77990-cpg-mssr.h>
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +    #include <dt-bindings/power/r8a77990-sysc.h>
> > +
> > +    dab: dab@e6730000 {
> > +        compatible = "renesas,dab-r8a77990",
> > +                     "renesas,rcar-gen3-dab";
> > +        reg = <0xe6730000 0x120>;
> > +        interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
> > +        clocks = <&cpg CPG_MOD 1016>;
> > +        clock-names = "dab";
> > +        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
> > +        resets = <&cpg 1016>;
> > +        status = "disabled";
> > +    };
> 
> --
> Regards,
> 
> Laurent Pinchart
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/misc/renesas,dab.yaml b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
new file mode 100644
index 000000000000..e9494add13d7
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/renesas,dab.yaml
@@ -0,0 +1,75 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2021 Renesas Electronics Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/renesas,dab.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas R-Car DAB Hardware Accelerator
+
+maintainers:
+  - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
+
+description:
+  The DAB hardware accelerator found on some R-Car devices is a hardware
+  accelerator for software DAB demodulators.
+  It consists of one FFT (Fast Fourier Transform) module and one decoder module,
+  compatible with DAB specification (ETSI EN 300 401 and ETSI TS 102 563).
+  The decoder module can perform FIC decoding and MSC decoding processing from
+  de-puncture to final decoded result.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - renesas,dab-r8a77965     # R-Car M3-N
+          - renesas,dab-r8a77990     # R-Car E3
+      - const: renesas,rcar-gen3-dab # Generic fallback for R-Car Gen3 devices
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: dab
+
+  power-domains:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - power-domains
+  - resets
+
+additionalProperties: false
+
+examples:
+  # R8A77990 (R-Car E3)
+  - |
+    #include <dt-bindings/clock/r8a77990-cpg-mssr.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/r8a77990-sysc.h>
+
+    dab: dab@e6730000 {
+        compatible = "renesas,dab-r8a77990",
+                     "renesas,rcar-gen3-dab";
+        reg = <0xe6730000 0x120>;
+        interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpg CPG_MOD 1016>;
+        clock-names = "dab";
+        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+        resets = <&cpg 1016>;
+        status = "disabled";
+    };