linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: update usb-c-connector required property
@ 2020-07-17  7:34 Biju Das
  2020-07-17  7:34 ` [PATCH 2/2] dt-bindings: usb: convert ti,hd3ss3220 bindings to json-schema Biju Das
  2020-07-17  7:54 ` [PATCH 1/2] dt-bindings: update usb-c-connector required property Prashant Malani
  0 siblings, 2 replies; 6+ messages in thread
From: Biju Das @ 2020-07-17  7:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring
  Cc: Biju Das, Mark Brown, Alexandre Belloni, Maxime Ripard,
	Lee Jones, Prashant Malani, Thierry Reding, linux-usb,
	devicetree, Geert Uytterhoeven, Yoshihiro Shimoda,
	Heikki Krogerus, Felipe Balbi, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, linux-renesas-soc

Some boards have a single SS capable connector. Update usb-c-connector
bindings to list port@1 as at least one of the required property.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 Ref: https://patchwork.kernel.org/patch/11129567/
---
 Documentation/devicetree/bindings/connector/usb-connector.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
index 9bd52e6..41e0685 100644
--- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
+++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
@@ -139,8 +139,11 @@ properties:
         description: Sideband Use (SBU), present in USB-C. This describes the
           alternate mode connection of which SBU is a part.
 
-    required:
-      - port@0
+    anyOf:
+      - required:
+        - port@0
+      - required:
+        - port@1
 
 required:
   - compatible
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] dt-bindings: usb: convert ti,hd3ss3220 bindings to json-schema
  2020-07-17  7:34 [PATCH 1/2] dt-bindings: update usb-c-connector required property Biju Das
@ 2020-07-17  7:34 ` Biju Das
  2020-07-17  7:54 ` [PATCH 1/2] dt-bindings: update usb-c-connector required property Prashant Malani
  1 sibling, 0 replies; 6+ messages in thread
From: Biju Das @ 2020-07-17  7:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring
  Cc: Lad Prabhakar, Biju Das, linux-usb, devicetree,
	Geert Uytterhoeven, Yoshihiro Shimoda, Heikki Krogerus,
	Felipe Balbi, Chris Paterson, Biju Das, linux-renesas-soc

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Convert ti,hd3ss3220.txt to YAML.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 .../devicetree/bindings/usb/ti,hd3ss3220.txt       | 38 ------------
 .../devicetree/bindings/usb/ti,hd3ss3220.yaml      | 70 ++++++++++++++++++++++
 2 files changed, 70 insertions(+), 38 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
 create mode 100644 Documentation/devicetree/bindings/usb/ti,hd3ss3220.yaml

diff --git a/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
deleted file mode 100644
index 2bd21b2..0000000
--- a/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-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.yaml
-
-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>;
-				};
-			};
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/usb/ti,hd3ss3220.yaml b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.yaml
new file mode 100644
index 0000000..cd7b124
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/ti,hd3ss3220.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI HD3SS3220 TypeC DRP Port Controller
+
+maintainers:
+  - Biju Das <biju.das.jz@bp.renesas.com>
+
+description: |-
+  HD3SS3220 is a USB SuperSpeed (SS) 2:1 mux with DRP port controller. The device provides Channel
+  Configuration (CC) logic and 5V VCONN sourcing for ecosystems implementing USB Type-C. The
+  HD3SS3220 can be configured as a Downstream Facing Port (DFP), Upstream Facing Port (UFP) or a
+  Dual Role Port (DRP) making it ideal for any application.
+
+properties:
+  compatible:
+   const: ti,hd3ss3220
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  connector:
+    $ref: /schemas/connector/usb-connector.yaml#
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        hd3ss3220@47 {
+            compatible = "ti,hd3ss3220";
+            reg = <0x47>;
+            interrupt-parent = <&gpio6>;
+            interrupts = <3>;
+
+            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>;
+                        };
+                    };
+                };
+            };
+        };
+    };
+
+...
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: update usb-c-connector required property
  2020-07-17  7:34 [PATCH 1/2] dt-bindings: update usb-c-connector required property Biju Das
  2020-07-17  7:34 ` [PATCH 2/2] dt-bindings: usb: convert ti,hd3ss3220 bindings to json-schema Biju Das
@ 2020-07-17  7:54 ` Prashant Malani
  2020-07-17  8:09   ` Biju Das
  1 sibling, 1 reply; 6+ messages in thread
From: Prashant Malani @ 2020-07-17  7:54 UTC (permalink / raw)
  To: Biju Das
  Cc: Greg Kroah-Hartman, Rob Herring, Mark Brown, Alexandre Belloni,
	Maxime Ripard, Lee Jones, Thierry Reding, linux-usb, devicetree,
	Geert Uytterhoeven, Yoshihiro Shimoda, Heikki Krogerus,
	Felipe Balbi, Chris Paterson, Biju Das, Prabhakar Mahadev Lad,
	linux-renesas-soc

Hi Biju,

On Fri, Jul 17, 2020 at 08:34:33AM +0100, Biju Das wrote:
> Some boards have a single SS capable connector. Update usb-c-connector
> bindings to list port@1 as at least one of the required property.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
>  Ref: https://patchwork.kernel.org/patch/11129567/
> ---
>  Documentation/devicetree/bindings/connector/usb-connector.yaml | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> index 9bd52e6..41e0685 100644
> --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> @@ -139,8 +139,11 @@ properties:
>          description: Sideband Use (SBU), present in USB-C. This describes the
>            alternate mode connection of which SBU is a part.
>  
> -    required:
> -      - port@0
> +    anyOf:
> +      - required:
> +        - port@0
> +      - required:
> +        - port@1

So the connector[1] doesn't have any High Speed (D+/D-) lanes? Those are
supposed to be present on all Type C connectors.

[1] : https://patchwork.kernel.org/patch/11129567/

Regards,

-Prashant
>  
>  required:
>    - compatible
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] dt-bindings: update usb-c-connector required property
  2020-07-17  7:54 ` [PATCH 1/2] dt-bindings: update usb-c-connector required property Prashant Malani
@ 2020-07-17  8:09   ` Biju Das
  2020-07-17  8:30     ` Geert Uytterhoeven
  0 siblings, 1 reply; 6+ messages in thread
From: Biju Das @ 2020-07-17  8:09 UTC (permalink / raw)
  To: Prashant Malani
  Cc: Greg Kroah-Hartman, Rob Herring, Mark Brown, Alexandre Belloni,
	Maxime Ripard, Lee Jones, Thierry Reding, linux-usb, devicetree,
	Geert Uytterhoeven, Yoshihiro Shimoda, Heikki Krogerus,
	Felipe Balbi, Chris Paterson, Biju Das, Prabhakar Mahadev Lad,
	linux-renesas-soc

Hi Prashant,

Thanks for the feedback.

> On Fri, Jul 17, 2020 at 08:34:33AM +0100, Biju Das wrote:
> > Some boards have a single SS capable connector. Update usb-c-connector
> > bindings to list port@1 as at least one of the required property.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-
> lad.rj@bp.renesas.com>
> > ---
> >  Ref: https://patchwork.kernel.org/patch/11129567/
> > ---
> >  Documentation/devicetree/bindings/connector/usb-connector.yaml | 7
> > +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > index 9bd52e6..41e0685 100644
> > --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > +++ b/Documentation/devicetree/bindings/connector/usb-
> connector.yaml
> > @@ -139,8 +139,11 @@ properties:
> >          description: Sideband Use (SBU), present in USB-C. This describes the
> >            alternate mode connection of which SBU is a part.
> >
> > -    required:
> > -      - port@0
> > +    anyOf:
> > +      - required:
> > +        - port@0
> > +      - required:
> > +        - port@1
>
> So the connector[1] doesn't have any High Speed (D+/D-) lanes? Those are
> supposed to be present on all Type C connectors.

Yes , USB-TypeC connector has  USB3HS0_DP and USB3HS0_DM signals apart from USB3S0_CLK_P, USB3S0_CLK_M,USB3S0_RX_P,USB3S0_RX_M,USB3S0_TX_P,USB3S0_TX_M,
USB3HS0_DP,USB3HS0_DM, USB30_PWEN and USB30_OVC.

But the Connector is a SS Capable connector which supports UFP/DFP and DRP.

Cheers,
Biju

> [1] : https://patchwork.kernel.org/patch/11129567/
>
> Regards,
>
> -Prashant
> >
> >  required:
> >    - compatible
> > --
> > 2.7.4
> >


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: update usb-c-connector required property
  2020-07-17  8:09   ` Biju Das
@ 2020-07-17  8:30     ` Geert Uytterhoeven
  2020-08-03  9:33       ` Biju Das
  0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2020-07-17  8:30 UTC (permalink / raw)
  To: Biju Das
  Cc: Prashant Malani, Greg Kroah-Hartman, Rob Herring, Mark Brown,
	Alexandre Belloni, Maxime Ripard, Lee Jones, Thierry Reding,
	linux-usb, devicetree, Yoshihiro Shimoda, Heikki Krogerus,
	Felipe Balbi, Chris Paterson, Biju Das, Prabhakar Mahadev Lad,
	linux-renesas-soc

Hi Biju,

On Fri, Jul 17, 2020 at 10:09 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > On Fri, Jul 17, 2020 at 08:34:33AM +0100, Biju Das wrote:
> > > Some boards have a single SS capable connector. Update usb-c-connector
> > > bindings to list port@1 as at least one of the required property.
> > >
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-
> > lad.rj@bp.renesas.com>
> > > ---
> > >  Ref: https://patchwork.kernel.org/patch/11129567/
> > > ---
> > >  Documentation/devicetree/bindings/connector/usb-connector.yaml | 7
> > > +++++--
> > >  1 file changed, 5 insertions(+), 2 deletions(-)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > > b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > > index 9bd52e6..41e0685 100644
> > > --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > > +++ b/Documentation/devicetree/bindings/connector/usb-
> > connector.yaml
> > > @@ -139,8 +139,11 @@ properties:
> > >          description: Sideband Use (SBU), present in USB-C. This describes the
> > >            alternate mode connection of which SBU is a part.
> > >
> > > -    required:
> > > -      - port@0
> > > +    anyOf:
> > > +      - required:
> > > +        - port@0
> > > +      - required:
> > > +        - port@1
> >
> > So the connector[1] doesn't have any High Speed (D+/D-) lanes? Those are
> > supposed to be present on all Type C connectors.
>
> Yes , USB-TypeC connector has  USB3HS0_DP and USB3HS0_DM signals apart from USB3S0_CLK_P, USB3S0_CLK_M,USB3S0_RX_P,USB3S0_RX_M,USB3S0_TX_P,USB3S0_TX_M,
> USB3HS0_DP,USB3HS0_DM, USB30_PWEN and USB30_OVC.
>
> But the Connector is a SS Capable connector which supports UFP/DFP and DRP.

The SS lanes of the connector are tied to the HD3SS3220.
The D+/D- lanes of the connector are tied to the R-Car SoC directly.

Perhaps modelling the C connector as a child of the HD3SS3220 is the
issue?  If the C connector was a separate node, it could have port@1
point to the HD3SS3220, and port@0 to the SoC?
That means there needs to be a different way to link the HD3SS3220 and
the on-SoC usb3_peri0.  The current link between usb3_peri0 and
hd3ss3220_ep looks a bit strange to me, as the latter label points to
the C connector, not to the HD3SS3220 itself[2].

> > [1] : https://patchwork.kernel.org/patch/11129567/

[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] dt-bindings: update usb-c-connector required property
  2020-07-17  8:30     ` Geert Uytterhoeven
@ 2020-08-03  9:33       ` Biju Das
  0 siblings, 0 replies; 6+ messages in thread
From: Biju Das @ 2020-08-03  9:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Prashant Malani, Greg Kroah-Hartman, Rob Herring, Mark Brown,
	Alexandre Belloni, Maxime Ripard, Lee Jones, Thierry Reding,
	linux-usb, devicetree, Yoshihiro Shimoda, Heikki Krogerus,
	Felipe Balbi, Chris Paterson, Biju Das, Prabhakar Mahadev Lad,
	linux-renesas-soc

Hi Geert,

Thanks for the feedback.

> Subject: Re: [PATCH 1/2] dt-bindings: update usb-c-connector required
> property
>
> Hi Biju,
>
> On Fri, Jul 17, 2020 at 10:09 AM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > > On Fri, Jul 17, 2020 at 08:34:33AM +0100, Biju Das wrote:
> > > > Some boards have a single SS capable connector. Update
> > > > usb-c-connector bindings to list port@1 as at least one of the required
> property.
> > > >
> > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-
> > > lad.rj@bp.renesas.com>
> > > > ---
> > > >  Ref: https://patchwork.kernel.org/patch/11129567/
> > > > ---
> > > >  Documentation/devicetree/bindings/connector/usb-connector.yaml |
> > > > 7
> > > > +++++--
> > > >  1 file changed, 5 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > > > b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > > > index 9bd52e6..41e0685 100644
> > > > ---
> > > > a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > > > +++ b/Documentation/devicetree/bindings/connector/usb-
> > > connector.yaml
> > > > @@ -139,8 +139,11 @@ properties:
> > > >          description: Sideband Use (SBU), present in USB-C. This describes
> the
> > > >            alternate mode connection of which SBU is a part.
> > > >
> > > > -    required:
> > > > -      - port@0
> > > > +    anyOf:
> > > > +      - required:
> > > > +        - port@0
> > > > +      - required:
> > > > +        - port@1
> > >
> > > So the connector[1] doesn't have any High Speed (D+/D-) lanes? Those
> > > are supposed to be present on all Type C connectors.
> >
> > Yes , USB-TypeC connector has  USB3HS0_DP and USB3HS0_DM signals
> apart
> > from USB3S0_CLK_P,
> >
> USB3S0_CLK_M,USB3S0_RX_P,USB3S0_RX_M,USB3S0_TX_P,USB3S0_TX_M,
> > USB3HS0_DP,USB3HS0_DM, USB30_PWEN and USB30_OVC.
> >
> > But the Connector is a SS Capable connector which supports UFP/DFP and
> DRP.
>
> The SS lanes of the connector are tied to the HD3SS3220.
> The D+/D- lanes of the connector are tied to the R-Car SoC directly.
>
> Perhaps modelling the C connector as a child of the HD3SS3220 is the issue?
> If the C connector was a separate node, it could have port@1 point to the
> HD3SS3220, and port@0 to the SoC?
> That means there needs to be a different way to link the HD3SS3220 and the
> on-SoC usb3_peri0.  The current link between usb3_peri0 and hd3ss3220_ep
> looks a bit strange to me, as the latter label points to the C connector, not to
> the HD3SS3220 itself[2].
>
> > > [1] : https://patchwork.kernel.org/patch/11129567/
>
> [2]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/
> arm64/boot/dts/renesas/r8a774c0-cat874.dts

Yes as you suggested, we could remodel this as per schematic.

1) Connector-->SoC(HS line)
2) Connector --> HD3SS3220-->SoC (SS line)

So the Graph will look like
--------------------------------
1) Connector
  --port0 (hs_ep --> usb3_hs_ep(SoC)
  -- port1 (ss_ep-->hd3ss3220_in_ep)

2) HD3SS320
-- port0 (hd3ss3220_in_ep --> ss_ep (connector)
-- port1 (hd3ss3220_out_ep --> usb3_role_switch (SoC)

3) SoC
-- port0 (usb3_hs_ep --> hs_ep (connector)
-- port1 (usb3_role_switch --> hd3ss3220_out_ep

 I will send patch as per the above model. Please correct me if any thing wrong.

Regards,
Biju



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-03  9:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17  7:34 [PATCH 1/2] dt-bindings: update usb-c-connector required property Biju Das
2020-07-17  7:34 ` [PATCH 2/2] dt-bindings: usb: convert ti,hd3ss3220 bindings to json-schema Biju Das
2020-07-17  7:54 ` [PATCH 1/2] dt-bindings: update usb-c-connector required property Prashant Malani
2020-07-17  8:09   ` Biju Das
2020-07-17  8:30     ` Geert Uytterhoeven
2020-08-03  9:33       ` Biju Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).