All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sunxi: Use the axp209 driver on the olimex lime2
@ 2015-08-09 19:02 ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-09 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Olliver Schinagl, dev, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King, devicetree,
	linux-arm-kernel, linux-kernel, Olliver Schinagl

This patch enables usage of the axp209 on the OLinuXino Lime2 and was tested
the OLinuXino Lime2-4GB.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>

Olliver Schinagl (1):
  ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2

 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
 1 file changed, 75 insertions(+), 56 deletions(-)

-- 
2.1.4


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

* [PATCH] ARM: dts: sunxi: Use the axp209 driver on the olimex lime2
@ 2015-08-09 19:02 ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-09 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Olliver Schinagl, dev-3kdeTeqwOZ9EV1b7eY7vFQ, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Olliver Schinagl

This patch enables usage of the axp209 on the OLinuXino Lime2 and was tested
the OLinuXino Lime2-4GB.

Signed-off-by: Olliver Schinagl <oliver-dxLnbx3+1qmEVqv0pETR8A@public.gmane.org>

Olliver Schinagl (1):
  ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2

 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
 1 file changed, 75 insertions(+), 56 deletions(-)

-- 
2.1.4

--
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] 12+ messages in thread

* [PATCH] ARM: dts: sunxi: Use the axp209 driver on the olimex lime2
@ 2015-08-09 19:02 ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-09 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

This patch enables usage of the axp209 on the OLinuXino Lime2 and was tested
the OLinuXino Lime2-4GB.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>

Olliver Schinagl (1):
  ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2

 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
 1 file changed, 75 insertions(+), 56 deletions(-)

-- 
2.1.4

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

* [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-09 19:02   ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-09 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Olliver Schinagl, dev, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King, devicetree,
	linux-arm-kernel, linux-kernel, Olliver Schinagl,
	Olliver Schinagl

From: Olliver Schinagl <o.schinagl@ultimaker.com>

This patch enables the musb-otg USB controller on the Lime2. The Lime2
differs from the Lime1 series in pins used for usb0 power.

Tested on a OlinuXino Lime2-4GB.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
 1 file changed, 75 insertions(+), 56 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
index 22cd052..efd9ebb 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
@@ -71,14 +71,6 @@
 			default-state = "on";
 		};
 	};
-
-	reg_axp_ipsout: axp_ipsout {
-		compatible = "regulator-fixed";
-		regulator-name = "axp-ipsout";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		regulator-always-on;
-	};
 };
 
 &ahci {
@@ -86,6 +78,10 @@
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -112,57 +108,9 @@
 	status = "okay";
 
 	axp209: pmic@34 {
-		compatible = "x-powers,axp209";
 		reg = <0x34>;
 		interrupt-parent = <&nmi_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-		interrupt-controller;
-		#interrupt-cells = <1>;
-
-		acin-supply = <&reg_axp_ipsout>;
-		vin2-supply = <&reg_axp_ipsout>;
-		vin3-supply = <&reg_axp_ipsout>;
-		ldo24in-supply = <&reg_axp_ipsout>;
-		ldo3in-supply = <&reg_axp_ipsout>;
-
-		regulators {
-			vdd_rtc: ldo1 {
-				regulator-min-microvolt = <1300000>;
-				regulator-max-microvolt = <1300000>;
-				regulator-always-on;
-			};
-
-			avcc: ldo2 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-always-on;
-			};
-
-			vcc_csi0: ldo3 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <3500000>;
-				regulator-always-on;
-			};
-
-			vcc_csi1: ldo4 {
-				regulator-min-microvolt = <1250000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-always-on;
-			};
-
-			vdd_cpu: dcdc2 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <2275000>;
-				regulator-always-on;
-			};
-
-			vdd_int: dcdc3 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <3500000>;
-				regulator-always-on;
-			};
-		};
 	};
 };
 
@@ -196,6 +144,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
 		allwinner,pins = "PC3";
@@ -210,6 +162,27 @@
 		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>;
+	};
+
+	usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
+		allwinner,pins = "PC17";
+		allwinner,function = "gpio_out";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
 };
 
 &reg_ahci_5v {
@@ -218,6 +191,42 @@
 	status = "okay";
 };
 
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-always-on;
+	regulator-min-microvolt = <1300000>;
+	regulator-max-microvolt = <1300000>;
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
+	pinctrl-0 = <&usb0_vbus_pin_lime2>;
+	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -232,7 +241,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.1.4


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

* [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-09 19:02   ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-09 19:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Olliver Schinagl, dev-3kdeTeqwOZ9EV1b7eY7vFQ, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Olliver Schinagl,
	Olliver Schinagl

From: Olliver Schinagl <o.schinagl-U3FVU11NWA554TAoqtyWWQ@public.gmane.org>

This patch enables the musb-otg USB controller on the Lime2. The Lime2
differs from the Lime1 series in pins used for usb0 power.

Tested on a OlinuXino Lime2-4GB.

Signed-off-by: Olliver Schinagl <oliver-dxLnbx3+1qmEVqv0pETR8A@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
 1 file changed, 75 insertions(+), 56 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
index 22cd052..efd9ebb 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
@@ -71,14 +71,6 @@
 			default-state = "on";
 		};
 	};
-
-	reg_axp_ipsout: axp_ipsout {
-		compatible = "regulator-fixed";
-		regulator-name = "axp-ipsout";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		regulator-always-on;
-	};
 };
 
 &ahci {
@@ -86,6 +78,10 @@
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -112,57 +108,9 @@
 	status = "okay";
 
 	axp209: pmic@34 {
-		compatible = "x-powers,axp209";
 		reg = <0x34>;
 		interrupt-parent = <&nmi_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-		interrupt-controller;
-		#interrupt-cells = <1>;
-
-		acin-supply = <&reg_axp_ipsout>;
-		vin2-supply = <&reg_axp_ipsout>;
-		vin3-supply = <&reg_axp_ipsout>;
-		ldo24in-supply = <&reg_axp_ipsout>;
-		ldo3in-supply = <&reg_axp_ipsout>;
-
-		regulators {
-			vdd_rtc: ldo1 {
-				regulator-min-microvolt = <1300000>;
-				regulator-max-microvolt = <1300000>;
-				regulator-always-on;
-			};
-
-			avcc: ldo2 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-always-on;
-			};
-
-			vcc_csi0: ldo3 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <3500000>;
-				regulator-always-on;
-			};
-
-			vcc_csi1: ldo4 {
-				regulator-min-microvolt = <1250000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-always-on;
-			};
-
-			vdd_cpu: dcdc2 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <2275000>;
-				regulator-always-on;
-			};
-
-			vdd_int: dcdc3 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <3500000>;
-				regulator-always-on;
-			};
-		};
 	};
 };
 
@@ -196,6 +144,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
 		allwinner,pins = "PC3";
@@ -210,6 +162,27 @@
 		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>;
+	};
+
+	usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
+		allwinner,pins = "PC17";
+		allwinner,function = "gpio_out";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
 };
 
 &reg_ahci_5v {
@@ -218,6 +191,42 @@
 	status = "okay";
 };
 
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-always-on;
+	regulator-min-microvolt = <1300000>;
+	regulator-max-microvolt = <1300000>;
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
+	pinctrl-0 = <&usb0_vbus_pin_lime2>;
+	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -232,7 +241,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.1.4

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

* [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-09 19:02   ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-09 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

From: Olliver Schinagl <o.schinagl@ultimaker.com>

This patch enables the musb-otg USB controller on the Lime2. The Lime2
differs from the Lime1 series in pins used for usb0 power.

Tested on a OlinuXino Lime2-4GB.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
 1 file changed, 75 insertions(+), 56 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
index 22cd052..efd9ebb 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
@@ -71,14 +71,6 @@
 			default-state = "on";
 		};
 	};
-
-	reg_axp_ipsout: axp_ipsout {
-		compatible = "regulator-fixed";
-		regulator-name = "axp-ipsout";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		regulator-always-on;
-	};
 };
 
 &ahci {
@@ -86,6 +78,10 @@
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -112,57 +108,9 @@
 	status = "okay";
 
 	axp209: pmic at 34 {
-		compatible = "x-powers,axp209";
 		reg = <0x34>;
 		interrupt-parent = <&nmi_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-		interrupt-controller;
-		#interrupt-cells = <1>;
-
-		acin-supply = <&reg_axp_ipsout>;
-		vin2-supply = <&reg_axp_ipsout>;
-		vin3-supply = <&reg_axp_ipsout>;
-		ldo24in-supply = <&reg_axp_ipsout>;
-		ldo3in-supply = <&reg_axp_ipsout>;
-
-		regulators {
-			vdd_rtc: ldo1 {
-				regulator-min-microvolt = <1300000>;
-				regulator-max-microvolt = <1300000>;
-				regulator-always-on;
-			};
-
-			avcc: ldo2 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-always-on;
-			};
-
-			vcc_csi0: ldo3 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <3500000>;
-				regulator-always-on;
-			};
-
-			vcc_csi1: ldo4 {
-				regulator-min-microvolt = <1250000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-always-on;
-			};
-
-			vdd_cpu: dcdc2 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <2275000>;
-				regulator-always-on;
-			};
-
-			vdd_int: dcdc3 {
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <3500000>;
-				regulator-always-on;
-			};
-		};
 	};
 };
 
@@ -196,6 +144,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin at 1 {
 		allwinner,pins = "PC3";
@@ -210,6 +162,27 @@
 		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>;
+	};
+
+	usb0_vbus_pin_lime2: usb0_vbus_pin at 0 {
+		allwinner,pins = "PC17";
+		allwinner,function = "gpio_out";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
 };
 
 &reg_ahci_5v {
@@ -218,6 +191,42 @@
 	status = "okay";
 };
 
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-always-on;
+	regulator-min-microvolt = <1300000>;
+	regulator-max-microvolt = <1300000>;
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
+	pinctrl-0 = <&usb0_vbus_pin_lime2>;
+	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -232,7 +241,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.1.4

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

* Re: [linux-sunxi] [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-09 23:05     ` Iain Paton
  0 siblings, 0 replies; 12+ messages in thread
From: Iain Paton @ 2015-08-09 23:05 UTC (permalink / raw)
  To: oliver
  Cc: Maxime Ripard, Olliver Schinagl, dev, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Russell King, devicetree,
	linux-arm-kernel, linux-kernel, Olliver Schinagl

NAK. This does much more than enabling the otg port.

Neither wholesale re-writing the regulator node or hooking up the 
dcdc2 regulator to the operating points definition is required in order 
to enable the otg port.  

At the very least you need to split your patches and describe them 
properly rather than trying to get additional changes that are likely 
to cause further discussion through unnoticed using a misleading 
subject.

Rgds,
Iain
 
On 09/08/15 20:02, Olliver Schinagl wrote:
> From: Olliver Schinagl <o.schinagl@ultimaker.com>
> 
> This patch enables the musb-otg USB controller on the Lime2. The Lime2
> differs from the Lime1 series in pins used for usb0 power.
> 
> Tested on a OlinuXino Lime2-4GB.
> 
> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
> ---
>  arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
>  1 file changed, 75 insertions(+), 56 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> index 22cd052..efd9ebb 100644
> --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> @@ -71,14 +71,6 @@
>  			default-state = "on";
>  		};
>  	};
> -
> -	reg_axp_ipsout: axp_ipsout {
> -		compatible = "regulator-fixed";
> -		regulator-name = "axp-ipsout";
> -		regulator-min-microvolt = <5000000>;
> -		regulator-max-microvolt = <5000000>;
> -		regulator-always-on;
> -	};
>  };
>  
>  &ahci {
> @@ -86,6 +78,10 @@
>  	status = "okay";
>  };
>  
> +&cpu0 {
> +	cpu-supply = <&reg_dcdc2>;
> +};
> +
>  &ehci0 {
>  	status = "okay";
>  };
> @@ -112,57 +108,9 @@
>  	status = "okay";
>  
>  	axp209: pmic@34 {
> -		compatible = "x-powers,axp209";
>  		reg = <0x34>;
>  		interrupt-parent = <&nmi_intc>;
>  		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> -
> -		interrupt-controller;
> -		#interrupt-cells = <1>;
> -
> -		acin-supply = <&reg_axp_ipsout>;
> -		vin2-supply = <&reg_axp_ipsout>;
> -		vin3-supply = <&reg_axp_ipsout>;
> -		ldo24in-supply = <&reg_axp_ipsout>;
> -		ldo3in-supply = <&reg_axp_ipsout>;
> -
> -		regulators {
> -			vdd_rtc: ldo1 {
> -				regulator-min-microvolt = <1300000>;
> -				regulator-max-microvolt = <1300000>;
> -				regulator-always-on;
> -			};
> -
> -			avcc: ldo2 {
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-always-on;
> -			};
> -
> -			vcc_csi0: ldo3 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <3500000>;
> -				regulator-always-on;
> -			};
> -
> -			vcc_csi1: ldo4 {
> -				regulator-min-microvolt = <1250000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-always-on;
> -			};
> -
> -			vdd_cpu: dcdc2 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <2275000>;
> -				regulator-always-on;
> -			};
> -
> -			vdd_int: dcdc3 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <3500000>;
> -				regulator-always-on;
> -			};
> -		};
>  	};
>  };
>  
> @@ -196,6 +144,10 @@
>  	status = "okay";
>  };
>  
> +&otg_sram {
> +	status = "okay";
> +};
> +
>  &pio {
>  	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
>  		allwinner,pins = "PC3";
> @@ -210,6 +162,27 @@
>  		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>;
> +	};
> +
> +	usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
> +		allwinner,pins = "PC17";
> +		allwinner,function = "gpio_out";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +	};
>  };
>  
>  &reg_ahci_5v {
> @@ -218,6 +191,42 @@
>  	status = "okay";
>  };
>  
> +#include "axp209.dtsi"
> +
> +&reg_dcdc2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1450000>;
> +	regulator-name = "vdd-cpu";
> +};
> +
> +&reg_dcdc3 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1400000>;
> +	regulator-name = "vdd-int-dll";
> +};
> +
> +&reg_ldo1 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1300000>;
> +	regulator-max-microvolt = <1300000>;
> +	regulator-name = "vdd-rtc";
> +};
> +
> +&reg_ldo2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3000000>;
> +	regulator-max-microvolt = <3000000>;
> +	regulator-name = "avcc";
> +};
> +
> +&reg_usb0_vbus {
> +	pinctrl-0 = <&usb0_vbus_pin_lime2>;
> +	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
> +	status = "okay";
> +};
> +
>  &reg_usb1_vbus {
>  	status = "okay";
>  };
> @@ -232,7 +241,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] 12+ messages in thread

* Re: [linux-sunxi] [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-09 23:05     ` Iain Paton
  0 siblings, 0 replies; 12+ messages in thread
From: Iain Paton @ 2015-08-09 23:05 UTC (permalink / raw)
  To: oliver-dxLnbx3+1qmEVqv0pETR8A
  Cc: Maxime Ripard, Olliver Schinagl, dev-3kdeTeqwOZ9EV1b7eY7vFQ,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Russell King, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Olliver Schinagl

NAK. This does much more than enabling the otg port.

Neither wholesale re-writing the regulator node or hooking up the 
dcdc2 regulator to the operating points definition is required in order 
to enable the otg port.  

At the very least you need to split your patches and describe them 
properly rather than trying to get additional changes that are likely 
to cause further discussion through unnoticed using a misleading 
subject.

Rgds,
Iain
 
On 09/08/15 20:02, Olliver Schinagl wrote:
> From: Olliver Schinagl <o.schinagl-U3FVU11NWA554TAoqtyWWQ@public.gmane.org>
> 
> This patch enables the musb-otg USB controller on the Lime2. The Lime2
> differs from the Lime1 series in pins used for usb0 power.
> 
> Tested on a OlinuXino Lime2-4GB.
> 
> Signed-off-by: Olliver Schinagl <oliver-dxLnbx3+1qmEVqv0pETR8A@public.gmane.org>
> ---
>  arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
>  1 file changed, 75 insertions(+), 56 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> index 22cd052..efd9ebb 100644
> --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> @@ -71,14 +71,6 @@
>  			default-state = "on";
>  		};
>  	};
> -
> -	reg_axp_ipsout: axp_ipsout {
> -		compatible = "regulator-fixed";
> -		regulator-name = "axp-ipsout";
> -		regulator-min-microvolt = <5000000>;
> -		regulator-max-microvolt = <5000000>;
> -		regulator-always-on;
> -	};
>  };
>  
>  &ahci {
> @@ -86,6 +78,10 @@
>  	status = "okay";
>  };
>  
> +&cpu0 {
> +	cpu-supply = <&reg_dcdc2>;
> +};
> +
>  &ehci0 {
>  	status = "okay";
>  };
> @@ -112,57 +108,9 @@
>  	status = "okay";
>  
>  	axp209: pmic@34 {
> -		compatible = "x-powers,axp209";
>  		reg = <0x34>;
>  		interrupt-parent = <&nmi_intc>;
>  		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> -
> -		interrupt-controller;
> -		#interrupt-cells = <1>;
> -
> -		acin-supply = <&reg_axp_ipsout>;
> -		vin2-supply = <&reg_axp_ipsout>;
> -		vin3-supply = <&reg_axp_ipsout>;
> -		ldo24in-supply = <&reg_axp_ipsout>;
> -		ldo3in-supply = <&reg_axp_ipsout>;
> -
> -		regulators {
> -			vdd_rtc: ldo1 {
> -				regulator-min-microvolt = <1300000>;
> -				regulator-max-microvolt = <1300000>;
> -				regulator-always-on;
> -			};
> -
> -			avcc: ldo2 {
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-always-on;
> -			};
> -
> -			vcc_csi0: ldo3 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <3500000>;
> -				regulator-always-on;
> -			};
> -
> -			vcc_csi1: ldo4 {
> -				regulator-min-microvolt = <1250000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-always-on;
> -			};
> -
> -			vdd_cpu: dcdc2 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <2275000>;
> -				regulator-always-on;
> -			};
> -
> -			vdd_int: dcdc3 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <3500000>;
> -				regulator-always-on;
> -			};
> -		};
>  	};
>  };
>  
> @@ -196,6 +144,10 @@
>  	status = "okay";
>  };
>  
> +&otg_sram {
> +	status = "okay";
> +};
> +
>  &pio {
>  	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
>  		allwinner,pins = "PC3";
> @@ -210,6 +162,27 @@
>  		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>;
> +	};
> +
> +	usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
> +		allwinner,pins = "PC17";
> +		allwinner,function = "gpio_out";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +	};
>  };
>  
>  &reg_ahci_5v {
> @@ -218,6 +191,42 @@
>  	status = "okay";
>  };
>  
> +#include "axp209.dtsi"
> +
> +&reg_dcdc2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1450000>;
> +	regulator-name = "vdd-cpu";
> +};
> +
> +&reg_dcdc3 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1400000>;
> +	regulator-name = "vdd-int-dll";
> +};
> +
> +&reg_ldo1 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1300000>;
> +	regulator-max-microvolt = <1300000>;
> +	regulator-name = "vdd-rtc";
> +};
> +
> +&reg_ldo2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3000000>;
> +	regulator-max-microvolt = <3000000>;
> +	regulator-name = "avcc";
> +};
> +
> +&reg_usb0_vbus {
> +	pinctrl-0 = <&usb0_vbus_pin_lime2>;
> +	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
> +	status = "okay";
> +};
> +
>  &reg_usb1_vbus {
>  	status = "okay";
>  };
> @@ -232,7 +241,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] 12+ messages in thread

* [linux-sunxi] [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-09 23:05     ` Iain Paton
  0 siblings, 0 replies; 12+ messages in thread
From: Iain Paton @ 2015-08-09 23:05 UTC (permalink / raw)
  To: linux-arm-kernel

NAK. This does much more than enabling the otg port.

Neither wholesale re-writing the regulator node or hooking up the 
dcdc2 regulator to the operating points definition is required in order 
to enable the otg port.  

At the very least you need to split your patches and describe them 
properly rather than trying to get additional changes that are likely 
to cause further discussion through unnoticed using a misleading 
subject.

Rgds,
Iain
 
On 09/08/15 20:02, Olliver Schinagl wrote:
> From: Olliver Schinagl <o.schinagl@ultimaker.com>
> 
> This patch enables the musb-otg USB controller on the Lime2. The Lime2
> differs from the Lime1 series in pins used for usb0 power.
> 
> Tested on a OlinuXino Lime2-4GB.
> 
> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
> ---
>  arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
>  1 file changed, 75 insertions(+), 56 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> index 22cd052..efd9ebb 100644
> --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> @@ -71,14 +71,6 @@
>  			default-state = "on";
>  		};
>  	};
> -
> -	reg_axp_ipsout: axp_ipsout {
> -		compatible = "regulator-fixed";
> -		regulator-name = "axp-ipsout";
> -		regulator-min-microvolt = <5000000>;
> -		regulator-max-microvolt = <5000000>;
> -		regulator-always-on;
> -	};
>  };
>  
>  &ahci {
> @@ -86,6 +78,10 @@
>  	status = "okay";
>  };
>  
> +&cpu0 {
> +	cpu-supply = <&reg_dcdc2>;
> +};
> +
>  &ehci0 {
>  	status = "okay";
>  };
> @@ -112,57 +108,9 @@
>  	status = "okay";
>  
>  	axp209: pmic at 34 {
> -		compatible = "x-powers,axp209";
>  		reg = <0x34>;
>  		interrupt-parent = <&nmi_intc>;
>  		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> -
> -		interrupt-controller;
> -		#interrupt-cells = <1>;
> -
> -		acin-supply = <&reg_axp_ipsout>;
> -		vin2-supply = <&reg_axp_ipsout>;
> -		vin3-supply = <&reg_axp_ipsout>;
> -		ldo24in-supply = <&reg_axp_ipsout>;
> -		ldo3in-supply = <&reg_axp_ipsout>;
> -
> -		regulators {
> -			vdd_rtc: ldo1 {
> -				regulator-min-microvolt = <1300000>;
> -				regulator-max-microvolt = <1300000>;
> -				regulator-always-on;
> -			};
> -
> -			avcc: ldo2 {
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-always-on;
> -			};
> -
> -			vcc_csi0: ldo3 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <3500000>;
> -				regulator-always-on;
> -			};
> -
> -			vcc_csi1: ldo4 {
> -				regulator-min-microvolt = <1250000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-always-on;
> -			};
> -
> -			vdd_cpu: dcdc2 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <2275000>;
> -				regulator-always-on;
> -			};
> -
> -			vdd_int: dcdc3 {
> -				regulator-min-microvolt = <700000>;
> -				regulator-max-microvolt = <3500000>;
> -				regulator-always-on;
> -			};
> -		};
>  	};
>  };
>  
> @@ -196,6 +144,10 @@
>  	status = "okay";
>  };
>  
> +&otg_sram {
> +	status = "okay";
> +};
> +
>  &pio {
>  	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin at 1 {
>  		allwinner,pins = "PC3";
> @@ -210,6 +162,27 @@
>  		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>;
> +	};
> +
> +	usb0_vbus_pin_lime2: usb0_vbus_pin at 0 {
> +		allwinner,pins = "PC17";
> +		allwinner,function = "gpio_out";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +	};
>  };
>  
>  &reg_ahci_5v {
> @@ -218,6 +191,42 @@
>  	status = "okay";
>  };
>  
> +#include "axp209.dtsi"
> +
> +&reg_dcdc2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1450000>;
> +	regulator-name = "vdd-cpu";
> +};
> +
> +&reg_dcdc3 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1400000>;
> +	regulator-name = "vdd-int-dll";
> +};
> +
> +&reg_ldo1 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1300000>;
> +	regulator-max-microvolt = <1300000>;
> +	regulator-name = "vdd-rtc";
> +};
> +
> +&reg_ldo2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3000000>;
> +	regulator-max-microvolt = <3000000>;
> +	regulator-name = "avcc";
> +};
> +
> +&reg_usb0_vbus {
> +	pinctrl-0 = <&usb0_vbus_pin_lime2>;
> +	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
> +	status = "okay";
> +};
> +
>  &reg_usb1_vbus {
>  	status = "okay";
>  };
> @@ -232,7 +241,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] 12+ messages in thread

* Re: [linux-sunxi] [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-10  8:43       ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-10  8:43 UTC (permalink / raw)
  To: Iain Paton
  Cc: Maxime Ripard, Olliver Schinagl, dev, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Russell King, devicetree,
	linux-arm-kernel, linux-kernel, Olliver Schinagl

Yeah I just noticed as well that for some reason i've sent a merged patch :(

I all ready fixed it locally this morning and will re-send the patches. 
I wonder what I did though ..

Sorry again,

Olliver

On 10-08-15 01:05, Iain Paton wrote:
> NAK. This does much more than enabling the otg port.
>
> Neither wholesale re-writing the regulator node or hooking up the
> dcdc2 regulator to the operating points definition is required in order
> to enable the otg port.
>
> At the very least you need to split your patches and describe them
> properly rather than trying to get additional changes that are likely
> to cause further discussion through unnoticed using a misleading
> subject.
>
> Rgds,
> Iain
>   
> On 09/08/15 20:02, Olliver Schinagl wrote:
>> From: Olliver Schinagl <o.schinagl@ultimaker.com>
>>
>> This patch enables the musb-otg USB controller on the Lime2. The Lime2
>> differs from the Lime1 series in pins used for usb0 power.
>>
>> Tested on a OlinuXino Lime2-4GB.
>>
>> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
>> ---
>>   arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
>>   1 file changed, 75 insertions(+), 56 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> index 22cd052..efd9ebb 100644
>> --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> @@ -71,14 +71,6 @@
>>   			default-state = "on";
>>   		};
>>   	};
>> -
>> -	reg_axp_ipsout: axp_ipsout {
>> -		compatible = "regulator-fixed";
>> -		regulator-name = "axp-ipsout";
>> -		regulator-min-microvolt = <5000000>;
>> -		regulator-max-microvolt = <5000000>;
>> -		regulator-always-on;
>> -	};
>>   };
>>   
>>   &ahci {
>> @@ -86,6 +78,10 @@
>>   	status = "okay";
>>   };
>>   
>> +&cpu0 {
>> +	cpu-supply = <&reg_dcdc2>;
>> +};
>> +
>>   &ehci0 {
>>   	status = "okay";
>>   };
>> @@ -112,57 +108,9 @@
>>   	status = "okay";
>>   
>>   	axp209: pmic@34 {
>> -		compatible = "x-powers,axp209";
>>   		reg = <0x34>;
>>   		interrupt-parent = <&nmi_intc>;
>>   		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> -
>> -		interrupt-controller;
>> -		#interrupt-cells = <1>;
>> -
>> -		acin-supply = <&reg_axp_ipsout>;
>> -		vin2-supply = <&reg_axp_ipsout>;
>> -		vin3-supply = <&reg_axp_ipsout>;
>> -		ldo24in-supply = <&reg_axp_ipsout>;
>> -		ldo3in-supply = <&reg_axp_ipsout>;
>> -
>> -		regulators {
>> -			vdd_rtc: ldo1 {
>> -				regulator-min-microvolt = <1300000>;
>> -				regulator-max-microvolt = <1300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			avcc: ldo2 {
>> -				regulator-min-microvolt = <1800000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vcc_csi0: ldo3 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <3500000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vcc_csi1: ldo4 {
>> -				regulator-min-microvolt = <1250000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vdd_cpu: dcdc2 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <2275000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vdd_int: dcdc3 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <3500000>;
>> -				regulator-always-on;
>> -			};
>> -		};
>>   	};
>>   };
>>   
>> @@ -196,6 +144,10 @@
>>   	status = "okay";
>>   };
>>   
>> +&otg_sram {
>> +	status = "okay";
>> +};
>> +
>>   &pio {
>>   	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
>>   		allwinner,pins = "PC3";
>> @@ -210,6 +162,27 @@
>>   		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>;
>> +	};
>> +
>> +	usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
>> +		allwinner,pins = "PC17";
>> +		allwinner,function = "gpio_out";
>> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>> +	};
>>   };
>>   
>>   &reg_ahci_5v {
>> @@ -218,6 +191,42 @@
>>   	status = "okay";
>>   };
>>   
>> +#include "axp209.dtsi"
>> +
>> +&reg_dcdc2 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1000000>;
>> +	regulator-max-microvolt = <1450000>;
>> +	regulator-name = "vdd-cpu";
>> +};
>> +
>> +&reg_dcdc3 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1000000>;
>> +	regulator-max-microvolt = <1400000>;
>> +	regulator-name = "vdd-int-dll";
>> +};
>> +
>> +&reg_ldo1 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1300000>;
>> +	regulator-max-microvolt = <1300000>;
>> +	regulator-name = "vdd-rtc";
>> +};
>> +
>> +&reg_ldo2 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <3000000>;
>> +	regulator-max-microvolt = <3000000>;
>> +	regulator-name = "avcc";
>> +};
>> +
>> +&reg_usb0_vbus {
>> +	pinctrl-0 = <&usb0_vbus_pin_lime2>;
>> +	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
>> +	status = "okay";
>> +};
>> +
>>   &reg_usb1_vbus {
>>   	status = "okay";
>>   };
>> @@ -232,7 +241,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] 12+ messages in thread

* Re: [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-10  8:43       ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-10  8:43 UTC (permalink / raw)
  To: Iain Paton
  Cc: Maxime Ripard, Olliver Schinagl, dev-3kdeTeqwOZ9EV1b7eY7vFQ,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Russell King, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Olliver Schinagl

Yeah I just noticed as well that for some reason i've sent a merged patch :(

I all ready fixed it locally this morning and will re-send the patches. 
I wonder what I did though ..

Sorry again,

Olliver

On 10-08-15 01:05, Iain Paton wrote:
> NAK. This does much more than enabling the otg port.
>
> Neither wholesale re-writing the regulator node or hooking up the
> dcdc2 regulator to the operating points definition is required in order
> to enable the otg port.
>
> At the very least you need to split your patches and describe them
> properly rather than trying to get additional changes that are likely
> to cause further discussion through unnoticed using a misleading
> subject.
>
> Rgds,
> Iain
>   
> On 09/08/15 20:02, Olliver Schinagl wrote:
>> From: Olliver Schinagl <o.schinagl-U3FVU11NWA554TAoqtyWWQ@public.gmane.org>
>>
>> This patch enables the musb-otg USB controller on the Lime2. The Lime2
>> differs from the Lime1 series in pins used for usb0 power.
>>
>> Tested on a OlinuXino Lime2-4GB.
>>
>> Signed-off-by: Olliver Schinagl <oliver-dxLnbx3+1qmEVqv0pETR8A@public.gmane.org>
>> ---
>>   arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
>>   1 file changed, 75 insertions(+), 56 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> index 22cd052..efd9ebb 100644
>> --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> @@ -71,14 +71,6 @@
>>   			default-state = "on";
>>   		};
>>   	};
>> -
>> -	reg_axp_ipsout: axp_ipsout {
>> -		compatible = "regulator-fixed";
>> -		regulator-name = "axp-ipsout";
>> -		regulator-min-microvolt = <5000000>;
>> -		regulator-max-microvolt = <5000000>;
>> -		regulator-always-on;
>> -	};
>>   };
>>   
>>   &ahci {
>> @@ -86,6 +78,10 @@
>>   	status = "okay";
>>   };
>>   
>> +&cpu0 {
>> +	cpu-supply = <&reg_dcdc2>;
>> +};
>> +
>>   &ehci0 {
>>   	status = "okay";
>>   };
>> @@ -112,57 +108,9 @@
>>   	status = "okay";
>>   
>>   	axp209: pmic@34 {
>> -		compatible = "x-powers,axp209";
>>   		reg = <0x34>;
>>   		interrupt-parent = <&nmi_intc>;
>>   		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> -
>> -		interrupt-controller;
>> -		#interrupt-cells = <1>;
>> -
>> -		acin-supply = <&reg_axp_ipsout>;
>> -		vin2-supply = <&reg_axp_ipsout>;
>> -		vin3-supply = <&reg_axp_ipsout>;
>> -		ldo24in-supply = <&reg_axp_ipsout>;
>> -		ldo3in-supply = <&reg_axp_ipsout>;
>> -
>> -		regulators {
>> -			vdd_rtc: ldo1 {
>> -				regulator-min-microvolt = <1300000>;
>> -				regulator-max-microvolt = <1300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			avcc: ldo2 {
>> -				regulator-min-microvolt = <1800000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vcc_csi0: ldo3 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <3500000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vcc_csi1: ldo4 {
>> -				regulator-min-microvolt = <1250000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vdd_cpu: dcdc2 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <2275000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vdd_int: dcdc3 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <3500000>;
>> -				regulator-always-on;
>> -			};
>> -		};
>>   	};
>>   };
>>   
>> @@ -196,6 +144,10 @@
>>   	status = "okay";
>>   };
>>   
>> +&otg_sram {
>> +	status = "okay";
>> +};
>> +
>>   &pio {
>>   	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
>>   		allwinner,pins = "PC3";
>> @@ -210,6 +162,27 @@
>>   		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>;
>> +	};
>> +
>> +	usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
>> +		allwinner,pins = "PC17";
>> +		allwinner,function = "gpio_out";
>> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>> +	};
>>   };
>>   
>>   &reg_ahci_5v {
>> @@ -218,6 +191,42 @@
>>   	status = "okay";
>>   };
>>   
>> +#include "axp209.dtsi"
>> +
>> +&reg_dcdc2 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1000000>;
>> +	regulator-max-microvolt = <1450000>;
>> +	regulator-name = "vdd-cpu";
>> +};
>> +
>> +&reg_dcdc3 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1000000>;
>> +	regulator-max-microvolt = <1400000>;
>> +	regulator-name = "vdd-int-dll";
>> +};
>> +
>> +&reg_ldo1 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1300000>;
>> +	regulator-max-microvolt = <1300000>;
>> +	regulator-name = "vdd-rtc";
>> +};
>> +
>> +&reg_ldo2 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <3000000>;
>> +	regulator-max-microvolt = <3000000>;
>> +	regulator-name = "avcc";
>> +};
>> +
>> +&reg_usb0_vbus {
>> +	pinctrl-0 = <&usb0_vbus_pin_lime2>;
>> +	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
>> +	status = "okay";
>> +};
>> +
>>   &reg_usb1_vbus {
>>   	status = "okay";
>>   };
>> @@ -232,7 +241,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] 12+ messages in thread

* [linux-sunxi] [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2
@ 2015-08-10  8:43       ` Olliver Schinagl
  0 siblings, 0 replies; 12+ messages in thread
From: Olliver Schinagl @ 2015-08-10  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

Yeah I just noticed as well that for some reason i've sent a merged patch :(

I all ready fixed it locally this morning and will re-send the patches. 
I wonder what I did though ..

Sorry again,

Olliver

On 10-08-15 01:05, Iain Paton wrote:
> NAK. This does much more than enabling the otg port.
>
> Neither wholesale re-writing the regulator node or hooking up the
> dcdc2 regulator to the operating points definition is required in order
> to enable the otg port.
>
> At the very least you need to split your patches and describe them
> properly rather than trying to get additional changes that are likely
> to cause further discussion through unnoticed using a misleading
> subject.
>
> Rgds,
> Iain
>   
> On 09/08/15 20:02, Olliver Schinagl wrote:
>> From: Olliver Schinagl <o.schinagl@ultimaker.com>
>>
>> This patch enables the musb-otg USB controller on the Lime2. The Lime2
>> differs from the Lime1 series in pins used for usb0 power.
>>
>> Tested on a OlinuXino Lime2-4GB.
>>
>> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
>> ---
>>   arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 131 ++++++++++++++----------
>>   1 file changed, 75 insertions(+), 56 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> index 22cd052..efd9ebb 100644
>> --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
>> @@ -71,14 +71,6 @@
>>   			default-state = "on";
>>   		};
>>   	};
>> -
>> -	reg_axp_ipsout: axp_ipsout {
>> -		compatible = "regulator-fixed";
>> -		regulator-name = "axp-ipsout";
>> -		regulator-min-microvolt = <5000000>;
>> -		regulator-max-microvolt = <5000000>;
>> -		regulator-always-on;
>> -	};
>>   };
>>   
>>   &ahci {
>> @@ -86,6 +78,10 @@
>>   	status = "okay";
>>   };
>>   
>> +&cpu0 {
>> +	cpu-supply = <&reg_dcdc2>;
>> +};
>> +
>>   &ehci0 {
>>   	status = "okay";
>>   };
>> @@ -112,57 +108,9 @@
>>   	status = "okay";
>>   
>>   	axp209: pmic at 34 {
>> -		compatible = "x-powers,axp209";
>>   		reg = <0x34>;
>>   		interrupt-parent = <&nmi_intc>;
>>   		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> -
>> -		interrupt-controller;
>> -		#interrupt-cells = <1>;
>> -
>> -		acin-supply = <&reg_axp_ipsout>;
>> -		vin2-supply = <&reg_axp_ipsout>;
>> -		vin3-supply = <&reg_axp_ipsout>;
>> -		ldo24in-supply = <&reg_axp_ipsout>;
>> -		ldo3in-supply = <&reg_axp_ipsout>;
>> -
>> -		regulators {
>> -			vdd_rtc: ldo1 {
>> -				regulator-min-microvolt = <1300000>;
>> -				regulator-max-microvolt = <1300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			avcc: ldo2 {
>> -				regulator-min-microvolt = <1800000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vcc_csi0: ldo3 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <3500000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vcc_csi1: ldo4 {
>> -				regulator-min-microvolt = <1250000>;
>> -				regulator-max-microvolt = <3300000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vdd_cpu: dcdc2 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <2275000>;
>> -				regulator-always-on;
>> -			};
>> -
>> -			vdd_int: dcdc3 {
>> -				regulator-min-microvolt = <700000>;
>> -				regulator-max-microvolt = <3500000>;
>> -				regulator-always-on;
>> -			};
>> -		};
>>   	};
>>   };
>>   
>> @@ -196,6 +144,10 @@
>>   	status = "okay";
>>   };
>>   
>> +&otg_sram {
>> +	status = "okay";
>> +};
>> +
>>   &pio {
>>   	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin at 1 {
>>   		allwinner,pins = "PC3";
>> @@ -210,6 +162,27 @@
>>   		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>;
>> +	};
>> +
>> +	usb0_vbus_pin_lime2: usb0_vbus_pin at 0 {
>> +		allwinner,pins = "PC17";
>> +		allwinner,function = "gpio_out";
>> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>> +	};
>>   };
>>   
>>   &reg_ahci_5v {
>> @@ -218,6 +191,42 @@
>>   	status = "okay";
>>   };
>>   
>> +#include "axp209.dtsi"
>> +
>> +&reg_dcdc2 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1000000>;
>> +	regulator-max-microvolt = <1450000>;
>> +	regulator-name = "vdd-cpu";
>> +};
>> +
>> +&reg_dcdc3 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1000000>;
>> +	regulator-max-microvolt = <1400000>;
>> +	regulator-name = "vdd-int-dll";
>> +};
>> +
>> +&reg_ldo1 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <1300000>;
>> +	regulator-max-microvolt = <1300000>;
>> +	regulator-name = "vdd-rtc";
>> +};
>> +
>> +&reg_ldo2 {
>> +	regulator-always-on;
>> +	regulator-min-microvolt = <3000000>;
>> +	regulator-max-microvolt = <3000000>;
>> +	regulator-name = "avcc";
>> +};
>> +
>> +&reg_usb0_vbus {
>> +	pinctrl-0 = <&usb0_vbus_pin_lime2>;
>> +	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
>> +	status = "okay";
>> +};
>> +
>>   &reg_usb1_vbus {
>>   	status = "okay";
>>   };
>> @@ -232,7 +241,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] 12+ messages in thread

end of thread, other threads:[~2015-08-10  8:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-09 19:02 [PATCH] ARM: dts: sunxi: Use the axp209 driver on the olimex lime2 Olliver Schinagl
2015-08-09 19:02 ` Olliver Schinagl
2015-08-09 19:02 ` Olliver Schinagl
2015-08-09 19:02 ` [PATCH] ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2 Olliver Schinagl
2015-08-09 19:02   ` Olliver Schinagl
2015-08-09 19:02   ` Olliver Schinagl
2015-08-09 23:05   ` [linux-sunxi] " Iain Paton
2015-08-09 23:05     ` Iain Paton
2015-08-09 23:05     ` Iain Paton
2015-08-10  8:43     ` Olliver Schinagl
2015-08-10  8:43       ` Olliver Schinagl
2015-08-10  8:43       ` Olliver Schinagl

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.