Message ID | alpine.LNX.2.00.1704241846300.15211@T420s (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Apr 24, 2017 at 6:53 PM, Hans Ulli Kroll <ulli.kroll@googlemail.com> wrote: > Got NAK'ed from Rob on some ealier round due missing "device mode" on this > IP. I've blatantly overrided this to a host only driver. > > These are the needed changes in DT to support both modes > Note the -dr at the end of fotg210, to reflect this in an dual role device OK I understood the discussion such that the compatible should simply be ""faraday,fotg210" as that is the name of the hardware IP block. This is the name of the hardware name in the Faraday page: http://www.faraday-tech.com/html/Product/IPProduct/InterfaceIP/USB2_0.htm Any other string implies how it is used, so that was what I understood as the reason to reject it with the "-hcd" (host controller device) suffix. > +- dr_mode : indicates the working mode for "fotg210-dr" compatible > + controllers. Can be "host", "peripheral". Default to > + "host" if not defined for backward compatibility. This seems right, so it is part of the generic bindings, correct? > usb@68000000 { > - compatible = "cortina,gemini-usb", "faraday,fotg210"; > + compatible = "cortina,gemini-usb", "faraday,fotg210-dr"; But this would be wrong, because the compatible should only indicate what kind of hardware it is, not how it is going to be used (whether as host only, slave only or dual-role (OTG). I hope I didn't get anything wrong here :/ Yours, Linus Walleij
Hi Linus On Tue, 25 Apr 2017, Linus Walleij wrote: > On Mon, Apr 24, 2017 at 6:53 PM, Hans Ulli Kroll > <ulli.kroll@googlemail.com> wrote: > > > Got NAK'ed from Rob on some ealier round due missing "device mode" on this > > IP. I've blatantly overrided this to a host only driver. > > > > These are the needed changes in DT to support both modes > > Note the -dr at the end of fotg210, to reflect this in an dual role device > > OK I understood the discussion such that the compatible should > simply be ""faraday,fotg210" as that is the name of the hardware > IP block. This is the name of the hardware name in the Faraday > page: > http://www.faraday-tech.com/html/Product/IPProduct/InterfaceIP/USB2_0.htm > > Any other string implies how it is used, so that was what I understood > as the reason to reject it with the "-hcd" (host controller device) suffix. > > > +- dr_mode : indicates the working mode for "fotg210-dr" compatible > > + controllers. Can be "host", "peripheral". Default to > > + "host" if not defined for backward compatibility. > > This seems right, so it is part of the generic bindings, correct? > > > usb@68000000 { > > - compatible = "cortina,gemini-usb", "faraday,fotg210"; > > + compatible = "cortina,gemini-usb", "faraday,fotg210-dr"; > > But this would be wrong, because the compatible should only > indicate what kind of hardware it is, not how it is going to be used > (whether as host only, slave only or dual-role (OTG). > for compatible I think yes. But in Rob's opinion we missed the device part of the controller. Greetings Hans Ulli Kroll
diff --git a/Documentation/devicetree/bindings/usb/faraday,fotg210.txt b/Documentation/devicetree/bindings/usb/faraday,fotg210.txt index cf06808303e2..862cda19e9d3 100644 --- a/Documentation/devicetree/bindings/usb/faraday,fotg210.txt +++ b/Documentation/devicetree/bindings/usb/faraday,fotg210.txt @@ -13,6 +13,9 @@ Required properties: Optional properties: - clocks: should contain the IP block clock - clock-names: should be "PCLK" for the IP block clock +- dr_mode : indicates the working mode for "fotg210-dr" compatible + controllers. Can be "host", "peripheral". Default to + "host" if not defined for backward compatibility. Required properties for "cortina,gemini-usb" compatible: - syscon: a phandle to the system controller to access PHY registers @@ -25,7 +28,7 @@ Optional properties for "cortina,gemini-usb" compatible: Example for Gemini: usb@68000000 { - compatible = "cortina,gemini-usb", "faraday,fotg210"; + compatible = "cortina,gemini-usb", "faraday,fotg210-dr"; reg = <0x68000000 0x1000>; interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cc 12>;