diff mbox series

[RESEND,v7,1/3] dt-bindings: usb: hd3ss3220 device tree binding document

Message ID 1567584941-13690-2-git-send-email-biju.das@bp.renesas.com (mailing list archive)
State Mainlined
Commit 1918fa0d44985cbc8ab2f315c120525b207b2195
Delegated to: Geert Uytterhoeven
Headers show
Series Add USB3.0 and TI HD3SS3220 driver support | expand

Commit Message

Biju Das Sept. 4, 2019, 8:15 a.m. UTC
Add device tree binding document for TI HD3SS3220 Type-C DRP port
controller driver.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
V7--> V7 RESEND
   * Added Rob's Reviewed by tag.
v6-->V7
   * Removed Rob's reviewed by tag, since there is a rework
   * Incorporated Sergie and Shimoda-San's review comment
     (https://patchwork.kernel.org/patch/10944629/)
V5-->V6
  * No change.
V4-->V5
  * No Change.
V3-->V4
  * No Change.
V2-->V3
  * Added Rob's Reviewed by tag.
V1-->V2
  * Added connector node.
  * updated the example with connector node.
---
 .../devicetree/bindings/usb/ti,hd3ss3220.txt       | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt

Comments

Geert Uytterhoeven July 15, 2020, 8:43 a.m. UTC | #1
Hi Biju,

On Wed, Sep 4, 2019 at 10:22 AM Biju Das <biju.das@bp.renesas.com> wrote:
> Add device tree binding document for TI HD3SS3220 Type-C DRP port
> controller driver.
>
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Rob Herring <robh@kernel.org>

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
> @@ -0,0 +1,38 @@
> +TI HD3SS3220 TypeC DRP Port Controller.
> +
> +Required properties:
> + - compatible: Must be "ti,hd3ss3220".
> + - reg: I2C slave address, must be 0x47 or 0x67 based on ADDR pin.
> + - interrupts: An interrupt specifier.
> +
> +Required sub-node:
> + - connector: The "usb-c-connector" attached to the hd3ss3220 chip. The
> +   bindings of the connector node are specified in:
> +
> +       Documentation/devicetree/bindings/connector/usb-connector.txt
> +
> +Example:
> +hd3ss3220@47 {
> +       compatible = "ti,hd3ss3220";
> +       reg = <0x47>;
> +       interrupt-parent = <&gpio6>;
> +       interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> +
> +       connector {
> +               compatible = "usb-c-connector";
> +               label = "USB-C";
> +               data-role = "dual";
> +
> +               ports {
> +                       #address-cells = <1>;
> +                       #size-cells = <0>;
> +
> +                       port@1 {

This does not comply with
Documentation/devicetree/bindings/connector/usb-connector.yaml:

    connector: ports: 'port@0' is a required property

> +                               reg = <1>;
> +                               hd3ss3220_ep: endpoint {
> +                                       remote-endpoint = <&usb3_role_switch>;
> +                               };
> +                       };
> +               };
> +       };
> +};

Gr{oetje,eeting}s,

                        Geert
Lad Prabhakar July 15, 2020, 9:04 a.m. UTC | #2
+Biju.

> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: 15 July 2020 09:44
> To: Biju Das <biju.das@bp.renesas.com>
> Cc: Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Yoshihiro Shimoda
> <yoshihiro.shimoda.uh@renesas.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Heikki Krogerus
> <heikki.krogerus@linux.intel.com>; Felipe Balbi <balbi@kernel.org>; USB list <linux-usb@vger.kernel.org>; open list:OPEN FIRMWARE AND
> FLATTENED DEVICE TREE BINDINGS <devicetree@vger.kernel.org>; Simon Horman <horms@verge.net.au>; Geert Uytterhoeven
> <geert+renesas@glider.be>; Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro <fabrizio.castro@bp.renesas.com>; Linux-
> Renesas <linux-renesas-soc@vger.kernel.org>; Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Subject: Re: [PATCH RESEND v7 1/3] dt-bindings: usb: hd3ss3220 device tree binding document
>
> Hi Biju,
>
> On Wed, Sep 4, 2019 at 10:22 AM Biju Das <biju.das@bp.renesas.com> wrote:
> > Add device tree binding document for TI HD3SS3220 Type-C DRP port
> > controller driver.
> >
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
>
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
> > @@ -0,0 +1,38 @@
> > +TI HD3SS3220 TypeC DRP Port Controller.
> > +
> > +Required properties:
> > + - compatible: Must be "ti,hd3ss3220".
> > + - reg: I2C slave address, must be 0x47 or 0x67 based on ADDR pin.
> > + - interrupts: An interrupt specifier.
> > +
> > +Required sub-node:
> > + - connector: The "usb-c-connector" attached to the hd3ss3220 chip. The
> > +   bindings of the connector node are specified in:
> > +
> > +       Documentation/devicetree/bindings/connector/usb-connector.txt
> > +
> > +Example:
> > +hd3ss3220@47 {
> > +       compatible = "ti,hd3ss3220";
> > +       reg = <0x47>;
> > +       interrupt-parent = <&gpio6>;
> > +       interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> > +
> > +       connector {
> > +               compatible = "usb-c-connector";
> > +               label = "USB-C";
> > +               data-role = "dual";
> > +
> > +               ports {
> > +                       #address-cells = <1>;
> > +                       #size-cells = <0>;
> > +
> > +                       port@1 {
>
> This does not comply with
> Documentation/devicetree/bindings/connector/usb-connector.yaml:
>
>     connector: ports: 'port@0' is a required property
>
> > +                               reg = <1>;
> > +                               hd3ss3220_ep: endpoint {
> > +                                       remote-endpoint = <&usb3_role_switch>;
> > +                               };
> > +                       };
> > +               };
> > +       };
> > +};
>
> 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


Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647
Biju Das July 15, 2020, 11:42 a.m. UTC | #3
Hi Geert,

Thanks for the feedback.

> Subject: Re: [PATCH RESEND v7 1/3] dt-bindings: usb: hd3ss3220 device tree
> binding document
>
> Hi Biju,
>
> On Wed, Sep 4, 2019 at 10:22 AM Biju Das <biju.das@bp.renesas.com>
> wrote:
> > Add device tree binding document for TI HD3SS3220 Type-C DRP port
> > controller driver.
> >
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
>
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
> > @@ -0,0 +1,38 @@
> > +TI HD3SS3220 TypeC DRP Port Controller.
> > +
> > +Required properties:
> > + - compatible: Must be "ti,hd3ss3220".
> > + - reg: I2C slave address, must be 0x47 or 0x67 based on ADDR pin.
> > + - interrupts: An interrupt specifier.
> > +
> > +Required sub-node:
> > + - connector: The "usb-c-connector" attached to the hd3ss3220 chip. The
> > +   bindings of the connector node are specified in:
> > +
> > +       Documentation/devicetree/bindings/connector/usb-connector.txt
> > +
> > +Example:
> > +hd3ss3220@47 {
> > +       compatible = "ti,hd3ss3220";
> > +       reg = <0x47>;
> > +       interrupt-parent = <&gpio6>;
> > +       interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> > +
> > +       connector {
> > +               compatible = "usb-c-connector";
> > +               label = "USB-C";
> > +               data-role = "dual";
> > +
> > +               ports {
> > +                       #address-cells = <1>;
> > +                       #size-cells = <0>;
> > +
> > +                       port@1 {
>
> This does not comply with
> Documentation/devicetree/bindings/connector/usb-connector.yaml:
>
>     connector: ports: 'port@0' is a required property

But in RZ/G2E case, the connector is a SS capable connector.  May be we need to update required property
as port@0 or port@1? Please let me know

 -    required:
 -      - port@0
 +    anyOf:
 +      - required:
 +          - port@0
 +      - required:
 +          - port@1

Regards,
Biju

> > +                               reg = <1>;
> > +                               hd3ss3220_ep: endpoint {
> > +                                       remote-endpoint = <&usb3_role_switch>;
> > +                               };
> > +                       };
> > +               };
> > +       };
> > +};
>
> 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


Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647
Geert Uytterhoeven July 15, 2020, 3:37 p.m. UTC | #4
Hi Biju,

On Wed, Jul 15, 2020 at 1:42 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > Subject: Re: [PATCH RESEND v7 1/3] dt-bindings: usb: hd3ss3220 device tree
> > binding document
> >
> > On Wed, Sep 4, 2019 at 10:22 AM Biju Das <biju.das@bp.renesas.com>
> > wrote:
> > > Add device tree binding document for TI HD3SS3220 Type-C DRP port
> > > controller driver.
> > >
> > > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > > Reviewed-by: Rob Herring <robh@kernel.org>
> >
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
> > > @@ -0,0 +1,38 @@
> > > +TI HD3SS3220 TypeC DRP Port Controller.
> > > +
> > > +Required properties:
> > > + - compatible: Must be "ti,hd3ss3220".
> > > + - reg: I2C slave address, must be 0x47 or 0x67 based on ADDR pin.
> > > + - interrupts: An interrupt specifier.
> > > +
> > > +Required sub-node:
> > > + - connector: The "usb-c-connector" attached to the hd3ss3220 chip. The
> > > +   bindings of the connector node are specified in:
> > > +
> > > +       Documentation/devicetree/bindings/connector/usb-connector.txt
> > > +
> > > +Example:
> > > +hd3ss3220@47 {
> > > +       compatible = "ti,hd3ss3220";
> > > +       reg = <0x47>;
> > > +       interrupt-parent = <&gpio6>;
> > > +       interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> > > +
> > > +       connector {
> > > +               compatible = "usb-c-connector";
> > > +               label = "USB-C";
> > > +               data-role = "dual";
> > > +
> > > +               ports {
> > > +                       #address-cells = <1>;
> > > +                       #size-cells = <0>;
> > > +
> > > +                       port@1 {
> >
> > This does not comply with
> > Documentation/devicetree/bindings/connector/usb-connector.yaml:
> >
> >     connector: ports: 'port@0' is a required property
>
> But in RZ/G2E case, the connector is a SS capable connector.  May be we need to update required property
> as port@0 or port@1? Please let me know
>
>  -    required:
>  -      - port@0
>  +    anyOf:
>  +      - required:
>  +          - port@0
>  +      - required:
>  +          - port@1

May make sense.
I'd like to defer to the USB experts, though.

> > > +                               reg = <1>;
> > > +                               hd3ss3220_ep: endpoint {
> > > +                                       remote-endpoint = <&usb3_role_switch>;
> > > +                               };
> > > +                       };
> > > +               };
> > > +       };
> > > +};

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
new file mode 100644
index 0000000..25780e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
@@ -0,0 +1,38 @@ 
+TI HD3SS3220 TypeC DRP Port Controller.
+
+Required properties:
+ - compatible: Must be "ti,hd3ss3220".
+ - reg: I2C slave address, must be 0x47 or 0x67 based on ADDR pin.
+ - interrupts: An interrupt specifier.
+
+Required sub-node:
+ - connector: The "usb-c-connector" attached to the hd3ss3220 chip. The
+   bindings of the connector node are specified in:
+
+	Documentation/devicetree/bindings/connector/usb-connector.txt
+
+Example:
+hd3ss3220@47 {
+	compatible = "ti,hd3ss3220";
+	reg = <0x47>;
+	interrupt-parent = <&gpio6>;
+	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+
+	connector {
+		compatible = "usb-c-connector";
+		label = "USB-C";
+		data-role = "dual";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@1 {
+				reg = <1>;
+				hd3ss3220_ep: endpoint {
+					remote-endpoint = <&usb3_role_switch>;
+				};
+			};
+		};
+	};
+};