Skip to contentSkip to conversation

ARM: mvebu: use usb-nop-xceiv PHY for the xhci nodes on Armada 388 GP

PATCH New Gregory CLEMENT 1 participant 2 messages Dec 23, 2015 – Jan 11, 2016 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mvebu: use usb-nop-xceiv PHY for the xhci nodes on Armada 388 GP

Using the usb-nop-xceiv PHY for the xhci nodes allows a better representation of the hardware but also a better handling of the regulator. By linking the regulator to the PHY there is no more need to use the regulator-always-on property, then it allows a better power management.

The remaining usb node uses the ehci-orion driver which can't be used with the usb-nop-xceiv PHY and must keeps the direct link to the regulator with the regulator-always-on property.

---
 arch/arm/boot/dts/armada-388-gp.dts | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
arch/arm/boot/dts/armada-388-gp.dts +12 -4
index ac3c9445ce57..51943598d858 100644
@@ -229,13 +229,13 @@
 
 			/* CON5 */
 			usb3 at f0000 {
-				vcc-supply = <&reg_usb2_1_vbus>;
+				usb-phy = <&usb2_1_phy>;
 				status = "okay";
 			};
 
 			/* CON7 */
 			usb3 at f8000 {
-				vcc-supply = <&reg_usb3_vbus>;
+				usb-phy = <&usb3_phy>;
 				status = "okay";
 			};
 		};
@@ -273,13 +273,22 @@
 		};
 	};
 
+	usb2_1_phy: usb2_1_phy {
+		compatible = "usb-nop-xceiv";
+		vcc-supply = <&reg_usb2_1_vbus>;
+	};
+
+	usb3_phy: usb3_phy {
+		compatible = "usb-nop-xceiv";
+		vcc-supply = <&reg_usb3_vbus>;
+	};
+
 	reg_usb3_vbus: usb3-vbus {
 		compatible = "regulator-fixed";
 		regulator-name = "usb3-vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		enable-active-high;
-		regulator-always-on;
 		gpio = <&expander1 15 GPIO_ACTIVE_HIGH>;
 	};
 
@@ -299,7 +308,6 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		enable-active-high;
-		regulator-always-on;
 		gpio = <&expander0 4 GPIO_ACTIVE_HIGH>;
 	};
 
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 ARM: mvebu: use usb-nop-xceiv PHY for the xhci nodes on Armada 388 GP

Hi,

Quoted 11 lines · Gregory CLEMENT

Using the usb-nop-xceiv PHY for the xhci nodes allows a better representation of the hardware but also a better handling of the regulator. By linking the regulator to the PHY there is no more need to use the regulator-always-on property, then it allows a better power management.

The remaining usb node uses the ehci-orion driver which can't be used with the usb-nop-xceiv PHY and must keeps the direct link to the regulator with the regulator-always-on property.

I applied this one on mvebu/dt-for-4.6

Gregory

Quoted 59 lines
---
 arch/arm/boot/dts/armada-388-gp.dts | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
arch/arm/boot/dts/armada-388-gp.dts +12 -4
index ac3c9445ce57..51943598d858 100644
@@ -229,13 +229,13 @@
 
 			/* CON5 */
 			usb3 at f0000 {
-				vcc-supply = <&reg_usb2_1_vbus>;
+				usb-phy = <&usb2_1_phy>;
 				status = "okay";
 			};
 
 			/* CON7 */
 			usb3 at f8000 {
-				vcc-supply = <&reg_usb3_vbus>;
+				usb-phy = <&usb3_phy>;
 				status = "okay";
 			};
 		};
@@ -273,13 +273,22 @@
 		};
 	};
 
+	usb2_1_phy: usb2_1_phy {
+		compatible = "usb-nop-xceiv";
+		vcc-supply = <&reg_usb2_1_vbus>;
+	};
+
+	usb3_phy: usb3_phy {
+		compatible = "usb-nop-xceiv";
+		vcc-supply = <&reg_usb3_vbus>;
+	};
+
 	reg_usb3_vbus: usb3-vbus {
 		compatible = "regulator-fixed";
 		regulator-name = "usb3-vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		enable-active-high;
-		regulator-always-on;
 		gpio = <&expander1 15 GPIO_ACTIVE_HIGH>;
 	};
 
@@ -299,7 +308,6 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		enable-active-high;
-		regulator-always-on;
 		gpio = <&expander0 4 GPIO_ACTIVE_HIGH>;
 	};
 
Signature · 1 line
2.5.0
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com