Messages in this thread | | | Subject | Re: [PATCH 2/7] dt-bindings: usb: dwc3: Add a gpio-usb-connector example | From | Stephen Boyd <> | Date | Wed, 18 Mar 2020 18:08:51 -0700 |
| |
Quoting Bryan O'Donoghue (2020-03-11 12:14:56) > A USB connector should be a child node of the USB controller > connector/usb-connector.txt. This patch adds an example of how to do this > to the dwc3 binding descriptions.
I read that as a child of the USB interface controller, which is not the same as the USB controller. For example, we're talking about having the usb connector be a child of the EC on ChromeOS devices because that manages the connector
> > It is necessary to declare a connector as a child-node of a USB controller > for role-switching to work, so this example should be helpful to others > implementing that.
Maybe it should be a virtual node at the root of the DT if it's GPIO controlled? And then the phy can be connected to the usb connector through the graph binding.
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: Rob Herring <robh+dt@kernel.org> > Cc: Mark Rutland <mark.rutland@arm.com> > Cc: linux-usb@vger.kernel.org > Cc: devicetree@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Acked-by: Felipe Balbi <balbi@kernel.org> > Reviewed-by: Rob Herring <robh@kernel.org> > Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > Documentation/devicetree/bindings/usb/dwc3.txt | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt > index 66780a47ad85..4e1e4afccee6 100644 > --- a/Documentation/devicetree/bindings/usb/dwc3.txt > +++ b/Documentation/devicetree/bindings/usb/dwc3.txt > @@ -121,4 +121,12 @@ dwc3@4a030000 { > interrupts = <0 92 4> > usb-phy = <&usb2_phy>, <&usb3,phy>;
Weird that there's a comma here ^
Not a problem with this patch, just noticing it while reading the diff.
> snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; > + > + usb_con: connector { > + compatible = "gpio-usb-b-connector"; > + id-gpios = <&tlmm 116 GPIO_ACTIVE_HIGH>; > + vbus-supply = <&usb3_vbus_reg>; > + pinctrl-names = "default"; > + pinctrl-0 = <&usb3_id_pin>, <&usb3_vbus_pin>; > + };
| |