* [PATCH 1/5 v3] usb: host: add DT bindings for faraday fotg2
@ 2017-04-21 20:40 Linus Walleij
2017-04-24 16:53 ` Hans Ulli Kroll
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2017-04-21 20:40 UTC (permalink / raw)
To: Hans Ulli Kroll, Florian Fainelli,
linux-usb-u79uwXL29TY76Z2rM5mHXA, Greg Kroah-Hartman
Cc: Janos Laube, Paulius Zaleckas,
openwrt-devel-p3rKhJxN3npAfugRpC6u6w,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA, Linus Walleij
From: Hans Ulli Kroll <ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
This adds device tree bindings for the Faraday FOTG2
dual-mode host controller.
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Hans Ulli Kroll <ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
ChangeLog v1->v3:
- Change compatible to "faraday,fotg210" as the name of the
hardware block.
- Add an elaborate SoC-specific compatible string for the
Cortina Systems Gemini so that SoC-specific features can
be enabled.
- Add cortina,gemini-mini-b to indicate a Gemini PHY with
a Mini-B adapter connected.
- Indicated that the Gemini version can handle "wakeup-source".
- Add optional IP block clock.
---
.../devicetree/bindings/usb/faraday,fotg210.txt | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/faraday,fotg210.txt
diff --git a/Documentation/devicetree/bindings/usb/faraday,fotg210.txt b/Documentation/devicetree/bindings/usb/faraday,fotg210.txt
new file mode 100644
index 000000000000..cf06808303e2
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/faraday,fotg210.txt
@@ -0,0 +1,35 @@
+Faraday FOTG Host controller
+
+This OTG-capable USB host controller is found in Cortina Systems
+Gemini and other SoC products.
+
+Required properties:
+- compatible: should be one of:
+ "faraday,fotg210"
+ "cortina,gemini-usb", "faraday,fotg210"
+- reg: should contain one register range i.e. start and length
+- interrupts: description of the interrupt line
+
+Optional properties:
+- clocks: should contain the IP block clock
+- clock-names: should be "PCLK" for the IP block clock
+
+Required properties for "cortina,gemini-usb" compatible:
+- syscon: a phandle to the system controller to access PHY registers
+
+Optional properties for "cortina,gemini-usb" compatible:
+- cortina,gemini-mini-b: boolean property that indicates that a Mini-B
+ OTH connector is in use
+- wakeup-source: see power/wakeup-source.txt
+
+Example for Gemini:
+
+usb@68000000 {
+ compatible = "cortina,gemini-usb", "faraday,fotg210";
+ reg = <0x68000000 0x1000>;
+ interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cc 12>;
+ clock-names = "PCLK";
+ syscon = <&syscon>;
+ wakeup-source;
+};
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5 v3] usb: host: add DT bindings for faraday fotg2
2017-04-21 20:40 [PATCH 1/5 v3] usb: host: add DT bindings for faraday fotg2 Linus Walleij
@ 2017-04-24 16:53 ` Hans Ulli Kroll
2017-04-25 8:12 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Hans Ulli Kroll @ 2017-04-24 16:53 UTC (permalink / raw)
To: Linus Walleij
Cc: openwrt-devel, devicetree, Paulius Zaleckas, Greg Kroah-Hartman,
linux-usb, Janos Laube, linux-arm-kernel
Hi Linus
On Fri, 21 Apr 2017, Linus Walleij wrote:
> From: Hans Ulli Kroll <ulli.kroll@googlemail.com>
>
> This adds device tree bindings for the Faraday FOTG2
> dual-mode host controller.
>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v3:
> - Change compatible to "faraday,fotg210" as the name of the
> hardware block.
> - Add an elaborate SoC-specific compatible string for the
> Cortina Systems Gemini so that SoC-specific features can
> be enabled.
> - Add cortina,gemini-mini-b to indicate a Gemini PHY with
> a Mini-B adapter connected.
> - Indicated that the Gemini version can handle "wakeup-source".
> - Add optional IP block clock.
> ---
> .../devicetree/bindings/usb/faraday,fotg210.txt | 35 ++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/usb/faraday,fotg210.txt
>
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
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>;
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5 v3] usb: host: add DT bindings for faraday fotg2
2017-04-24 16:53 ` Hans Ulli Kroll
@ 2017-04-25 8:12 ` Linus Walleij
[not found] ` <CACRpkda-2OQZJDQndrDg_d4iK4oecz4HNSCQPSztBFTG5Rwg8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2017-04-25 8:12 UTC (permalink / raw)
To: Hans Ulli Kroll
Cc: openwrt-devel, devicetree@vger.kernel.org, Paulius Zaleckas,
Greg Kroah-Hartman, linux-usb@vger.kernel.org, Janos Laube,
linux-arm-kernel@lists.infradead.org
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
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5 v3] usb: host: add DT bindings for faraday fotg2
[not found] ` <CACRpkda-2OQZJDQndrDg_d4iK4oecz4HNSCQPSztBFTG5Rwg8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-04-25 19:07 ` Hans Ulli Kroll
0 siblings, 0 replies; 4+ messages in thread
From: Hans Ulli Kroll @ 2017-04-25 19:07 UTC (permalink / raw)
To: Linus Walleij
Cc: Hans Ulli Kroll, Florian Fainelli,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Greg Kroah-Hartman, Janos Laube, Paulius Zaleckas,
openwrt-devel-p3rKhJxN3npAfugRpC6u6w,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Linus
On Tue, 25 Apr 2017, Linus Walleij wrote:
> On Mon, Apr 24, 2017 at 6:53 PM, Hans Ulli Kroll
> <ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-25 19:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21 20:40 [PATCH 1/5 v3] usb: host: add DT bindings for faraday fotg2 Linus Walleij
2017-04-24 16:53 ` Hans Ulli Kroll
2017-04-25 8:12 ` Linus Walleij
[not found] ` <CACRpkda-2OQZJDQndrDg_d4iK4oecz4HNSCQPSztBFTG5Rwg8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-25 19:07 ` Hans Ulli Kroll
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).