2022-11-07 14:18:54

by Herve Codina

[permalink] [raw]
Subject: [PATCH 4/7] dt-bindings: usb: add the Renesas USBF controller binding

The Renesas USBF controller is an USB2.0 device controller
(UDC) available in Renesas r9a06g032 SoC (RZ/N1 family).

Signed-off-by: Herve Codina <[email protected]>
---
.../devicetree/bindings/usb/renesas,usbf.yaml | 64 +++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/renesas,usbf.yaml

diff --git a/Documentation/devicetree/bindings/usb/renesas,usbf.yaml b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml
new file mode 100644
index 000000000000..f2b146d9d37b
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/renesas,usbf.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas USBF (USB Function) controller binding
+
+description: |
+ The Renesas USBF controller is an USB2.0 device
+ controller (UDC).
+
+maintainers:
+ - Herve Codina <[email protected]>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - renesas,r9a06g032-usbf
+ - const: renesas,rzn1-usbf
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Internal bus clock (AHB) for Function
+ - description: Internal bus clock (AHB) for Power Management
+ clock-names:
+ items:
+ - const: hclkf
+ - const: hclkpm
+
+ interrupts:
+ items:
+ - description: The USBF EPC interrupt
+ - description: The USBF AHB-EPC interrupt
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/r9a06g032-sysctrl.h>
+
+ usb@4001e000 {
+ compatible = "renesas,r9a06g032-usbf", "renesas,rzn1-usbf";
+ reg = <0x4001e000 0x2000>;
+ interrupts =
+ <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&sysctrl R9A06G032_HCLK_USBF>,
+ <&sysctrl R9A06G032_HCLK_USBPM>;
+ clock-names = "hclkf", "hclkpm";
+ };
--
2.37.3



2022-11-07 16:03:26

by Herve Codina

[permalink] [raw]
Subject: Re: [PATCH 4/7] dt-bindings: usb: add the Renesas USBF controller binding

Hi Geert,

On Mon, 7 Nov 2022 15:26:43 +0100
Geert Uytterhoeven <[email protected]> wrote:

> Hi Hervé,
>
> On Mon, Nov 7, 2022 at 3:00 PM Herve Codina <[email protected]> wrote:
> > The Renesas USBF controller is an USB2.0 device controller
> > (UDC) available in Renesas r9a06g032 SoC (RZ/N1 family).
> >
> > Signed-off-by: Herve Codina <[email protected]>
>
> Thanks for your patch!
>
[...]
> > +maintainers:
> > + - Herve Codina <[email protected]>
>
> Hervé? ;-)

Sure, you're right but in all my commits, signed-off-by and
other places where my email appears, I spell Hervé as "Herve"
So, to be consistent and avoid future confusion, I prefer
to keep Herve here.

>
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - items:
> > + - enum:
> > + - renesas,r9a06g032-usbf
> > + - const: renesas,rzn1-usbf
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + items:
> > + - description: Internal bus clock (AHB) for Function
> > + - description: Internal bus clock (AHB) for Power Management
> > + clock-names:
> > + items:
> > + - const: hclkf
> > + - const: hclkpm
>
> power-domains?

Will be added in v2.

Thanks for the review,
Hervé

2022-11-07 16:06:01

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 4/7] dt-bindings: usb: add the Renesas USBF controller binding

Hi Hervé,

On Mon, Nov 7, 2022 at 3:00 PM Herve Codina <[email protected]> wrote:
> The Renesas USBF controller is an USB2.0 device controller
> (UDC) available in Renesas r9a06g032 SoC (RZ/N1 family).
>
> Signed-off-by: Herve Codina <[email protected]>

Thanks for your patch!

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/renesas,usbf.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas USBF (USB Function) controller binding
> +
> +description: |
> + The Renesas USBF controller is an USB2.0 device
> + controller (UDC).
> +
> +maintainers:
> + - Herve Codina <[email protected]>

Hervé? ;-)

> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - renesas,r9a06g032-usbf
> + - const: renesas,rzn1-usbf
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + items:
> + - description: Internal bus clock (AHB) for Function
> + - description: Internal bus clock (AHB) for Power Management
> + clock-names:
> + items:
> + - const: hclkf
> + - const: hclkpm

power-domains?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2022-11-07 18:41:51

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 4/7] dt-bindings: usb: add the Renesas USBF controller binding

On 07/11/2022 14:58, Herve Codina wrote:
> The Renesas USBF controller is an USB2.0 device controller
> (UDC) available in Renesas r9a06g032 SoC (RZ/N1 family).
>
> Signed-off-by: Herve Codina <[email protected]>
> ---
> .../devicetree/bindings/usb/renesas,usbf.yaml | 64 +++++++++++++++++++
> 1 file changed, 64 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/usb/renesas,usbf.yaml
>
> diff --git a/Documentation/devicetree/bindings/usb/renesas,usbf.yaml b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml
> new file mode 100644
> index 000000000000..f2b146d9d37b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/renesas,usbf.yaml#

Filename based on compatible, so renesas,rzn1-usbf.yaml.

> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas USBF (USB Function) controller binding
> +
> +description: |
> + The Renesas USBF controller is an USB2.0 device
> + controller (UDC).
> +
> +maintainers:
> + - Herve Codina <[email protected]>
> +
> +properties:
> + compatible:
> + oneOf:

You have only one possibility, so oneOf is not needed. Unless you
already predict it will grow with new incompatible lists?

> + - items:
> + - enum:
> + - renesas,r9a06g032-usbf
> + - const: renesas,rzn1-usbf
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + items:
> + - description: Internal bus clock (AHB) for Function
> + - description: Internal bus clock (AHB) for Power Management

Blank line

> + clock-names:
> + items:
> + - const: hclkf
> + - const: hclkpm
> +
> + interrupts:
> + items:
> + - description: The USBF EPC interrupt
> + - description: The USBF AHB-EPC interrupt
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/clock/r9a06g032-sysctrl.h>
> +
> + usb@4001e000 {
> + compatible = "renesas,r9a06g032-usbf", "renesas,rzn1-usbf";
> + reg = <0x4001e000 0x2000>;
> + interrupts =

No need for line break. It's not helping in readability.


> + <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&sysctrl R9A06G032_HCLK_USBF>,
> + <&sysctrl R9A06G032_HCLK_USBPM>;
> + clock-names = "hclkf", "hclkpm";
> + };

Best regards,
Krzysztof


2022-11-10 12:09:28

by Herve Codina

[permalink] [raw]
Subject: Re: [PATCH 4/7] dt-bindings: usb: add the Renesas USBF controller binding

Hi Krzysztof,

On Mon, 7 Nov 2022 19:24:01 +0100
Krzysztof Kozlowski <[email protected]> wrote:

> On 07/11/2022 14:58, Herve Codina wrote:
> > The Renesas USBF controller is an USB2.0 device controller
> > (UDC) available in Renesas r9a06g032 SoC (RZ/N1 family).
> >
> > Signed-off-by: Herve Codina <[email protected]>
> > ---
> > .../devicetree/bindings/usb/renesas,usbf.yaml | 64 +++++++++++++++++++
> > 1 file changed, 64 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/usb/renesas,usbf.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/usb/renesas,usbf.yaml b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml
> > new file mode 100644
> > index 000000000000..f2b146d9d37b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml
> > @@ -0,0 +1,64 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/usb/renesas,usbf.yaml#
>
> Filename based on compatible, so renesas,rzn1-usbf.yaml.

Will be fixed in the v2 series.

>
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Renesas USBF (USB Function) controller binding
> > +
> > +description: |
> > + The Renesas USBF controller is an USB2.0 device
> > + controller (UDC).
> > +
> > +maintainers:
> > + - Herve Codina <[email protected]>
> > +
> > +properties:
> > + compatible:
> > + oneOf:
>
> You have only one possibility, so oneOf is not needed. Unless you
> already predict it will grow with new incompatible lists?

No new compatible planned right now. So, oneOf will be removed
in the v2 series.

>
> > + - items:
> > + - enum:
> > + - renesas,r9a06g032-usbf
> > + - const: renesas,rzn1-usbf
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + items:
> > + - description: Internal bus clock (AHB) for Function
> > + - description: Internal bus clock (AHB) for Power Management
>
> Blank line

Will be fixed in the v2 series

>
> > + clock-names:
> > + items:
> > + - const: hclkf
> > + - const: hclkpm
> > +
> > + interrupts:
> > + items:
> > + - description: The USBF EPC interrupt
> > + - description: The USBF AHB-EPC interrupt
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - clocks
> > + - clock-names
> > + - interrupts
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + #include <dt-bindings/clock/r9a06g032-sysctrl.h>
> > +
> > + usb@4001e000 {
> > + compatible = "renesas,r9a06g032-usbf", "renesas,rzn1-usbf";
> > + reg = <0x4001e000 0x2000>;
> > + interrupts =
>
> No need for line break. It's not helping in readability.

Will be fixed in the v2 series

>
>
> > + <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&sysctrl R9A06G032_HCLK_USBF>,
> > + <&sysctrl R9A06G032_HCLK_USBPM>;
> > + clock-names = "hclkf", "hclkpm";
> > + };
>
> Best regards,
> Krzysztof
>

Thanks for the review,
Hervé

--
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com