Skip to contentSkip to conversation

ARM: dts: ux500: ab8500: Link USB PHY to USB controller node

PATCH In review Stephan Gerhold 2 participants 2 messages Jul 9, 2021 – Jul 30, 2021 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: ux500: ab8500: Link USB PHY to USB controller node

At the moment the AB8500 USB PHY driver still uses the old USB PHY subsystem instead of the generic PHY subsystem. This means that there is no explicit link between the USB controller and the USB PHY.

In U-Boot the PHY driver is integrated in the generic PHY subsystem, so we need to use the typical PHY device tree bindings to specify which PHY belongs to the USB controller.

Add the link between USB controller and PHY to both ste-ab8500.dtsi and ste-ab8505.dtsi. This is mainly for U-Boot for now and will just be ignored in Linux. However, if the AB8500 USB PHY driver in Linux is moved to the generic PHY subsystem at some point these device tree changes can be used as well.

---
 arch/arm/boot/dts/ste-ab8500.dtsi | 8 +++++++-
 arch/arm/boot/dts/ste-ab8505.dtsi | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
arch/arm/boot/dts/ste-ab8500.dtsi +7 -1
index d0fe3f9aa183..bebcbb759794 100644
@@ -217,7 +217,7 @@ ab8500_chargalg {
 					battery		= <&ab8500_battery>;
 				};
 
-				ab8500_usb {
+				ab8500_usb: ab8500_usb {
 					compatible = "stericsson,ab8500-usb";
 					interrupts = <90 IRQ_TYPE_LEVEL_HIGH>,
 						     <96 IRQ_TYPE_LEVEL_HIGH>,
@@ -238,6 +238,7 @@ ab8500_usb {
 					musb_1v8-supply = <&db8500_vsmps2_reg>;
 					clocks = <&prcmu_clk PRCMU_SYSCLK>;
 					clock-names = "sysclk";
+					#phy-cells = <0>;
 				};
 
 				ab8500-ponkey {
@@ -386,5 +387,10 @@ dsi@a0353000 {
 				vana-supply = <&ab8500_ldo_ana_reg>;
 			};
 		};
+
+		usb_per5@a03e0000 {
+			phys = <&ab8500_usb>;
+			phy-names = "usb";
+		};
 	};
 };
arch/arm/boot/dts/ste-ab8505.dtsi +6 -0
index 0defc15b9bbc..fb30e247ac9c 100644
@@ -201,6 +201,7 @@ ab8500_usb: ab8500_usb {
 					musb_1v8-supply = <&db8500_vsmps2_reg>;
 					clocks = <&prcmu_clk PRCMU_SYSCLK>;
 					clock-names = "sysclk";
+					#phy-cells = <0>;
 				};
 
 				ab8500-ponkey {
@@ -322,5 +323,10 @@ dsi@a0353000 {
 				vana-supply = <&ab8500_ldo_ana_reg>;
 			};
 		};
+
+		usb_per5@a03e0000 {
+			phys = <&ab8500_usb>;
+			phy-names = "usb";
+		};
 	};
 };
Signature · 1 line
2.32.0
#1 lore raw
Quoted 8 lines · Stephan Gerhold

At the moment the AB8500 USB PHY driver still uses the old USB PHY subsystem instead of the generic PHY subsystem. This means that there is no explicit link between the USB controller and the USB PHY.

In U-Boot the PHY driver is integrated in the generic PHY subsystem, so we need to use the typical PHY device tree bindings to specify which PHY belongs to the USB controller.

Quoted 7 lines

Add the link between USB controller and PHY to both ste-ab8500.dtsi and ste-ab8505.dtsi. This is mainly for U-Boot for now and will just be ignored in Linux. However, if the AB8500 USB PHY driver in Linux is moved to the generic PHY subsystem at some point these device tree changes can be used as well.

Patch applied!

Yours,
Linus Walleij