Skip to contentSkip to conversation

ARM: dts: imx51: Fix USB PHY duplicate unit-address

PATCH New Fabio Estevam 2 participants 2 messages Jun 28, 2018 – Jul 3, 2018

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v2 1/1 ARM: dts: imx51: Fix USB PHY duplicate unit-address

From: Fabio Estevam <[email protected]>

Currently the following DTC warnings are seen with W=1:

arch/arm/boot/dts/imx51-babbage.dtb: Warning (unique_unit_address): /usbphy/usbphy at 0: duplicate unit-address (also used in node /usbphy/usbh1phy at 0) arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dtb: Warning (unique_unit_address): /usbphy/usbphy at 0: duplicate unit-address (also used in node /usbphy/usbh1phy at 0)

Fix it by moving the USB PHY nodes outside of simple-bus and drop the unneeded unit-address, which matches the bindings documentation at Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt

---
Changes since v1:
- Make it a single patch including the imx51.dtsi change (Shawn)

 arch/arm/boot/dts/imx51-babbage.dts                 | 21 +++++++--------------
 .../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts   | 19 ++++++-------------
 arch/arm/boot/dts/imx51.dtsi                        | 17 +++++------------
 3 files changed, 18 insertions(+), 39 deletions(-)
arch/arm/boot/dts/imx51-babbage.dts +7 -14
index b8ca73d..de46906 100644
@@ -170,20 +170,13 @@
 		mux-ext-port = <3>;
 	};
 
-	usbphy {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "simple-bus";
-
-		usbh1phy: usbh1phy at 0 {
-			compatible = "usb-nop-xceiv";
-			reg = <0>;
-			clocks = <&clk_usb>;
-			clock-names = "main_clk";
-			reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
-			vcc-supply = <&vusb_reg>;
-			#phy-cells = <0>;
-		};
+	usbh1phy: usbh1phy1 {
+		compatible = "usb-nop-xceiv";
+		clocks = <&clk_usb>;
+		clock-names = "main_clk";
+		reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
+		vcc-supply = <&vusb_reg>;
+		#phy-cells = <0>;
 	};
 };
 
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts +6 -13
index b3d952f..2320464 100644
@@ -83,19 +83,12 @@
 		fsl,mux-ext-port = <3>;
 	};
 
-	usbphy {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "simple-bus";
-
-		usbh1phy: usbh1phy at 0 {
-			compatible = "usb-nop-xceiv";
-			reg = <0>;
-			clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
-			clock-names = "main_clk";
-			clock-frequency = <19200000>;
-			#phy-cells = <0>;
-		};
+	usbh1phy: usbh1phy {
+		compatible = "usb-nop-xceiv";
+		clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
+		clock-names = "main_clk";
+		clock-frequency = <19200000>;
+		#phy-cells = <0>;
 	};
 };
 
arch/arm/boot/dts/imx51.dtsi +5 -12
index fe01b89..89520c1 100644
@@ -93,18 +93,11 @@
 		};
 	};
 
-	usbphy {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "simple-bus";
-
-		usbphy0: usbphy at 0 {
-			compatible = "usb-nop-xceiv";
-			reg = <0>;
-			clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
-			clock-names = "main_clk";
-			#phy-cells = <0>;
-		};
+	usbphy0: usbphy0 {
+		compatible = "usb-nop-xceiv";
+		clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
+		clock-names = "main_clk";
+		#phy-cells = <0>;
 	};
 
 	display-subsystem {
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 ARM: dts: imx51: Fix USB PHY duplicate unit-address

Quoted 34 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Currently the following DTC warnings are seen with W=1:

arch/arm/boot/dts/imx51-babbage.dtb: Warning (unique_unit_address): /usbphy/usbphy at 0: duplicate unit-address (also used in node /usbphy/usbh1phy at 0) arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dtb: Warning (unique_unit_address): /usbphy/usbphy at 0: duplicate unit-address (also used in node /usbphy/usbh1phy at 0)

Fix it by moving the USB PHY nodes outside of simple-bus and drop the unneeded unit-address, which matches the bindings documentation at Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt

---
Changes since v1:
- Make it a single patch including the imx51.dtsi change (Shawn)

 arch/arm/boot/dts/imx51-babbage.dts                 | 21 +++++++--------------
 .../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts   | 19 ++++++-------------
 arch/arm/boot/dts/imx51.dtsi                        | 17 +++++------------
 3 files changed, 18 insertions(+), 39 deletions(-)
arch/arm/boot/dts/imx51-babbage.dts +0 -5
index b8ca73d..de46906 100644
@@ -170,20 +170,13 @@
 		mux-ext-port = <3>;
 	};
 
-	usbphy {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "simple-bus";
-

arch/arm/boot/dts/imx51-babbage.dts line 173

Quoted 10 lines
arch/arm/boot/dts/imx51-babbage.dts +1 -9
-		usbh1phy: usbh1phy at 0 {
-			compatible = "usb-nop-xceiv";
-			reg = <0>;
-			clocks = <&clk_usb>;
-			clock-names = "main_clk";
-			reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
-			vcc-supply = <&vusb_reg>;
-			#phy-cells = <0>;
-		};
+	usbh1phy: usbh1phy1 {

usbh1phy1 ...

Quoted 21 lines
arch/arm/boot/dts/imx51-babbage.dts +6 -0
+		compatible = "usb-nop-xceiv";
+		clocks = <&clk_usb>;
+		clock-names = "main_clk";
+		reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
+		vcc-supply = <&vusb_reg>;
+		#phy-cells = <0>;
 	};
 };
 
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts +0 -4
index b3d952f..2320464 100644
@@ -83,19 +83,12 @@
 		fsl,mux-ext-port = <3>;
 	};
 
-	usbphy {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "simple-bus";

arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts line 86

Quoted 10 lines
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts +1 -9
-
-		usbh1phy: usbh1phy at 0 {
-			compatible = "usb-nop-xceiv";
-			reg = <0>;
-			clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
-			clock-names = "main_clk";
-			clock-frequency = <19200000>;
-			#phy-cells = <0>;
-		};
+	usbh1phy: usbh1phy {

... usbh1phy? Can we name the usbphy nodes a bit more consistent? I would even suggest to name them in the same way as usbphy0 in i.mx51.dtsi. That said, usbphy1 should just work?

Shawn

Quoted 39 lines
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts +5 -0
+		compatible = "usb-nop-xceiv";
+		clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
+		clock-names = "main_clk";
+		clock-frequency = <19200000>;
+		#phy-cells = <0>;
 	};
 };
 
arch/arm/boot/dts/imx51.dtsi +5 -12
index fe01b89..89520c1 100644
@@ -93,18 +93,11 @@
 		};
 	};
 
-	usbphy {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "simple-bus";
-
-		usbphy0: usbphy at 0 {
-			compatible = "usb-nop-xceiv";
-			reg = <0>;
-			clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
-			clock-names = "main_clk";
-			#phy-cells = <0>;
-		};
+	usbphy0: usbphy0 {
+		compatible = "usb-nop-xceiv";
+		clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
+		clock-names = "main_clk";
+		#phy-cells = <0>;
 	};
 
 	display-subsystem {
Signature · 1 line
2.7.4