* [RFC PATCH 1/2] arm64: dts: add MUSB node to Allwinner A64 dtsi
@ 2016-11-22 16:59 Icenowy Zheng
[not found] ` <20161122165902.62543-1-icenowy-ymACFijhrKM@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Icenowy Zheng @ 2016-11-22 16:59 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai, Hans de Goede
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng
Allwinner A64 SoC has a MUSB controller like the one in A33, so add
a node for it, just use the compatible of A33 MUSB.
Host mode is tested to work properly on Pine64 and will be added into
the device tree of Pine64 in next patch.
Peripheral mode is also tested on Pine64, by changing dr_mode property
of usb_otg node and use a non-standard USB Type-A to Type-A cable.
Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
---
This patchset depends on my patch which adds usbphy to A64 dtsi.
( http://lists.infradead.org/pipermail/linux-arm-kernel/2016-November/469561.html )
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 2572dd6..261324a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -122,6 +122,19 @@
#size-cells = <1>;
ranges;
+ usb_otg: usb@01c19000 {
+ compatible = "allwinner,sun8i-a33-musb";
+ reg = <0x01c19000 0x0400>;
+ clocks = <&ccu CLK_BUS_OTG>;
+ resets = <&ccu RST_BUS_OTG>;
+ interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "mc";
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ extcon = <&usbphy 0>;
+ status = "disabled";
+ };
+
usbphy: phy@01c19400 {
compatible = "allwinner,sun50i-a64-usb-phy";
reg = <0x01c19400 0x14>,
--
2.10.2
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20161122165902.62543-1-icenowy-ymACFijhrKM@public.gmane.org>]
* [RFC PATCH 2/2] arm64: dts: enable the MUSB controller of Pine64 in host-only mode [not found] ` <20161122165902.62543-1-icenowy-ymACFijhrKM@public.gmane.org> @ 2016-11-22 16:59 ` Icenowy Zheng [not found] ` <20161122165902.62543-2-icenowy-ymACFijhrKM@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Icenowy Zheng @ 2016-11-22 16:59 UTC (permalink / raw) To: Maxime Ripard, Chen-Yu Tsai, Hans de Goede Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng A64 has a MUSB controller wired to the USB PHY 0, which is connected to the upper USB Type-A port of Pine64. As the port is a Type-A female port, enable it in host-only mode in the device tree, which makes devices with USB Type-A male port can work on this port (which is originally designed by Pine64 team). Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> --- Peripheral mode is also proven to work, with dr_mode changed to "peripheral" and using a Type-A to Type-A cable. arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts index f9a11e6..cf91051 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts @@ -81,6 +81,11 @@ status = "okay"; }; +&usb_otg { + dr_mode = "host"; + status = "okay"; +}; + &usbphy { status = "okay"; }; -- 2.10.2 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <20161122165902.62543-2-icenowy-ymACFijhrKM@public.gmane.org>]
* Re: [RFC PATCH 2/2] arm64: dts: enable the MUSB controller of Pine64 in host-only mode [not found] ` <20161122165902.62543-2-icenowy-ymACFijhrKM@public.gmane.org> @ 2016-11-24 19:53 ` Maxime Ripard 0 siblings, 0 replies; 3+ messages in thread From: Maxime Ripard @ 2016-11-24 19:53 UTC (permalink / raw) To: Icenowy Zheng Cc: Chen-Yu Tsai, Hans de Goede, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 586 bytes --] On Wed, Nov 23, 2016 at 12:59:02AM +0800, Icenowy Zheng wrote: > A64 has a MUSB controller wired to the USB PHY 0, which is connected > to the upper USB Type-A port of Pine64. > > As the port is a Type-A female port, enable it in host-only mode in the > device tree, which makes devices with USB Type-A male port can work on > this port (which is originally designed by Pine64 team). > > Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> Applied both, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-24 19:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-22 16:59 [RFC PATCH 1/2] arm64: dts: add MUSB node to Allwinner A64 dtsi Icenowy Zheng
[not found] ` <20161122165902.62543-1-icenowy-ymACFijhrKM@public.gmane.org>
2016-11-22 16:59 ` [RFC PATCH 2/2] arm64: dts: enable the MUSB controller of Pine64 in host-only mode Icenowy Zheng
[not found] ` <20161122165902.62543-2-icenowy-ymACFijhrKM@public.gmane.org>
2016-11-24 19:53 ` Maxime Ripard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox