Messages in this thread | | | Subject | Re: [PATCH v3 06/19] dt-bindings: usb: dwc3: Add a gpio-usb-connector description | From | Bryan O'Donoghue <> | Date | Tue, 4 Feb 2020 23:54:03 +0000 |
| |
On 27/01/2020 18:43, Rob Herring wrote: > On Wed, Jan 22, 2020 at 06:55:57PM +0000, Bryan O'Donoghue wrote: >> A USB connector should be a child node of the USB controller >> connector/usb-connector.txt. This patch adds a property >> "gpio_usb_connector" which declares a connector child device. Code in the >> DWC3 driver will then >> >> - Search for "gpio_usb_controller" >> - Do an of_platform_populate() if found >> >> This will have the effect of making the declared node a child of the USB >> controller and will make sure that USB role-switch events detected with the >> gpio_usb_controller driver propagate into the DWC3 controller code >> appropriately. > > This is all driver specifics. This is a binding patch. > >> >> 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 >> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> >> --- >> Documentation/devicetree/bindings/usb/dwc3.txt | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt >> index 66780a47ad85..b019bd472f83 100644 >> --- a/Documentation/devicetree/bindings/usb/dwc3.txt >> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt >> @@ -108,6 +108,9 @@ Optional properties: >> When just one value, which means INCRX burst mode enabled. When >> more than one value, which means undefined length INCR burst type >> enabled. The values can be 1, 4, 8, 16, 32, 64, 128 and 256. >> + - gpio_usb_connector: Declares a USB connector named 'gpio_usb_connector' as a >> + child node of the DWC3 block. Use when modelling a USB >> + connector based on the gpio-usb-b-connector driver. > > Should be just 'connector'. That's already implicitly allowed for any > USB controller, so you don't really need a binding change. And the > specific type of connector is outside the scope of the DWC3 binding. > >> >> - in addition all properties from usb-xhci.txt from the current directory are >> supported as well >> @@ -121,4 +124,12 @@ dwc3@4a030000 { >> interrupts = <0 92 4> >> usb-phy = <&usb2_phy>, <&usb3,phy>; >> snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; >> + usb_con: gpio_usb_connector { >> + compatible = "gpio-usb-b-connector"; >> + id-gpio = <&tlmm 116 GPIO_ACTIVE_HIGH>; >> + vbus-gpio = <&pms405_gpios 12 GPIO_ACTIVE_HIGH>; > > *-gpios is the preferred form and should be what's documented.
Hi Rob,
If I've understood you right here you don't favour documenting a new binding but you're OK with adding an example ?
--- bod
| |