All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-05 19:02 ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi Maxime,

Here is a patch-set with all the otg / sun8i-usb-host related dts patches
I've accumulated.

These are intended for 4.3, and go hand in hand with the outstanding
musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
for 4.3 .

Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-05 19:02 ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Maxime,

Here is a patch-set with all the otg / sun8i-usb-host related dts patches
I've accumulated.

These are intended for 4.3, and go hand in hand with the outstanding
musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
for 4.3 .

Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 01/20] ARM: dts: sun4i: Add USB Dual Role Controller
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Add a node for the otg/drc usb controller to sun4i-a10.dtsi.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 61c03d1..30f663a 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -611,6 +611,18 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb@01c13000 {
+			compatible = "allwinner,sun4i-a10-musb";
+			reg = <0x01c13000 0x0400>;
+			clocks = <&ahb_gates 0>;
+			interrupts = <38>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			allwinner,sram = <&otg_sram 1>;
+			status = "disabled";
+		};
+
 		usbphy: phy@01c13400 {
 			#phy-cells = <1>;
 			compatible = "allwinner,sun4i-a10-usb-phy";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 01/20] ARM: dts: sun4i: Add USB Dual Role Controller
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Add a node for the otg/drc usb controller to sun4i-a10.dtsi.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun4i-a10.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 61c03d1..30f663a 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -611,6 +611,18 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb at 01c13000 {
+			compatible = "allwinner,sun4i-a10-musb";
+			reg = <0x01c13000 0x0400>;
+			clocks = <&ahb_gates 0>;
+			interrupts = <38>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			allwinner,sram = <&otg_sram 1>;
+			status = "disabled";
+		};
+
 		usbphy: phy at 01c13400 {
 			#phy-cells = <1>;
 			compatible = "allwinner,sun4i-a10-usb-phy";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 02/20] ARM: dts: sun5i: Add USB Dual Role Controller
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Add a node for the otg/drc usb controller to sun5i-a1*.dtsi.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun5i.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi
index 54b0978..53d3ead 100644
--- a/arch/arm/boot/dts/sun5i.dtsi
+++ b/arch/arm/boot/dts/sun5i.dtsi
@@ -416,6 +416,18 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb@01c13000 {
+			compatible = "allwinner,sun4i-a10-musb";
+			reg = <0x01c13000 0x0400>;
+			clocks = <&ahb_gates 0>;
+			interrupts = <38>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			allwinner,sram = <&otg_sram 1>;
+			status = "disabled";
+		};
+
 		usbphy: phy@01c13400 {
 			#phy-cells = <1>;
 			compatible = "allwinner,sun5i-a13-usb-phy";
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 02/20] ARM: dts: sun5i: Add USB Dual Role Controller
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Add a node for the otg/drc usb controller to sun5i-a1*.dtsi.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi
index 54b0978..53d3ead 100644
--- a/arch/arm/boot/dts/sun5i.dtsi
+++ b/arch/arm/boot/dts/sun5i.dtsi
@@ -416,6 +416,18 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb at 01c13000 {
+			compatible = "allwinner,sun4i-a10-musb";
+			reg = <0x01c13000 0x0400>;
+			clocks = <&ahb_gates 0>;
+			interrupts = <38>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			allwinner,sram = <&otg_sram 1>;
+			status = "disabled";
+		};
+
 		usbphy: phy at 01c13400 {
 			#phy-cells = <1>;
 			compatible = "allwinner,sun5i-a13-usb-phy";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 03/20] ARM: dts: sun6i: Add USB Dual Role Controller
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Add a node for the otg/drc usb controller to sun6i-a31.dtsi.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun6i-a31.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index 008047a..5bc6933 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -512,6 +512,18 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb@01c19000 {
+			compatible = "allwinner,sun6i-a31-musb";
+			reg = <0x01c19000 0x0400>;
+			clocks = <&ahb1_gates 24>;
+			resets = <&ahb1_rst 24>;
+			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
 		usbphy: phy@01c19400 {
 			compatible = "allwinner,sun6i-a31-usb-phy";
 			reg = <0x01c19400 0x10>,
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 03/20] ARM: dts: sun6i: Add USB Dual Role Controller
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Add a node for the otg/drc usb controller to sun6i-a31.dtsi.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun6i-a31.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index 008047a..5bc6933 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -512,6 +512,18 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb at 01c19000 {
+			compatible = "allwinner,sun6i-a31-musb";
+			reg = <0x01c19000 0x0400>;
+			clocks = <&ahb1_gates 24>;
+			resets = <&ahb1_rst 24>;
+			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
 		usbphy: phy at 01c19400 {
 			compatible = "allwinner,sun6i-a31-usb-phy";
 			reg = <0x01c19400 0x10>,
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 04/20] ARM: dts: sun7i: Add USB Dual Role Controller
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Roman Byshko,
	Hans de Goede

From: Roman Byshko <rbyshko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Add a node for the otg/drc usb controller to sun7i-a20.dtsi

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 6a63f30..7549f1b 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -699,6 +699,18 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb@01c13000 {
+			compatible = "allwinner,sun4i-a10-musb";
+			reg = <0x01c13000 0x0400>;
+			clocks = <&ahb_gates 0>;
+			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			allwinner,sram = <&otg_sram 1>;
+			status = "disabled";
+		};
+
 		usbphy: phy@01c13400 {
 			#phy-cells = <1>;
 			compatible = "allwinner,sun7i-a20-usb-phy";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 04/20] ARM: dts: sun7i: Add USB Dual Role Controller
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

From: Roman Byshko <rbyshko@gmail.com>

Add a node for the otg/drc usb controller to sun7i-a20.dtsi

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 6a63f30..7549f1b 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -699,6 +699,18 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb at 01c13000 {
+			compatible = "allwinner,sun4i-a10-musb";
+			reg = <0x01c13000 0x0400>;
+			clocks = <&ahb_gates 0>;
+			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			allwinner,sram = <&otg_sram 1>;
+			status = "disabled";
+		};
+
 		usbphy: phy at 01c13400 {
 			#phy-cells = <1>;
 			compatible = "allwinner,sun7i-a20-usb-phy";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 05/20] ARM: dts: sun8i: Add A23 usb-phy and otg nodes
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Note these are added to the sun8i-a23.dtsi file rather then to the shared
sun8i-a23-a33.dtsi file as both the phy and the otg controller on the a33
are slightly different.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a23.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a23.dtsi b/arch/arm/boot/dts/sun8i-a23.dtsi
index 8698f7a..60fde9e 100644
--- a/arch/arm/boot/dts/sun8i-a23.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23.dtsi
@@ -58,6 +58,38 @@
 			clock-output-names = "mbus";
 		};
 	};
+
+	soc@01c00000 {
+		usb_otg: usb@01c19000 {
+			compatible = "allwinner,sun6i-a31-musb";
+			reg = <0x01c19000 0x0400>;
+			clocks = <&ahb1_gates 24>;
+			resets = <&ahb1_rst 24>;
+			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		usbphy: phy@01c19400 {
+			compatible = "allwinner,sun8i-a23-usb-phy";
+			reg = <0x01c19400 0x10>,
+			      <0x01c1a800 0x4>;
+			reg-names = "phy_ctrl",
+				    "pmu1";
+			clocks = <&usb_clk 8>,
+				 <&usb_clk 9>;
+			clock-names = "usb0_phy",
+				      "usb1_phy";
+			resets = <&usb_clk 0>,
+				 <&usb_clk 1>;
+			reset-names = "usb0_reset",
+				      "usb1_reset";
+			status = "disabled";
+			#phy-cells = <1>;
+		};
+	};
 };
 
 &pio {
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 05/20] ARM: dts: sun8i: Add A23 usb-phy and otg nodes
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Note these are added to the sun8i-a23.dtsi file rather then to the shared
sun8i-a23-a33.dtsi file as both the phy and the otg controller on the a33
are slightly different.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a23.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a23.dtsi b/arch/arm/boot/dts/sun8i-a23.dtsi
index 8698f7a..60fde9e 100644
--- a/arch/arm/boot/dts/sun8i-a23.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23.dtsi
@@ -58,6 +58,38 @@
 			clock-output-names = "mbus";
 		};
 	};
+
+	soc at 01c00000 {
+		usb_otg: usb at 01c19000 {
+			compatible = "allwinner,sun6i-a31-musb";
+			reg = <0x01c19000 0x0400>;
+			clocks = <&ahb1_gates 24>;
+			resets = <&ahb1_rst 24>;
+			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		usbphy: phy at 01c19400 {
+			compatible = "allwinner,sun8i-a23-usb-phy";
+			reg = <0x01c19400 0x10>,
+			      <0x01c1a800 0x4>;
+			reg-names = "phy_ctrl",
+				    "pmu1";
+			clocks = <&usb_clk 8>,
+				 <&usb_clk 9>;
+			clock-names = "usb0_phy",
+				      "usb1_phy";
+			resets = <&usb_clk 0>,
+				 <&usb_clk 1>;
+			reset-names = "usb0_reset",
+				      "usb1_reset";
+			status = "disabled";
+			#phy-cells = <1>;
+		};
+	};
 };
 
 &pio {
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 06/20] ARM: dts: sun8i: Add A33 usb-phy and otg nodes
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Note these are added to the sun8i-a33.dtsi file rather then to the shared
sun8i-a23-a33.dtsi file as both the phy and the otg controller on the a33
are slightly different.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a33.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 85ee080..da01b76 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -80,6 +80,38 @@
 			clock-output-names = "mbus";
 		};
 	};
+
+	soc@01c00000 {
+		usb_otg: usb@01c19000 {
+			compatible = "allwinner,sun8i-a33-musb";
+			reg = <0x01c19000 0x0400>;
+			clocks = <&ahb1_gates 24>;
+			resets = <&ahb1_rst 24>;
+			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		usbphy: phy@01c19400 {
+			compatible = "allwinner,sun8i-a33-usb-phy";
+			reg = <0x01c19400 0x14>,
+			      <0x01c1a800 0x4>;
+			reg-names = "phy_ctrl",
+				    "pmu1";
+			clocks = <&usb_clk 8>,
+				 <&usb_clk 9>;
+			clock-names = "usb0_phy",
+				      "usb1_phy";
+			resets = <&usb_clk 0>,
+				 <&usb_clk 1>;
+			reset-names = "usb0_reset",
+				      "usb1_reset";
+			status = "disabled";
+			#phy-cells = <1>;
+		};
+	};
 };
 
 &pio {
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 06/20] ARM: dts: sun8i: Add A33 usb-phy and otg nodes
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Note these are added to the sun8i-a33.dtsi file rather then to the shared
sun8i-a23-a33.dtsi file as both the phy and the otg controller on the a33
are slightly different.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a33.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 85ee080..da01b76 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -80,6 +80,38 @@
 			clock-output-names = "mbus";
 		};
 	};
+
+	soc at 01c00000 {
+		usb_otg: usb at 01c19000 {
+			compatible = "allwinner,sun8i-a33-musb";
+			reg = <0x01c19000 0x0400>;
+			clocks = <&ahb1_gates 24>;
+			resets = <&ahb1_rst 24>;
+			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		usbphy: phy at 01c19400 {
+			compatible = "allwinner,sun8i-a33-usb-phy";
+			reg = <0x01c19400 0x14>,
+			      <0x01c1a800 0x4>;
+			reg-names = "phy_ctrl",
+				    "pmu1";
+			clocks = <&usb_clk 8>,
+				 <&usb_clk 9>;
+			clock-names = "usb0_phy",
+				      "usb1_phy";
+			resets = <&usb_clk 0>,
+				 <&usb_clk 1>;
+			reset-names = "usb0_reset",
+				      "usb1_reset";
+			status = "disabled";
+			#phy-cells = <1>;
+		};
+	};
 };
 
 &pio {
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 07/20] ARM: dts: sun8i: Add support for USB controllers on A23/A33
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

From: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

A23/A33 has one pair of EHCI/OHCI USB controllers. There are 2 USB PHYs,
one for the USB OTG controller, one for the EHCI/OHCI pair. The latter
may also support HSIC, though none of the available boards utilize this,
so this is not supported yet.

Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
index 7abd0ae..b9e4d56 100644
--- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
@@ -332,6 +332,28 @@
 			#size-cells = <0>;
 		};
 
+		ehci0: usb@01c1a000 {
+			compatible = "allwinner,sun8i-a23-ehci", "generic-ehci";
+			reg = <0x01c1a000 0x100>;
+			interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ahb1_gates 26>;
+			resets = <&ahb1_rst 26>;
+			phys = <&usbphy 1>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		ohci0: usb@01c1a400 {
+			compatible = "allwinner,sun8i-a23-ohci", "generic-ohci";
+			reg = <0x01c1a400 0x100>;
+			interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ahb1_gates 29>, <&usb_clk 16>;
+			resets = <&ahb1_rst 29>;
+			phys = <&usbphy 1>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
 		pio: pinctrl@01c20800 {
 			/* compatible gets set in SoC specific dtsi file */
 			reg = <0x01c20800 0x400>;
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 07/20] ARM: dts: sun8i: Add support for USB controllers on A23/A33
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

From: Chen-Yu Tsai <wens@csie.org>

A23/A33 has one pair of EHCI/OHCI USB controllers. There are 2 USB PHYs,
one for the USB OTG controller, one for the EHCI/OHCI pair. The latter
may also support HSIC, though none of the available boards utilize this,
so this is not supported yet.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
index 7abd0ae..b9e4d56 100644
--- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
@@ -332,6 +332,28 @@
 			#size-cells = <0>;
 		};
 
+		ehci0: usb at 01c1a000 {
+			compatible = "allwinner,sun8i-a23-ehci", "generic-ehci";
+			reg = <0x01c1a000 0x100>;
+			interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ahb1_gates 26>;
+			resets = <&ahb1_rst 26>;
+			phys = <&usbphy 1>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		ohci0: usb at 01c1a400 {
+			compatible = "allwinner,sun8i-a23-ohci", "generic-ohci";
+			reg = <0x01c1a400 0x100>;
+			interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ahb1_gates 29>, <&usb_clk 16>;
+			resets = <&ahb1_rst 29>;
+			phys = <&usbphy 1>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
 		pio: pinctrl at 01c20800 {
 			/* compatible gets set in SoC specific dtsi file */
 			reg = <0x01c20800 0x400>;
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 08/20] ARM: dts: sun4i: Enable USB DRC on Chuwi V7 CW0825
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the otg/drc usb controller on the Chuwi V7 CW0825 tablet.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 34 +++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts b/arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts
index 5878a0b..1430568 100644
--- a/arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts
+++ b/arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts
@@ -114,6 +114,30 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
+&pio {
+	usb0_id_detect_pin: usb0_id_detect_pin@0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+		allwinner,pins = "PH5";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
+};
+
+&reg_usb0_vbus {
+	status = "okay";
+};
+
 &reg_usb2_vbus {
 	status = "okay";
 };
@@ -124,7 +148,17 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
 };
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 08/20] ARM: dts: sun4i: Enable USB DRC on Chuwi V7 CW0825
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the otg/drc usb controller on the Chuwi V7 CW0825 tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 34 +++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts b/arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts
index 5878a0b..1430568 100644
--- a/arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts
+++ b/arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts
@@ -114,6 +114,30 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
+&pio {
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+		allwinner,pins = "PH5";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
+};
+
+&reg_usb0_vbus {
+	status = "okay";
+};
+
 &reg_usb2_vbus {
 	status = "okay";
 };
@@ -124,7 +148,17 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
 };
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 09/20] ARM: dts: sun4i: Enable USB DRC on the Cubieboard
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the otg/drc usb controller on the Cubieboard. Note that the
5V of the otg is directly connected to the general 5V, so we only use
the id pin.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index 9afb4e0..046a84d 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -155,6 +155,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	led_pins_cubieboard: led_pins@0 {
 		allwinner,pins = "PH20", "PH21";
@@ -162,6 +166,13 @@
 		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin@0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
 };
 
 &reg_ahci_5v {
@@ -216,7 +227,15 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 09/20] ARM: dts: sun4i: Enable USB DRC on the Cubieboard
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the otg/drc usb controller on the Cubieboard. Note that the
5V of the otg is directly connected to the general 5V, so we only use
the id pin.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index 9afb4e0..046a84d 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -155,6 +155,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	led_pins_cubieboard: led_pins at 0 {
 		allwinner,pins = "PH20", "PH21";
@@ -162,6 +166,13 @@
 		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
 };
 
 &reg_ahci_5v {
@@ -216,7 +227,15 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 10/20] ARM: dts: sun5i: Enable USB DRC on UTOO P66
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the OTG controller on the UTOO P66 tablet.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun5i-a13-utoo-p66.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts b/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
index 514f159..3043aac 100644
--- a/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
+++ b/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
@@ -153,6 +153,10 @@
 	};
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	mmc0_cd_pin_p66: mmc0_cd_pin@0 {
 		allwinner,pins = "PG0";
@@ -161,6 +165,20 @@
 		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 	};
 
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+		allwinner,pins = "PG1";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin@0 {
+		allwinner,pins = "PG2";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
 	i2c_lcd_pins: i2c_lcd_pin@0 {
 		allwinner,pins = "PG10", "PG12";
 		allwinner,function = "gpio_out";
@@ -219,7 +237,16 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_ldo3>;
 	status = "okay";
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 10/20] ARM: dts: sun5i: Enable USB DRC on UTOO P66
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the OTG controller on the UTOO P66 tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-a13-utoo-p66.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts b/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
index 514f159..3043aac 100644
--- a/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
+++ b/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
@@ -153,6 +153,10 @@
 	};
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	mmc0_cd_pin_p66: mmc0_cd_pin at 0 {
 		allwinner,pins = "PG0";
@@ -161,6 +165,20 @@
 		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 	};
 
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+		allwinner,pins = "PG1";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PG2";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
 	i2c_lcd_pins: i2c_lcd_pin at 0 {
 		allwinner,pins = "PG10", "PG12";
 		allwinner,function = "gpio_out";
@@ -219,7 +237,16 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_ldo3>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 11/20] ARM: dts: sun6i: Enable USB DRC on the Mele A1000G quad
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

The Mele A1000G-quad has an usb to sata bridge connected to its otg
controller, this commit enables support for this. Since the otg is
hardwired to the sata bridge it gets enabled in host only mode.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts b/arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts
index 4404f37..4dd70cc 100644
--- a/arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts
+++ b/arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts
@@ -143,6 +143,11 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usbphy {
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 11/20] ARM: dts: sun6i: Enable USB DRC on the Mele A1000G quad
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

The Mele A1000G-quad has an usb to sata bridge connected to its otg
controller, this commit enables support for this. Since the otg is
hardwired to the sata bridge it gets enabled in host only mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts b/arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts
index 4404f37..4dd70cc 100644
--- a/arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts
+++ b/arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts
@@ -143,6 +143,11 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usbphy {
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 12/20] ARM: dts: sun7i: Enable USB DRC on Cubietruck
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Roman Byshko,
	Hans de Goede

From: Roman Byshko <rbyshko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Enable the otg/drc usb controller on the cubietruck.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 4611e2f..839d79d 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -199,6 +199,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	vmmc3_pin_cubietruck: vmmc3_pin@0 {
 		allwinner,pins = "PH9";
@@ -227,6 +231,20 @@
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin@0 {
+		allwinner,pins = "PH19";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+		allwinner,pins = "PH22";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
 };
 
 &pwm {
@@ -288,7 +306,16 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
+	usb0_vbus_det-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 12/20] ARM: dts: sun7i: Enable USB DRC on Cubietruck
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

From: Roman Byshko <rbyshko@gmail.com>

Enable the otg/drc usb controller on the cubietruck.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 4611e2f..839d79d 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -199,6 +199,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	vmmc3_pin_cubietruck: vmmc3_pin at 0 {
 		allwinner,pins = "PH9";
@@ -227,6 +231,20 @@
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PH19";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+		allwinner,pins = "PH22";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
 };
 
 &pwm {
@@ -288,7 +306,16 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
+	usb0_vbus_det-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 13/20] ARM: dts: sun7i: Enable USB DRC on A20-OLinuxIno-Lime
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the otg/drc usb controller on the A20-OLinuxIno-Lime.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 32 ++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
index 769726d..0423708 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
@@ -135,6 +135,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
 		allwinner,pins = "PC3";
@@ -149,6 +153,20 @@
 		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin@0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+		allwinner,pins = "PH5";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
 };
 
 &reg_ahci_5v {
@@ -157,6 +175,10 @@
 	status = "okay";
 };
 
+&reg_usb0_vbus {
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -171,7 +193,17 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 13/20] ARM: dts: sun7i: Enable USB DRC on A20-OLinuxIno-Lime
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the otg/drc usb controller on the A20-OLinuxIno-Lime.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 32 ++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
index 769726d..0423708 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
@@ -135,6 +135,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin at 1 {
 		allwinner,pins = "PC3";
@@ -149,6 +153,20 @@
 		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+		allwinner,pins = "PH5";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
 };
 
 &reg_ahci_5v {
@@ -157,6 +175,10 @@
 	status = "okay";
 };
 
+&reg_usb0_vbus {
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -171,7 +193,17 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 14/20] ARM: dts: sun7i: Enable USB DRC on A20-OLinuxIno-Micro
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the otg/drc usb controller on the A20-OLinuxIno-Micro.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 32 +++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
index 00f8f25..c5d70ca 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
@@ -215,6 +215,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
 		allwinner,pins = "PH11";
@@ -229,12 +233,30 @@
 		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin@0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+		allwinner,pins = "PH5";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
 };
 
 &reg_ahci_5v {
 	status = "okay";
 };
 
+&reg_usb0_vbus {
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -275,7 +297,17 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 14/20] ARM: dts: sun7i: Enable USB DRC on A20-OLinuxIno-Micro
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the otg/drc usb controller on the A20-OLinuxIno-Micro.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 32 +++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
index 00f8f25..c5d70ca 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
@@ -215,6 +215,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	mmc3_cd_pin_olinuxinom: mmc3_cd_pin at 0 {
 		allwinner,pins = "PH11";
@@ -229,12 +233,30 @@
 		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+		allwinner,pins = "PH5";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
 };
 
 &reg_ahci_5v {
 	status = "okay";
 };
 
+&reg_usb0_vbus {
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -275,7 +297,17 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 15/20] ARM: dts: sun7i: Enable USB DRC on Bananapi (BROKEN!)
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the otg/drc usb controller on the Bananapi.

This is based on the fex file settings which claim that vbus-det is
PH5, but this does not work and the schematic shows that it is actually
connected to gpio1 of the axp209, so we cannot add otg support for the
bananapi until we get support for the axp209 gpio pins in the kernel.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 9f7b472..ce318bf 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -159,7 +159,25 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
+	usb0_id_detect_pin: usb0_id_detect_pin@0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+		allwinner,pins = "PH5";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
+
 	mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
 		allwinner,pins = "PH10";
 		allwinner,function = "gpio_in";
@@ -182,6 +200,10 @@
 	};
 };
 
+&reg_usb0_vbus {
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -216,7 +238,17 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 15/20] ARM: dts: sun7i: Enable USB DRC on Bananapi (BROKEN!)
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the otg/drc usb controller on the Bananapi.

This is based on the fex file settings which claim that vbus-det is
PH5, but this does not work and the schematic shows that it is actually
connected to gpio1 of the axp209, so we cannot add otg support for the
bananapi until we get support for the axp209 gpio pins in the kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 9f7b472..ce318bf 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -159,7 +159,25 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+		allwinner,pins = "PH5";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+	};
+
 	mmc0_cd_pin_bananapi: mmc0_cd_pin at 0 {
 		allwinner,pins = "PH10";
 		allwinner,function = "gpio_in";
@@ -182,6 +200,10 @@
 	};
 };
 
+&reg_usb0_vbus {
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -216,7 +238,17 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 16/20] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A23 tablets
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the otg controller on Ippo Q8H tablets, for now it is enabled
in host-only mode, because true OTG support requires support for
detecting and enabling Vbus through the axp221 pmic.

For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
index 95134c6..8d9da68 100644
--- a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
+++ b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
@@ -125,3 +125,12 @@
 	pinctrl-0 = <&r_uart_pins_a>;
 	status = "okay";
 };
+
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 16/20] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A23 tablets
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the otg controller on Ippo Q8H tablets, for now it is enabled
in host-only mode, because true OTG support requires support for
detecting and enabling Vbus through the axp221 pmic.

For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
index 95134c6..8d9da68 100644
--- a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
+++ b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
@@ -125,3 +125,12 @@
 	pinctrl-0 = <&r_uart_pins_a>;
 	status = "okay";
 };
+
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 17/20] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A33 tablet
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the otg/drc usb controller on the Ippo Q8H-A33 tablet, for now it
is enabled in host-only mode, because true OTG support requires support
for detecting and enabling Vbus through the axp221 pmic.

For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts
index 12dfb1e..dc14091 100644
--- a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts
@@ -116,3 +116,12 @@
 	pinctrl-0 = <&r_uart_pins_a>;
 	status = "okay";
 };
+
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 17/20] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A33 tablet
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the otg/drc usb controller on the Ippo Q8H-A33 tablet, for now it
is enabled in host-only mode, because true OTG support requires support
for detecting and enabling Vbus through the axp221 pmic.

For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts
index 12dfb1e..dc14091 100644
--- a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dts
@@ -116,3 +116,12 @@
 	pinctrl-0 = <&r_uart_pins_a>;
 	status = "okay";
 };
+
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 18/20] ARM: dts: sun8i: Enable USB DRC on GA10H-A33 tablets
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Enable the otg controller on GA10H-A33 tablets, for now it is enabled
in host-only mode, because true OTG support requires support for
detecting and enabling Vbus through the axp221 pmic.

For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
index 8667033..7520e06 100644
--- a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
@@ -123,3 +123,12 @@
 	pinctrl-0 = <&r_uart_pins_a>;
 	status = "okay";
 };
+
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 18/20] ARM: dts: sun8i: Enable USB DRC on GA10H-A33 tablets
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the otg controller on GA10H-A33 tablets, for now it is enabled
in host-only mode, because true OTG support requires support for
detecting and enabling Vbus through the axp221 pmic.

For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
index 8667033..7520e06 100644
--- a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
@@ -123,3 +123,12 @@
 	pinctrl-0 = <&r_uart_pins_a>;
 	status = "okay";
 };
+
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 19/20] ARM: dts: sun8i: Enable USB host on GA10H-A33 tablets
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

The GA10H tablets not only have an otg connector, but also a normal
usb host connector, enabled support for this.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
index 7520e06..1aefc67 100644
--- a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
@@ -61,6 +61,10 @@
 	};
 };
 
+&ehci0 {
+	status = "okay";
+};
+
 &i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0_pins_a>;
@@ -109,6 +113,10 @@
 	status = "okay";
 };
 
+&ohci0 {
+	status = "okay";
+};
+
 &pio {
 	mmc0_cd_pin_q8h: mmc0_cd_pin@0 {
 		allwinner,pins = "PB4";
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 19/20] ARM: dts: sun8i: Enable USB host on GA10H-A33 tablets
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

The GA10H tablets not only have an otg connector, but also a normal
usb host connector, enabled support for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
index 7520e06..1aefc67 100644
--- a/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
@@ -61,6 +61,10 @@
 	};
 };
 
+&ehci0 {
+	status = "okay";
+};
+
 &i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0_pins_a>;
@@ -109,6 +113,10 @@
 	status = "okay";
 };
 
+&ohci0 {
+	status = "okay";
+};
+
 &pio {
 	mmc0_cd_pin_q8h: mmc0_cd_pin at 0 {
 		allwinner,pins = "PB4";
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* [PATCH 20/20] ARM: dts: sun8i: sina33: Enable USB hosts
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-05 19:02     ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

From: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

The Sina33 SDK board exposes the EHCI/OHCI USB host pair.
VBUS for this port is always on and non-controllable.

Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts b/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts
index 5788c29..1d5390d 100644
--- a/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts
+++ b/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts
@@ -63,6 +63,10 @@
 	};
 };
 
+&ehci0 {
+	status = "okay";
+};
+
 &lradc {
 	vref-supply = <&reg_vcc3v0>;
 	status = "okay";
@@ -113,6 +117,10 @@
 	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
 
+&ohci0 {
+	status = "okay";
+};
+
 &pio {
 	mmc0_cd_pin_sina33: mmc0_cd_pin@0 {
 		allwinner,pins = "PB4";
@@ -127,3 +135,8 @@
 	pinctrl-0 = <&uart0_pins_b>;
 	status = "okay";
 };
+
+&usbphy {
+	status = "okay";
+	usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
+};
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 20/20] ARM: dts: sun8i: sina33: Enable USB hosts
@ 2015-06-05 19:02     ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Sina33 SDK board exposes the EHCI/OHCI USB host pair.
VBUS for this port is always on and non-controllable.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts b/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts
index 5788c29..1d5390d 100644
--- a/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts
+++ b/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts
@@ -63,6 +63,10 @@
 	};
 };
 
+&ehci0 {
+	status = "okay";
+};
+
 &lradc {
 	vref-supply = <&reg_vcc3v0>;
 	status = "okay";
@@ -113,6 +117,10 @@
 	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
 
+&ohci0 {
+	status = "okay";
+};
+
 &pio {
 	mmc0_cd_pin_sina33: mmc0_cd_pin at 0 {
 		allwinner,pins = "PB4";
@@ -127,3 +135,8 @@
 	pinctrl-0 = <&uart0_pins_b>;
 	status = "okay";
 };
+
+&usbphy {
+	status = "okay";
+	usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
+};
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/20] ARM: dts: sun7i: Enable USB DRC on Bananapi (BROKEN!)
  2015-06-05 19:02     ` Hans de Goede
@ 2015-06-05 19:15         ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:15 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi,

On 05-06-15 21:02, Hans de Goede wrote:
> Enable the otg/drc usb controller on the Bananapi.
>
> This is based on the fex file settings which claim that vbus-det is
> PH5, but this does not work and the schematic shows that it is actually
> connected to gpio1 of the axp209, so we cannot add otg support for the
> bananapi until we get support for the axp209 gpio pins in the kernel.
>
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

This one obviously should not have been part of this set, please
ignore this one.

Thanks,

Hans


> ---
>   arch/arm/boot/dts/sun7i-a20-bananapi.dts | 32 ++++++++++++++++++++++++++++++++
>   1 file changed, 32 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> index 9f7b472..ce318bf 100644
> --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> @@ -159,7 +159,25 @@
>   	status = "okay";
>   };
>
> +&otg_sram {
> +	status = "okay";
> +};
> +
>   &pio {
> +	usb0_id_detect_pin: usb0_id_detect_pin@0 {
> +		allwinner,pins = "PH4";
> +		allwinner,function = "gpio_in";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +	};
> +
> +	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
> +		allwinner,pins = "PH5";
> +		allwinner,function = "gpio_in";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
> +	};
> +
>   	mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
>   		allwinner,pins = "PH10";
>   		allwinner,function = "gpio_in";
> @@ -182,6 +200,10 @@
>   	};
>   };
>
> +&reg_usb0_vbus {
> +	status = "okay";
> +};
> +
>   &reg_usb1_vbus {
>   	status = "okay";
>   };
> @@ -216,7 +238,17 @@
>   	status = "okay";
>   };
>
> +&usb_otg {
> +	dr_mode = "otg";
> +	status = "okay";
> +};
> +
>   &usbphy {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> +	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> +	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_vbus-supply = <&reg_usb0_vbus>;
>   	usb1_vbus-supply = <&reg_usb1_vbus>;
>   	usb2_vbus-supply = <&reg_usb2_vbus>;
>   	status = "okay";
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 64+ messages in thread

* [PATCH 15/20] ARM: dts: sun7i: Enable USB DRC on Bananapi (BROKEN!)
@ 2015-06-05 19:15         ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-05 19:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 05-06-15 21:02, Hans de Goede wrote:
> Enable the otg/drc usb controller on the Bananapi.
>
> This is based on the fex file settings which claim that vbus-det is
> PH5, but this does not work and the schematic shows that it is actually
> connected to gpio1 of the axp209, so we cannot add otg support for the
> bananapi until we get support for the axp209 gpio pins in the kernel.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

This one obviously should not have been part of this set, please
ignore this one.

Thanks,

Hans


> ---
>   arch/arm/boot/dts/sun7i-a20-bananapi.dts | 32 ++++++++++++++++++++++++++++++++
>   1 file changed, 32 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> index 9f7b472..ce318bf 100644
> --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> @@ -159,7 +159,25 @@
>   	status = "okay";
>   };
>
> +&otg_sram {
> +	status = "okay";
> +};
> +
>   &pio {
> +	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
> +		allwinner,pins = "PH4";
> +		allwinner,function = "gpio_in";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +	};
> +
> +	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
> +		allwinner,pins = "PH5";
> +		allwinner,function = "gpio_in";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
> +	};
> +
>   	mmc0_cd_pin_bananapi: mmc0_cd_pin at 0 {
>   		allwinner,pins = "PH10";
>   		allwinner,function = "gpio_in";
> @@ -182,6 +200,10 @@
>   	};
>   };
>
> +&reg_usb0_vbus {
> +	status = "okay";
> +};
> +
>   &reg_usb1_vbus {
>   	status = "okay";
>   };
> @@ -216,7 +238,17 @@
>   	status = "okay";
>   };
>
> +&usb_otg {
> +	dr_mode = "otg";
> +	status = "okay";
> +};
> +
>   &usbphy {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> +	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> +	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_vbus-supply = <&reg_usb0_vbus>;
>   	usb1_vbus-supply = <&reg_usb1_vbus>;
>   	usb2_vbus-supply = <&reg_usb2_vbus>;
>   	status = "okay";
>

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
  2015-06-05 19:02 ` Hans de Goede
@ 2015-06-08 10:03     ` Maxime Ripard
  -1 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-08 10:03 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 600 bytes --]

Hi Hans,

On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
> Hi Maxime,
> 
> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
> I've accumulated.
> 
> These are intended for 4.3, and go hand in hand with the outstanding
> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
> for 4.3 .

I'm fine with these patches. Do you have a branch somewhere that I can
pull (without the one that you wanted me to drop, obviously)?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-08 10:03     ` Maxime Ripard
  0 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-08 10:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hans,

On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
> Hi Maxime,
> 
> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
> I've accumulated.
> 
> These are intended for 4.3, and go hand in hand with the outstanding
> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
> for 4.3 .

I'm fine with these patches. Do you have a branch somewhere that I can
pull (without the one that you wanted me to drop, obviously)?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150608/77496d30/attachment.sig>

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
  2015-06-08 10:03     ` Maxime Ripard
@ 2015-06-08 12:56       ` Michal Suchanek
  -1 siblings, 0 replies; 64+ messages in thread
From: Michal Suchanek @ 2015-06-08 12:56 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Hans de Goede, Chen-Yu Tsai,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi

Hello,

On 8 June 2015 at 12:03, Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> Hi Hans,
>
> On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
>> Hi Maxime,
>>
>> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
>> I've accumulated.
>>
>> These are intended for 4.3, and go hand in hand with the outstanding
>> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
>> for 4.3 .
>
> I'm fine with these patches. Do you have a branch somewhere that I can
> pull (without the one that you wanted me to drop, obviously)?

Are these before the conversion to DT label syntax or after (meaning
that the conversion patches got pulled somewhere already)?

Thanks

Michal

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [linux-sunxi] Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-08 12:56       ` Michal Suchanek
  0 siblings, 0 replies; 64+ messages in thread
From: Michal Suchanek @ 2015-06-08 12:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On 8 June 2015 at 12:03, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> Hi Hans,
>
> On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
>> Hi Maxime,
>>
>> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
>> I've accumulated.
>>
>> These are intended for 4.3, and go hand in hand with the outstanding
>> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
>> for 4.3 .
>
> I'm fine with these patches. Do you have a branch somewhere that I can
> pull (without the one that you wanted me to drop, obviously)?

Are these before the conversion to DT label syntax or after (meaning
that the conversion patches got pulled somewhere already)?

Thanks

Michal

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
  2015-06-08 12:56       ` [linux-sunxi] " Michal Suchanek
@ 2015-06-09 20:18           ` Maxime Ripard
  -1 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-09 20:18 UTC (permalink / raw)
  To: Michal Suchanek
  Cc: Hans de Goede, Chen-Yu Tsai,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

Hi,

On Mon, Jun 08, 2015 at 02:56:35PM +0200, Michal Suchanek wrote:
> Hello,
> 
> On 8 June 2015 at 12:03, Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> > Hi Hans,
> >
> > On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
> >> Hi Maxime,
> >>
> >> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
> >> I've accumulated.
> >>
> >> These are intended for 4.3, and go hand in hand with the outstanding
> >> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
> >> for 4.3 .
> >
> > I'm fine with these patches. Do you have a branch somewhere that I can
> > pull (without the one that you wanted me to drop, obviously)?
> 
> Are these before the conversion to DT label syntax or after (meaning
> that the conversion patches got pulled somewhere already)?

Yes. They've been in my tree for a few monthes now, and have been in
linux-next and arm-soc for quite some time too.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [linux-sunxi] Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-09 20:18           ` Maxime Ripard
  0 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-09 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Jun 08, 2015 at 02:56:35PM +0200, Michal Suchanek wrote:
> Hello,
> 
> On 8 June 2015 at 12:03, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> > Hi Hans,
> >
> > On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
> >> Hi Maxime,
> >>
> >> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
> >> I've accumulated.
> >>
> >> These are intended for 4.3, and go hand in hand with the outstanding
> >> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
> >> for 4.3 .
> >
> > I'm fine with these patches. Do you have a branch somewhere that I can
> > pull (without the one that you wanted me to drop, obviously)?
> 
> Are these before the conversion to DT label syntax or after (meaning
> that the conversion patches got pulled somewhere already)?

Yes. They've been in my tree for a few monthes now, and have been in
linux-next and arm-soc for quite some time too.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150609/254c4bf4/attachment.sig>

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
  2015-06-08 10:03     ` Maxime Ripard
@ 2015-06-10 13:27       ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-10 13:27 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi,

On 08-06-15 12:03, Maxime Ripard wrote:
> Hi Hans,
>
> On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
>> Hi Maxime,
>>
>> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
>> I've accumulated.
>>
>> These are intended for 4.3, and go hand in hand with the outstanding
>> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
>> for 4.3 .
>
> I'm fine with these patches. Do you have a branch somewhere that I can
> pull (without the one that you wanted me to drop, obviously)?

I've just created a branch with just these patches directly on top
of sunxi/for-next for you:

https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime

While preparing this branch I noticed that the dts for
the ippo q8h a33 tablets is not yet merged:

http://www.spinics.net/lists/devicetree/msg82149.html

You suggested to use the DT quirks interface instead of creating
a separate dts for each board variant, and in the end I agreed,
and asked you to merge it renamed to a more generic name
without the lcd1024x600 bit in there.

I can make it more generic and resend it myself. Do you want me
to squash in the otg changes when I resend it, or shall I keep
those separate ?

Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-10 13:27       ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-10 13:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 08-06-15 12:03, Maxime Ripard wrote:
> Hi Hans,
>
> On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
>> Hi Maxime,
>>
>> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
>> I've accumulated.
>>
>> These are intended for 4.3, and go hand in hand with the outstanding
>> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
>> for 4.3 .
>
> I'm fine with these patches. Do you have a branch somewhere that I can
> pull (without the one that you wanted me to drop, obviously)?

I've just created a branch with just these patches directly on top
of sunxi/for-next for you:

https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime

While preparing this branch I noticed that the dts for
the ippo q8h a33 tablets is not yet merged:

http://www.spinics.net/lists/devicetree/msg82149.html

You suggested to use the DT quirks interface instead of creating
a separate dts for each board variant, and in the end I agreed,
and asked you to merge it renamed to a more generic name
without the lcd1024x600 bit in there.

I can make it more generic and resend it myself. Do you want me
to squash in the otg changes when I resend it, or shall I keep
those separate ?

Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
  2015-06-10 13:27       ` Hans de Goede
@ 2015-06-12 13:27           ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-12 13:27 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi,

On 10-06-15 15:27, Hans de Goede wrote:
> Hi,
>
> On 08-06-15 12:03, Maxime Ripard wrote:
>> Hi Hans,
>>
>> On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
>>> Hi Maxime,
>>>
>>> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
>>> I've accumulated.
>>>
>>> These are intended for 4.3, and go hand in hand with the outstanding
>>> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
>>> for 4.3 .
>>
>> I'm fine with these patches. Do you have a branch somewhere that I can
>> pull (without the one that you wanted me to drop, obviously)?
>
> I've just created a branch with just these patches directly on top
> of sunxi/for-next for you:
>
> https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime

Please ignore this for now. There have been some changes to the extcon
framework, making it more integrated with devicetree, this means I need
to add an extcon property to the musb nodes in devicetree:

--- a/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt
+++ b/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt
@@ -12,6 +12,7 @@ Required properties:
   - phys            : phy specifier for the otg phy
   - phy-names       : must be "usb"
   - dr_mode         : Dual-Role mode must be "host" or "otg"
+ - extcon          : extcon specifier for the otg phy

  Example:

@@ -23,5 +24,6 @@ Example:
                 interrupt-names = "mc";
                 phys = <&usbphy 0>;
                 phy-names = "usb";
+         extcon = <&usbphy 0>;
                 status = "disabled";
         };

--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -773,6 +773,7 @@
                         interrupt-names = "mc";
                         phys = <&usbphy 0>;
                         phy-names = "usb";
+                 extcon = <&usbphy 0>;
                         allwinner,sram = <&otg_sram 1>;
                         status = "disabled";
                 };

I'll push a new version of the patches to otg-dts-for-maxime
with the extcon property added for you and ping you when it is
ready.

> While preparing this branch I noticed that the dts for
> the ippo q8h a33 tablets is not yet merged:
>
> http://www.spinics.net/lists/devicetree/msg82149.html
>
> You suggested to use the DT quirks interface instead of creating
> a separate dts for each board variant, and in the end I agreed,
> and asked you to merge it renamed to a more generic name
> without the lcd1024x600 bit in there.
>
> I can make it more generic and resend it myself. Do you want me
> to squash in the otg changes when I resend it, or shall I keep
> those separate ?

And about this one: ping ?

Thanks & Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-12 13:27           ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-12 13:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 10-06-15 15:27, Hans de Goede wrote:
> Hi,
>
> On 08-06-15 12:03, Maxime Ripard wrote:
>> Hi Hans,
>>
>> On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
>>> Hi Maxime,
>>>
>>> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
>>> I've accumulated.
>>>
>>> These are intended for 4.3, and go hand in hand with the outstanding
>>> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
>>> for 4.3 .
>>
>> I'm fine with these patches. Do you have a branch somewhere that I can
>> pull (without the one that you wanted me to drop, obviously)?
>
> I've just created a branch with just these patches directly on top
> of sunxi/for-next for you:
>
> https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime

Please ignore this for now. There have been some changes to the extcon
framework, making it more integrated with devicetree, this means I need
to add an extcon property to the musb nodes in devicetree:

--- a/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt
+++ b/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt
@@ -12,6 +12,7 @@ Required properties:
   - phys            : phy specifier for the otg phy
   - phy-names       : must be "usb"
   - dr_mode         : Dual-Role mode must be "host" or "otg"
+ - extcon          : extcon specifier for the otg phy

  Example:

@@ -23,5 +24,6 @@ Example:
                 interrupt-names = "mc";
                 phys = <&usbphy 0>;
                 phy-names = "usb";
+         extcon = <&usbphy 0>;
                 status = "disabled";
         };

--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -773,6 +773,7 @@
                         interrupt-names = "mc";
                         phys = <&usbphy 0>;
                         phy-names = "usb";
+                 extcon = <&usbphy 0>;
                         allwinner,sram = <&otg_sram 1>;
                         status = "disabled";
                 };

I'll push a new version of the patches to otg-dts-for-maxime
with the extcon property added for you and ping you when it is
ready.

> While preparing this branch I noticed that the dts for
> the ippo q8h a33 tablets is not yet merged:
>
> http://www.spinics.net/lists/devicetree/msg82149.html
>
> You suggested to use the DT quirks interface instead of creating
> a separate dts for each board variant, and in the end I agreed,
> and asked you to merge it renamed to a more generic name
> without the lcd1024x600 bit in there.
>
> I can make it more generic and resend it myself. Do you want me
> to squash in the otg changes when I resend it, or shall I keep
> those separate ?

And about this one: ping ?

Thanks & Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
  2015-06-12 13:27           ` Hans de Goede
@ 2015-06-13 13:30               ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-13 13:30 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi,

On 12-06-15 15:27, Hans de Goede wrote:
> Hi,
>
> On 10-06-15 15:27, Hans de Goede wrote:
>> Hi,
>>
>> On 08-06-15 12:03, Maxime Ripard wrote:
>>> Hi Hans,
>>>
>>> On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
>>>> Hi Maxime,
>>>>
>>>> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
>>>> I've accumulated.
>>>>
>>>> These are intended for 4.3, and go hand in hand with the outstanding
>>>> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
>>>> for 4.3 .
>>>
>>> I'm fine with these patches. Do you have a branch somewhere that I can
>>> pull (without the one that you wanted me to drop, obviously)?
>>
>> I've just created a branch with just these patches directly on top
>> of sunxi/for-next for you:
>>
>> https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime
>
> Please ignore this for now. There have been some changes to the extcon
> framework, making it more integrated with devicetree, this means I need
> to add an extcon property to the musb nodes in devicetree:
>
> --- a/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt
> +++ b/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt
> @@ -12,6 +12,7 @@ Required properties:
>    - phys            : phy specifier for the otg phy
>    - phy-names       : must be "usb"
>    - dr_mode         : Dual-Role mode must be "host" or "otg"
> + - extcon          : extcon specifier for the otg phy
>
>   Example:
>
> @@ -23,5 +24,6 @@ Example:
>                  interrupt-names = "mc";
>                  phys = <&usbphy 0>;
>                  phy-names = "usb";
> +         extcon = <&usbphy 0>;
>                  status = "disabled";
>          };
>
> --- a/arch/arm/boot/dts/sun7i-a20.dtsi
> +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
> @@ -773,6 +773,7 @@
>                          interrupt-names = "mc";
>                          phys = <&usbphy 0>;
>                          phy-names = "usb";
> +                 extcon = <&usbphy 0>;
>                          allwinner,sram = <&otg_sram 1>;
>                          status = "disabled";
>                  };
>
> I'll push a new version of the patches to otg-dts-for-maxime
> with the extcon property added for you and ping you when it is
> ready.

Done, https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime
now contains the necessary changes and is ready for merging for 4.3.

Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-13 13:30               ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-13 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 12-06-15 15:27, Hans de Goede wrote:
> Hi,
>
> On 10-06-15 15:27, Hans de Goede wrote:
>> Hi,
>>
>> On 08-06-15 12:03, Maxime Ripard wrote:
>>> Hi Hans,
>>>
>>> On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
>>>> Hi Maxime,
>>>>
>>>> Here is a patch-set with all the otg / sun8i-usb-host related dts patches
>>>> I've accumulated.
>>>>
>>>> These are intended for 4.3, and go hand in hand with the outstanding
>>>> musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
>>>> for 4.3 .
>>>
>>> I'm fine with these patches. Do you have a branch somewhere that I can
>>> pull (without the one that you wanted me to drop, obviously)?
>>
>> I've just created a branch with just these patches directly on top
>> of sunxi/for-next for you:
>>
>> https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime
>
> Please ignore this for now. There have been some changes to the extcon
> framework, making it more integrated with devicetree, this means I need
> to add an extcon property to the musb nodes in devicetree:
>
> --- a/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt
> +++ b/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt
> @@ -12,6 +12,7 @@ Required properties:
>    - phys            : phy specifier for the otg phy
>    - phy-names       : must be "usb"
>    - dr_mode         : Dual-Role mode must be "host" or "otg"
> + - extcon          : extcon specifier for the otg phy
>
>   Example:
>
> @@ -23,5 +24,6 @@ Example:
>                  interrupt-names = "mc";
>                  phys = <&usbphy 0>;
>                  phy-names = "usb";
> +         extcon = <&usbphy 0>;
>                  status = "disabled";
>          };
>
> --- a/arch/arm/boot/dts/sun7i-a20.dtsi
> +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
> @@ -773,6 +773,7 @@
>                          interrupt-names = "mc";
>                          phys = <&usbphy 0>;
>                          phy-names = "usb";
> +                 extcon = <&usbphy 0>;
>                          allwinner,sram = <&otg_sram 1>;
>                          status = "disabled";
>                  };
>
> I'll push a new version of the patches to otg-dts-for-maxime
> with the extcon property added for you and ping you when it is
> ready.

Done, https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime
now contains the necessary changes and is ready for merging for 4.3.

Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
  2015-06-10 13:27       ` Hans de Goede
@ 2015-06-16  9:35           ` Maxime Ripard
  -1 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-16  9:35 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

On Wed, Jun 10, 2015 at 03:27:08PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 08-06-15 12:03, Maxime Ripard wrote:
> >Hi Hans,
> >
> >On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
> >>Hi Maxime,
> >>
> >>Here is a patch-set with all the otg / sun8i-usb-host related dts patches
> >>I've accumulated.
> >>
> >>These are intended for 4.3, and go hand in hand with the outstanding
> >>musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
> >>for 4.3 .
> >
> >I'm fine with these patches. Do you have a branch somewhere that I can
> >pull (without the one that you wanted me to drop, obviously)?
> 
> I've just created a branch with just these patches directly on top
> of sunxi/for-next for you:
> 
> https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime

Queued for 4.3, thanks!

> 
> While preparing this branch I noticed that the dts for
> the ippo q8h a33 tablets is not yet merged:
> 
> http://www.spinics.net/lists/devicetree/msg82149.html
> 
> You suggested to use the DT quirks interface instead of creating
> a separate dts for each board variant, and in the end I agreed,
> and asked you to merge it renamed to a more generic name
> without the lcd1024x600 bit in there.
> 
> I can make it more generic and resend it myself. Do you want me
> to squash in the otg changes when I resend it, or shall I keep
> those separate ?

Sorry for being so late on that, let's discuss this in the other
thread.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-16  9:35           ` Maxime Ripard
  0 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-16  9:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 10, 2015 at 03:27:08PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 08-06-15 12:03, Maxime Ripard wrote:
> >Hi Hans,
> >
> >On Fri, Jun 05, 2015 at 09:02:03PM +0200, Hans de Goede wrote:
> >>Hi Maxime,
> >>
> >>Here is a patch-set with all the otg / sun8i-usb-host related dts patches
> >>I've accumulated.
> >>
> >>These are intended for 4.3, and go hand in hand with the outstanding
> >>musb-sunxi / phy-sun4i-usb patches, which I expect to be merged as is
> >>for 4.3 .
> >
> >I'm fine with these patches. Do you have a branch somewhere that I can
> >pull (without the one that you wanted me to drop, obviously)?
> 
> I've just created a branch with just these patches directly on top
> of sunxi/for-next for you:
> 
> https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime

Queued for 4.3, thanks!

> 
> While preparing this branch I noticed that the dts for
> the ippo q8h a33 tablets is not yet merged:
> 
> http://www.spinics.net/lists/devicetree/msg82149.html
> 
> You suggested to use the DT quirks interface instead of creating
> a separate dts for each board variant, and in the end I agreed,
> and asked you to merge it renamed to a more generic name
> without the lcd1024x600 bit in there.
> 
> I can make it more generic and resend it myself. Do you want me
> to squash in the otg changes when I resend it, or shall I keep
> those separate ?

Sorry for being so late on that, let's discuss this in the other
thread.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150616/96c814ef/attachment.sig>

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
  2015-06-13 13:30               ` Hans de Goede
@ 2015-06-16  9:36                   ` Maxime Ripard
  -1 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-16  9:36 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

On Sat, Jun 13, 2015 at 03:30:50PM +0200, Hans de Goede wrote:
> >I'll push a new version of the patches to otg-dts-for-maxime
> >with the extcon property added for you and ping you when it is
> >ready.
> 
> Done, https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime
> now contains the necessary changes and is ready for merging for 4.3.

Just to make things clear, it's the updated version with extcon that I
merged.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards
@ 2015-06-16  9:36                   ` Maxime Ripard
  0 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-16  9:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jun 13, 2015 at 03:30:50PM +0200, Hans de Goede wrote:
> >I'll push a new version of the patches to otg-dts-for-maxime
> >with the extcon property added for you and ping you when it is
> >ready.
> 
> Done, https://github.com/jwrdegoede/linux-sunxi/commits/otg-dts-for-maxime
> now contains the necessary changes and is ready for merging for 4.3.

Just to make things clear, it's the updated version with extcon that I
merged.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150616/e515743b/attachment.sig>

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 09/20] ARM: dts: sun4i: Enable USB DRC on the Cubieboard
  2015-06-05 19:02     ` Hans de Goede
@ 2015-06-18 15:59         ` Maxime Ripard
  -1 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-18 15:59 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1915 bytes --]

Hi Hans,

On Fri, Jun 05, 2015 at 09:02:12PM +0200, Hans de Goede wrote:
> Enable the otg/drc usb controller on the Cubieboard. Note that the
> 5V of the otg is directly connected to the general 5V, so we only use
> the id pin.
> 
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> index 9afb4e0..046a84d 100644
> --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> @@ -155,6 +155,10 @@
>  	status = "okay";
>  };
>  
> +&otg_sram {
> +	status = "okay";
> +};
> +
>  &pio {
>  	led_pins_cubieboard: led_pins@0 {
>  		allwinner,pins = "PH20", "PH21";
> @@ -162,6 +166,13 @@
>  		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
>  		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>  	};
> +
> +	usb0_id_detect_pin: usb0_id_detect_pin@0 {
> +		allwinner,pins = "PH4";
> +		allwinner,function = "gpio_in";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +	};
>  };
>  
>  &reg_ahci_5v {
> @@ -216,7 +227,15 @@
>  	status = "okay";
>  };
>  
> +&usb_otg {
> +	dr_mode = "otg";
> +	status = "okay";
> +};
> +
>  &usbphy {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&usb0_id_detect_pin>;
> +	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */

Does that work? 

Your phy driver seem to actively check at probe time for both the ID
detect and VBUS detect pins to be set in the DT, which is not the case
here.

I don't really get either why VBUS detect has to be set. Can't it work
just fine if you have a regulator that you can control and the ID pin
alone ?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 09/20] ARM: dts: sun4i: Enable USB DRC on the Cubieboard
@ 2015-06-18 15:59         ` Maxime Ripard
  0 siblings, 0 replies; 64+ messages in thread
From: Maxime Ripard @ 2015-06-18 15:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hans,

On Fri, Jun 05, 2015 at 09:02:12PM +0200, Hans de Goede wrote:
> Enable the otg/drc usb controller on the Cubieboard. Note that the
> 5V of the otg is directly connected to the general 5V, so we only use
> the id pin.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> index 9afb4e0..046a84d 100644
> --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> @@ -155,6 +155,10 @@
>  	status = "okay";
>  };
>  
> +&otg_sram {
> +	status = "okay";
> +};
> +
>  &pio {
>  	led_pins_cubieboard: led_pins at 0 {
>  		allwinner,pins = "PH20", "PH21";
> @@ -162,6 +166,13 @@
>  		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
>  		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>  	};
> +
> +	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
> +		allwinner,pins = "PH4";
> +		allwinner,function = "gpio_in";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +	};
>  };
>  
>  &reg_ahci_5v {
> @@ -216,7 +227,15 @@
>  	status = "okay";
>  };
>  
> +&usb_otg {
> +	dr_mode = "otg";
> +	status = "okay";
> +};
> +
>  &usbphy {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&usb0_id_detect_pin>;
> +	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */

Does that work? 

Your phy driver seem to actively check at probe time for both the ID
detect and VBUS detect pins to be set in the DT, which is not the case
here.

I don't really get either why VBUS detect has to be set. Can't it work
just fine if you have a regulator that you can control and the ID pin
alone ?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150618/c483ce68/attachment.sig>

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 09/20] ARM: dts: sun4i: Enable USB DRC on the Cubieboard
  2015-06-18 15:59         ` Maxime Ripard
@ 2015-06-18 16:16           ` Hans de Goede
  -1 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-18 16:16 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi,

On 18-06-15 17:59, Maxime Ripard wrote:
> Hi Hans,
>
> On Fri, Jun 05, 2015 at 09:02:12PM +0200, Hans de Goede wrote:
>> Enable the otg/drc usb controller on the Cubieboard. Note that the
>> 5V of the otg is directly connected to the general 5V, so we only use
>> the id pin.
>>
>> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>>   arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 19 +++++++++++++++++++
>>   1 file changed, 19 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> index 9afb4e0..046a84d 100644
>> --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> @@ -155,6 +155,10 @@
>>   	status = "okay";
>>   };
>>
>> +&otg_sram {
>> +	status = "okay";
>> +};
>> +
>>   &pio {
>>   	led_pins_cubieboard: led_pins@0 {
>>   		allwinner,pins = "PH20", "PH21";
>> @@ -162,6 +166,13 @@
>>   		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
>>   		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>>   	};
>> +
>> +	usb0_id_detect_pin: usb0_id_detect_pin@0 {
>> +		allwinner,pins = "PH4";
>> +		allwinner,function = "gpio_in";
>> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
>> +	};
>>   };
>>
>>   &reg_ahci_5v {
>> @@ -216,7 +227,15 @@
>>   	status = "okay";
>>   };
>>
>> +&usb_otg {
>> +	dr_mode = "otg";
>> +	status = "okay";
>> +};
>> +
>>   &usbphy {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&usb0_id_detect_pin>;
>> +	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
>
> Does that work?

Yes :)

> Your phy driver seem to actively check at probe time for both the ID
> detect and VBUS detect pins to be set in the DT, which is not the case
> here.

My initial version did, later on I added a patch adding special handling
for boards which have Vusb hardwired to the 5V of the board such as the
cubieboard (the schematics show both a current regulator and an optional
0 ohm resistor to short-circuit that, it seems that the boards are
shipped with short-circuiting resistor, at least all mine are (both a10
and a20 variants).

See here for the patch:
https://github.com/jwrdegoede/linux-sunxi/commit/b73922986cab2bad9d54a2a1223583008e155bc4

This is part of the v5 phy-sun4i-usb series I send to Kishon a week ago.

> I don't really get either why VBUS detect has to be set. Can't it work
> just fine if you have a regulator that you can control and the ID pin
> alone ?

Not really, we can work around it as done in the above commit, but it
is not ideal.

Vbus detect going low is used by the musb silicon to determine that the
current session has ended, and without this happening it will not
switch from host to device mode or vice versa no matter what the id pin
does.

Vbus detect is also used to not provide power to the port if external
power is present as doing so is not a good idea.

Last vbus-detect is used to detect that the devices connected to the
port are using too much power.

Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 09/20] ARM: dts: sun4i: Enable USB DRC on the Cubieboard
@ 2015-06-18 16:16           ` Hans de Goede
  0 siblings, 0 replies; 64+ messages in thread
From: Hans de Goede @ 2015-06-18 16:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 18-06-15 17:59, Maxime Ripard wrote:
> Hi Hans,
>
> On Fri, Jun 05, 2015 at 09:02:12PM +0200, Hans de Goede wrote:
>> Enable the otg/drc usb controller on the Cubieboard. Note that the
>> 5V of the otg is directly connected to the general 5V, so we only use
>> the id pin.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 19 +++++++++++++++++++
>>   1 file changed, 19 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> index 9afb4e0..046a84d 100644
>> --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> @@ -155,6 +155,10 @@
>>   	status = "okay";
>>   };
>>
>> +&otg_sram {
>> +	status = "okay";
>> +};
>> +
>>   &pio {
>>   	led_pins_cubieboard: led_pins at 0 {
>>   		allwinner,pins = "PH20", "PH21";
>> @@ -162,6 +166,13 @@
>>   		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
>>   		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>>   	};
>> +
>> +	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
>> +		allwinner,pins = "PH4";
>> +		allwinner,function = "gpio_in";
>> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
>> +	};
>>   };
>>
>>   &reg_ahci_5v {
>> @@ -216,7 +227,15 @@
>>   	status = "okay";
>>   };
>>
>> +&usb_otg {
>> +	dr_mode = "otg";
>> +	status = "okay";
>> +};
>> +
>>   &usbphy {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&usb0_id_detect_pin>;
>> +	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
>
> Does that work?

Yes :)

> Your phy driver seem to actively check at probe time for both the ID
> detect and VBUS detect pins to be set in the DT, which is not the case
> here.

My initial version did, later on I added a patch adding special handling
for boards which have Vusb hardwired to the 5V of the board such as the
cubieboard (the schematics show both a current regulator and an optional
0 ohm resistor to short-circuit that, it seems that the boards are
shipped with short-circuiting resistor, at least all mine are (both a10
and a20 variants).

See here for the patch:
https://github.com/jwrdegoede/linux-sunxi/commit/b73922986cab2bad9d54a2a1223583008e155bc4

This is part of the v5 phy-sun4i-usb series I send to Kishon a week ago.

> I don't really get either why VBUS detect has to be set. Can't it work
> just fine if you have a regulator that you can control and the ID pin
> alone ?

Not really, we can work around it as done in the above commit, but it
is not ideal.

Vbus detect going low is used by the musb silicon to determine that the
current session has ended, and without this happening it will not
switch from host to device mode or vice versa no matter what the id pin
does.

Vbus detect is also used to not provide power to the port if external
power is present as doing so is not a good idea.

Last vbus-detect is used to detect that the devices connected to the
port are using too much power.

Regards,

Hans

^ permalink raw reply	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2015-06-18 16:16 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-05 19:02 [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards Hans de Goede
2015-06-05 19:02 ` Hans de Goede
     [not found] ` <1433530943-12599-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-05 19:02   ` [PATCH 01/20] ARM: dts: sun4i: Add USB Dual Role Controller Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 02/20] ARM: dts: sun5i: " Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 03/20] ARM: dts: sun6i: " Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 04/20] ARM: dts: sun7i: " Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 05/20] ARM: dts: sun8i: Add A23 usb-phy and otg nodes Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 06/20] ARM: dts: sun8i: Add A33 " Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 07/20] ARM: dts: sun8i: Add support for USB controllers on A23/A33 Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 08/20] ARM: dts: sun4i: Enable USB DRC on Chuwi V7 CW0825 Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 09/20] ARM: dts: sun4i: Enable USB DRC on the Cubieboard Hans de Goede
2015-06-05 19:02     ` Hans de Goede
     [not found]     ` <1433530943-12599-10-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-18 15:59       ` Maxime Ripard
2015-06-18 15:59         ` Maxime Ripard
2015-06-18 16:16         ` Hans de Goede
2015-06-18 16:16           ` Hans de Goede
2015-06-05 19:02   ` [PATCH 10/20] ARM: dts: sun5i: Enable USB DRC on UTOO P66 Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 11/20] ARM: dts: sun6i: Enable USB DRC on the Mele A1000G quad Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 12/20] ARM: dts: sun7i: Enable USB DRC on Cubietruck Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 13/20] ARM: dts: sun7i: Enable USB DRC on A20-OLinuxIno-Lime Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 14/20] ARM: dts: sun7i: Enable USB DRC on A20-OLinuxIno-Micro Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 15/20] ARM: dts: sun7i: Enable USB DRC on Bananapi (BROKEN!) Hans de Goede
2015-06-05 19:02     ` Hans de Goede
     [not found]     ` <1433530943-12599-16-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-05 19:15       ` Hans de Goede
2015-06-05 19:15         ` Hans de Goede
2015-06-05 19:02   ` [PATCH 16/20] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A23 tablets Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 17/20] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A33 tablet Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 18/20] ARM: dts: sun8i: Enable USB DRC on GA10H-A33 tablets Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 19/20] ARM: dts: sun8i: Enable USB host " Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-05 19:02   ` [PATCH 20/20] ARM: dts: sun8i: sina33: Enable USB hosts Hans de Goede
2015-06-05 19:02     ` Hans de Goede
2015-06-08 10:03   ` [PATCH 00/20] ARM: dts: Add USB and OTG related nodes and enable on various boards Maxime Ripard
2015-06-08 10:03     ` Maxime Ripard
2015-06-08 12:56     ` Michal Suchanek
2015-06-08 12:56       ` [linux-sunxi] " Michal Suchanek
     [not found]       ` <CAOMqctRDEoPiJ95EVgs_ZRQVt=SzK9NPDJGmq3JTJF1kWscmqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-09 20:18         ` Maxime Ripard
2015-06-09 20:18           ` [linux-sunxi] " Maxime Ripard
2015-06-10 13:27     ` Hans de Goede
2015-06-10 13:27       ` Hans de Goede
     [not found]       ` <55783B2C.3080207-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-12 13:27         ` Hans de Goede
2015-06-12 13:27           ` Hans de Goede
     [not found]           ` <557ADE40.70200-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-13 13:30             ` Hans de Goede
2015-06-13 13:30               ` Hans de Goede
     [not found]               ` <557C308A.4010104-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-16  9:36                 ` Maxime Ripard
2015-06-16  9:36                   ` Maxime Ripard
2015-06-16  9:35         ` Maxime Ripard
2015-06-16  9:35           ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.