* [4/5] arm64: allwinner: h6: add USB3 device nodes
@ 2018-05-07 15:18 Icenowy Zheng
0 siblings, 0 replies; 3+ messages in thread
From: Icenowy Zheng @ 2018-05-07 15:18 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai,
Greg Kroah-Hartman, Kishon Vijay Abraham I, Felipe Balbi
Cc: devicetree, linux-arm-kernel, linux-kernel, linux-usb,
linux-sunxi, Icenowy Zheng
Allwinner H6 SoC features USB3 functionality, with a DWC3 controller and
a custom PHY.
Add device tree nodes for them.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index c72da8cd9ef5..9564c938717c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -174,6 +174,44 @@
status = "disabled";
};
+ usb3: usb@5200000 {
+ compatible = "allwinner,sun50i-h6-dwc3";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ clocks = <&ccu CLK_BUS_XHCI>;
+ clock-names = "bus";
+ resets = <&ccu RST_BUS_XHCI>;
+ reset-names = "bus";
+ status = "disabled";
+
+ dwc3: dwc3 {
+ compatible = "snps,dwc3";
+ reg = <0x5200000 0x10000>;
+ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+ /*
+ * According to Wink from Allwinner, the
+ * USB3 port on H6 is not capable of OTG;
+ * the datasheet doesn't mention OTG at all
+ * either, so the dr_mode is default to
+ * "host" here.
+ */
+ dr_mode = "host";
+ phys = <&usb3phy>;
+ phy-names = "usb3-phy";
+ status = "disabled";
+ };
+ };
+
+ usb3phy: phy@5210000 {
+ compatible = "allwinner,sun50i-h6-usb3-phy";
+ reg = <0x5210000 0x10000>;
+ clocks = <&ccu CLK_USB_PHY1>;
+ resets = <&ccu RST_USB_PHY1>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
r_ccu: clock@7010000 {
compatible = "allwinner,sun50i-h6-r-ccu";
reg = <0x07010000 0x400>;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [4/5] arm64: allwinner: h6: add USB3 device nodes
@ 2018-05-08 8:31 Sergei Shtylyov
0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2018-05-08 8:31 UTC (permalink / raw)
To: Icenowy Zheng, Rob Herring, Mark Rutland, Maxime Ripard,
Chen-Yu Tsai, Greg Kroah-Hartman, Kishon Vijay Abraham I,
Felipe Balbi
Cc: devicetree, linux-arm-kernel, linux-kernel, linux-usb,
linux-sunxi
Hello!
On 5/7/2018 6:18 PM, Icenowy Zheng wrote:
> Allwinner H6 SoC features USB3 functionality, with a DWC3 controller and
> a custom PHY.
>
> Add device tree nodes for them.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
> arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> index c72da8cd9ef5..9564c938717c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -174,6 +174,44 @@
> status = "disabled";
> };
>
> + usb3: usb@5200000 {
I don't think <unit-address> is allowed for a node having no "reg" prop...
> + compatible = "allwinner,sun50i-h6-dwc3";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> + clocks = <&ccu CLK_BUS_XHCI>;
> + clock-names = "bus";
> + resets = <&ccu RST_BUS_XHCI>;
> + reset-names = "bus";
> + status = "disabled";
> +
> + dwc3: dwc3 {
Contrariwise, need <unit-address> here...
> + compatible = "snps,dwc3";
> + reg = <0x5200000 0x10000>;
> + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> + /*
> + * According to Wink from Allwinner, the
> + * USB3 port on H6 is not capable of OTG;
> + * the datasheet doesn't mention OTG at all
> + * either, so the dr_mode is default to
> + * "host" here.
> + */
> + dr_mode = "host";
> + phys = <&usb3phy>;
> + phy-names = "usb3-phy";
> + status = "disabled";
> + };
> + };
[...]
MBR, Sergei
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* [4/5] arm64: allwinner: h6: add USB3 device nodes
@ 2018-05-22 20:09 Rob Herring
0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2018-05-22 20:09 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Icenowy Zheng, Mark Rutland, Maxime Ripard, Chen-Yu Tsai,
Greg Kroah-Hartman, Kishon Vijay Abraham I, Felipe Balbi,
devicetree, linux-arm-kernel, linux-kernel, linux-usb,
linux-sunxi
On Tue, May 08, 2018 at 11:31:27AM +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 5/7/2018 6:18 PM, Icenowy Zheng wrote:
>
> > Allwinner H6 SoC features USB3 functionality, with a DWC3 controller and
> > a custom PHY.
> >
> > Add device tree nodes for them.
> >
> > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> > ---
> > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++
> > 1 file changed, 38 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > index c72da8cd9ef5..9564c938717c 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > @@ -174,6 +174,44 @@
> > status = "disabled";
> > };
> > + usb3: usb@5200000 {
>
> I don't think <unit-address> is allowed for a node having no "reg" prop...
Right. One way to fix is fill out ranges property because the unit
address can come from either.
However, there's work to deprecate doing DWC3 binding with a child node
like this. See the series "usb: dwc3: support clocks and resets for DWC3
core". Please follow that.
Rob
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-22 20:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-22 20:09 [4/5] arm64: allwinner: h6: add USB3 device nodes Rob Herring
-- strict thread matches above, loose matches on Subject: below --
2018-05-08 8:31 Sergei Shtylyov
2018-05-07 15:18 Icenowy Zheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox