Skip to contentSkip to conversation

ARM: dtsi: imx6qdl-sabresd: Add USB host 1 VBUS regulator

PATCH New Peter Chen 2 participants 5 messages Aug 12, 2013

Subsystems (2)
lore
Share & tools
lore

Peter Chen

author
#0 lore raw

PATCH 1/2 ARM: dtsi: imx6qdl-sabresd: Add USB host 1 VBUS regulator

We enabled USB host 1, so host 1's vbus should be on to let host 1 work.

---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +18 -7
index 61b8959..b4db3f7 100644
@@ -34,6 +34,15 @@
 			enable-active-high;
 		};
 
+		reg_usb_h1_vbus: usb_h1_vbus {
+			compatible = "regulator-fixed";
+			regulator-name = "usb_h1_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			gpio = <&gpio1 29 0>;
+			enable-active-high;
+		};
+
 		reg_audio: wm8962_supply {
 			compatible = "regulator-fixed";
 			regulator-name = "wm8962-supply";
@@ -188,13 +197,14 @@
 	hog {
 		pinctrl_hog: hoggrp {
 			fsl,pins = <
-				MX6QDL_PAD_GPIO_4__GPIO1_IO04   0x80000000
-				MX6QDL_PAD_GPIO_5__GPIO1_IO05   0x80000000
-				MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x80000000
-				MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x80000000
-				MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x80000000
-				MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x80000000
-				MX6QDL_PAD_GPIO_0__CCM_CLKO1    0x130b0
+				MX6QDL_PAD_GPIO_4__GPIO1_IO04   	0x80000000
+				MX6QDL_PAD_GPIO_5__GPIO1_IO05   	0x80000000
+				MX6QDL_PAD_NANDF_D0__GPIO2_IO00 	0x80000000
+				MX6QDL_PAD_NANDF_D1__GPIO2_IO01 	0x80000000
+				MX6QDL_PAD_NANDF_D2__GPIO2_IO02 	0x80000000
+				MX6QDL_PAD_NANDF_D3__GPIO2_IO03 	0x80000000
+				MX6QDL_PAD_GPIO_0__CCM_CLKO1    	0x130b0
+				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29	0x80000000
 			>;
 		};
 	};
@@ -228,6 +238,7 @@
 };
 
 &usbh1 {
+	vbus-supply = <&reg_usb_h1_vbus>;
 	status = "okay";
 };
 
Signature · 1 line
1.7.1
author
#1 lore raw

PATCH 2/2 ARM: dtsi: imx6qdl-sabresd: Add USB OTG vbus pin to pinctrl_hog

USB OTG vbus pin needs to be configured as gpio function at sabresd board.

---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +1 -0
index b4db3f7..36cb44a 100644
@@ -205,6 +205,7 @@
 				MX6QDL_PAD_NANDF_D3__GPIO2_IO03 	0x80000000
 				MX6QDL_PAD_GPIO_0__CCM_CLKO1    	0x130b0
 				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29	0x80000000
+				MX6QDL_PAD_EIM_D22__GPIO3_IO22		0x80000000
 			>;
 		};
 	};
Signature · 1 line
1.7.1
author
#3 lore raw

PATCH 1/2 ARM: dtsi: imx6qdl-sabresd: Add USB host 1 VBUS regulator

In reply to Shawn Guo
Quoted 43 lines · Shawn Guo
Quoted 42 lines · Peter Chen

We enabled USB host 1, so host 1's vbus should be on to let host 1 work.

---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +12 -7
index 61b8959..b4db3f7 100644
@@ -34,6 +34,15 @@
 			enable-active-high;
 		};
 
+		reg_usb_h1_vbus: usb_h1_vbus {
+			compatible = "regulator-fixed";
+			regulator-name = "usb_h1_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			gpio = <&gpio1 29 0>;
+			enable-active-high;
+		};
+
 		reg_audio: wm8962_supply {
 			compatible = "regulator-fixed";
 			regulator-name = "wm8962-supply";
@@ -188,13 +197,14 @@
 	hog {
 		pinctrl_hog: hoggrp {
 			fsl,pins = <
-				MX6QDL_PAD_GPIO_4__GPIO1_IO04   0x80000000
-				MX6QDL_PAD_GPIO_5__GPIO1_IO05   0x80000000
-				MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x80000000
-				MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x80000000
-				MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x80000000
-				MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x80000000
-				MX6QDL_PAD_GPIO_0__CCM_CLKO1    0x130b0
+				MX6QDL_PAD_GPIO_4__GPIO1_IO04   	0x80000000
+				MX6QDL_PAD_GPIO_5__GPIO1_IO05   	0x80000000
+				MX6QDL_PAD_NANDF_D0__GPIO2_IO00 	0x80000000
Quoted 9 lines

arch/arm/boot/dts/imx6qdl-sabresd.dtsi line 207

Quoted 5 lines
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +5 -0
+				MX6QDL_PAD_NANDF_D1__GPIO2_IO01 	0x80000000
+				MX6QDL_PAD_NANDF_D2__GPIO2_IO02 	0x80000000
+				MX6QDL_PAD_NANDF_D3__GPIO2_IO03 	0x80000000
+				MX6QDL_PAD_GPIO_0__CCM_CLKO1    	0x130b0
+				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29	0x80000000

It's not worth to change so many lines of code only for getting the indentation aligned.

So at your version, the MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 is not aligned with others, since its string is longer than others?

Signature · 2 lines
Best Regards,
Peter Chen
#2 lore raw

PATCH 1/2 ARM: dtsi: imx6qdl-sabresd: Add USB host 1 VBUS regulator

In reply to Peter Chen
Quoted 37 lines · Peter Chen

We enabled USB host 1, so host 1's vbus should be on to let host 1 work.

---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +9 -5
index 61b8959..b4db3f7 100644
@@ -34,6 +34,15 @@
 			enable-active-high;
 		};
 
+		reg_usb_h1_vbus: usb_h1_vbus {
+			compatible = "regulator-fixed";
+			regulator-name = "usb_h1_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			gpio = <&gpio1 29 0>;
+			enable-active-high;
+		};
+
 		reg_audio: wm8962_supply {
 			compatible = "regulator-fixed";
 			regulator-name = "wm8962-supply";
@@ -188,13 +197,14 @@
 	hog {
 		pinctrl_hog: hoggrp {
 			fsl,pins = <
-				MX6QDL_PAD_GPIO_4__GPIO1_IO04   0x80000000
-				MX6QDL_PAD_GPIO_5__GPIO1_IO05   0x80000000
-				MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x80000000
-				MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x80000000
-				MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x80000000

arch/arm/boot/dts/imx6qdl-sabresd.dtsi line 207

Quoted 10 lines
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +8 -2
-				MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x80000000
-				MX6QDL_PAD_GPIO_0__CCM_CLKO1    0x130b0
+				MX6QDL_PAD_GPIO_4__GPIO1_IO04   	0x80000000
+				MX6QDL_PAD_GPIO_5__GPIO1_IO05   	0x80000000
+				MX6QDL_PAD_NANDF_D0__GPIO2_IO00 	0x80000000
+				MX6QDL_PAD_NANDF_D1__GPIO2_IO01 	0x80000000
+				MX6QDL_PAD_NANDF_D2__GPIO2_IO02 	0x80000000
+				MX6QDL_PAD_NANDF_D3__GPIO2_IO03 	0x80000000
+				MX6QDL_PAD_GPIO_0__CCM_CLKO1    	0x130b0
+				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29	0x80000000

It's not worth to change so many lines of code only for getting the indentation aligned. I fixed it up and manually applied both patches, as they do not apply on my imx/dt branch.

Shawn

Quoted 15 lines
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +1 -0
 			>;
 		};
 	};
@@ -228,6 +238,7 @@
 };
 
 &usbh1 {
+	vbus-supply = <&reg_usb_h1_vbus>;
 	status = "okay";
 };
 
Signature · 1 line
1.7.1
#4 lore raw

PATCH 1/2 ARM: dtsi: imx6qdl-sabresd: Add USB host 1 VBUS regulator

In reply to Peter Chen
Quoted 2 lines · Peter Chen

So at your version, the MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 is not aligned with others, since its string is longer than others?

Yes. But that's not really a problem.

Shawn