[openwrt/openwrt] ramips: fix usbphy DT nodes on linux 4.14

LEDE Commits lede-commits at lists.infradead.org
Sat Apr 7 08:54:47 PDT 2018


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/eda27d755729b65e3620e60dc0340a39b0d9e0f1

commit eda27d755729b65e3620e60dc0340a39b0d9e0f1
Author: Vianney le Clément de Saint-Marcq <code at quartic.eu>
AuthorDate: Sat Apr 7 14:02:25 2018 +0200

    ramips: fix usbphy DT nodes on linux 4.14
    
    The Ralink USB PHY driver merged into mainline has a slightly different
    device tree binding than the patch that was used with linux 4.9.
    The new driver requires a `ralink,sysctl` node pointing to the `syscon`
    node.
    
    This patch also sets `#phy-cells` to 0, as recommended by the mainline
    documentation [1].
    
    [1] Documentation/devicetree/bindings/phy/ralink-usb-phy.txt
    
    Signed-off-by: Vianney le Clément de Saint-Marcq <code at quartic.eu>
---
 target/linux/ramips/dts/mt7620a.dtsi  | 9 +++++----
 target/linux/ramips/dts/mt7620n.dtsi  | 9 +++++----
 target/linux/ramips/dts/mt7628an.dtsi | 9 +++++----
 target/linux/ramips/dts/rt3050.dtsi   | 5 ++++-
 target/linux/ramips/dts/rt3352.dtsi   | 9 +++++----
 target/linux/ramips/dts/rt3883.dtsi   | 9 +++++----
 target/linux/ramips/dts/rt5350.dtsi   | 9 +++++----
 7 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a.dtsi b/target/linux/ramips/dts/mt7620a.dtsi
index 882cf88..83ff102 100644
--- a/target/linux/ramips/dts/mt7620a.dtsi
+++ b/target/linux/ramips/dts/mt7620a.dtsi
@@ -35,7 +35,7 @@
 		#size-cells = <1>;
 
 		sysc: sysc at 0 {
-			compatible = "ralink,mt7620a-sysc", "ralink,rt3050-sysc";
+			compatible = "ralink,mt7620a-sysc", "ralink,rt3050-sysc", "syscon";
 			reg = <0x0 0x100>;
 		};
 
@@ -427,8 +427,9 @@
 
 	usbphy: usbphy {
 		compatible = "mediatek,mt7620-usbphy";
-		#phy-cells = <1>;
+		#phy-cells = <0>;
 
+		ralink,sysctl = <&sysc>;
 		resets = <&rstctrl 22 &rstctrl 25>;
 		reset-names = "host", "device";
 
@@ -501,7 +502,7 @@
 		interrupt-parent = <&intc>;
 		interrupts = <18>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		status = "disabled";
@@ -514,7 +515,7 @@
 		interrupt-parent = <&intc>;
 		interrupts = <18>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		status = "disabled";
diff --git a/target/linux/ramips/dts/mt7620n.dtsi b/target/linux/ramips/dts/mt7620n.dtsi
index ebaa094..4eb1dde 100644
--- a/target/linux/ramips/dts/mt7620n.dtsi
+++ b/target/linux/ramips/dts/mt7620n.dtsi
@@ -35,7 +35,7 @@
 		#size-cells = <1>;
 
 		sysc: sysc at 0 {
-			compatible = "ralink,mt7620a-sysc", "ralink,rt3050-sysc";
+			compatible = "ralink,mt7620a-sysc", "ralink,rt3050-sysc", "syscon";
 			reg = <0x0 0x100>;
 		};
 
@@ -269,8 +269,9 @@
 
 	usbphy: usbphy {
 		compatible = "mediatek,mt7620-usbphy";
-		#phy-cells = <1>;
+		#phy-cells = <0>;
 
+		ralink,sysctl = <&sysc>;
 		resets = <&rstctrl 22 &rstctrl 25>;
 		reset-names = "host", "device";
 
@@ -327,7 +328,7 @@
 		interrupt-parent = <&intc>;
 		interrupts = <18>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		status = "disabled";
@@ -337,7 +338,7 @@
 		compatible = "generic-ohci";
 		reg = <0x101c1000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;
diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi
index b572f2a..b5edf50 100644
--- a/target/linux/ramips/dts/mt7628an.dtsi
+++ b/target/linux/ramips/dts/mt7628an.dtsi
@@ -33,7 +33,7 @@
 		#size-cells = <1>;
 
 		sysc: sysc at 0 {
-			compatible = "ralink,mt7620a-sysc";
+			compatible = "ralink,mt7620a-sysc", "syscon";
 			reg = <0x0 0x100>;
 		};
 
@@ -375,8 +375,9 @@
 	usbphy: usbphy at 10120000 {
 		compatible = "ralink,mt7628an-usbphy", "mediatek,mt7620-usbphy";
 		reg = <0x10120000 0x1000>;
-		#phy-cells = <1>;
+		#phy-cells = <0>;
 
+		ralink,sysctl = <&sysc>;
 		resets = <&rstctrl 22 &rstctrl 25>;
 		reset-names = "host", "device";
 		clocks = <&clkctrl 22 &clkctrl 25>;
@@ -400,7 +401,7 @@
 		compatible = "generic-ehci";
 		reg = <0x101c0000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;
@@ -411,7 +412,7 @@
 		compatible = "generic-ohci";
 		reg = <0x101c1000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;
diff --git a/target/linux/ramips/dts/rt3050.dtsi b/target/linux/ramips/dts/rt3050.dtsi
index 5c69d28..bd51838 100644
--- a/target/linux/ramips/dts/rt3050.dtsi
+++ b/target/linux/ramips/dts/rt3050.dtsi
@@ -34,7 +34,7 @@
 		#size-cells = <1>;
 
 		sysc: sysc at 0 {
-			compatible = "ralink,rt3050-sysc";
+			compatible = "ralink,rt3050-sysc", "syscon";
 			reg = <0x0 0x100>;
 		};
 
@@ -287,6 +287,9 @@
 
 	usbphy: usbphy {
 		compatible = "ralink,rt3050-usbphy";
+		#phy-cells = <0>;
+
+		ralink,sysctl = <&sysc>;
 		resets = <&rstctrl 22>;
 		reset-names = "host";
 		clocks = <&clkctrl 18>;
diff --git a/target/linux/ramips/dts/rt3352.dtsi b/target/linux/ramips/dts/rt3352.dtsi
index 5612458..e6e49ee 100644
--- a/target/linux/ramips/dts/rt3352.dtsi
+++ b/target/linux/ramips/dts/rt3352.dtsi
@@ -35,7 +35,7 @@
 		#size-cells = <1>;
 
 		sysc: sysc at 0 {
-			compatible = "ralink,rt3352-sysc", "ralink,rt3050-sysc";
+			compatible = "ralink,rt3352-sysc", "ralink,rt3050-sysc", "syscon";
 			reg = <0x0 0x100>;
 		};
 
@@ -334,8 +334,9 @@
 
 	usbphy: usbphy {
 		compatible = "ralink,rt3352-usbphy";
-		#phy-cells = <1>;
+		#phy-cells = <0>;
 
+		ralink,sysctl = <&sysc>;
 		resets = <&rstctrl 22 &rstctrl 25>;
 		reset-names = "host", "device";
 		clocks = <&clkctrl 18 &clkctrl 20>;
@@ -356,7 +357,7 @@
 		compatible = "generic-ehci";
 		reg = <0x101c0000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;
@@ -369,7 +370,7 @@
 		compatible = "generic-ohci";
 		reg = <0x101c1000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;
diff --git a/target/linux/ramips/dts/rt3883.dtsi b/target/linux/ramips/dts/rt3883.dtsi
index 64bc56b..193a3ee 100644
--- a/target/linux/ramips/dts/rt3883.dtsi
+++ b/target/linux/ramips/dts/rt3883.dtsi
@@ -35,7 +35,7 @@
 		#size-cells = <1>;
 
 		sysc: sysc at 0 {
-			compatible = "ralink,rt3883-sysc", "ralink,rt3050-sysc";
+			compatible = "ralink,rt3883-sysc", "ralink,rt3050-sysc", "syscon";
 			reg = <0x0 0x100>;
 		};
 
@@ -427,8 +427,9 @@
 
 	usbphy: usbphy {
 		compatible = "ralink,rt3352-usbphy";
-		#phy-cells = <1>;
+		#phy-cells = <0>;
 
+		ralink,sysctl = <&sysc>;
 		resets = <&rstctrl 22 &rstctrl 25>;
 		reset-names = "host", "device";
 		clocks = <&clkctrl 22 &clkctrl 25>;
@@ -449,7 +450,7 @@
 		compatible = "generic-ehci";
 		reg = <0x101c0000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;
@@ -462,7 +463,7 @@
 		compatible = "generic-ohci";
 		reg = <0x101c1000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;
diff --git a/target/linux/ramips/dts/rt5350.dtsi b/target/linux/ramips/dts/rt5350.dtsi
index a92c113..843ea30 100644
--- a/target/linux/ramips/dts/rt5350.dtsi
+++ b/target/linux/ramips/dts/rt5350.dtsi
@@ -35,7 +35,7 @@
 		#size-cells = <1>;
 
 		sysc: sysc at 0 {
-			compatible = "ralink,rt5350-sysc", "ralink,rt3050-sysc";
+			compatible = "ralink,rt5350-sysc", "ralink,rt3050-sysc", "syscon";
 			reg = <0x0 0x100>;
 		};
 
@@ -324,8 +324,9 @@
 
 	usbphy: usbphy {
 		compatible = "ralink,rt3352-usbphy";
-		#phy-cells = <1>;
+		#phy-cells = <0>;
 
+		ralink,sysctl = <&sysc>;
 		resets = <&rstctrl 22 &rstctrl 25>;
 		reset-names = "host", "device";
 		clocks = <&clkctrl 18>;
@@ -370,7 +371,7 @@
 		compatible = "generic-ehci";
 		reg = <0x101c0000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;
@@ -381,7 +382,7 @@
 		compatible = "generic-ohci";
 		reg = <0x101c1000 0x1000>;
 
-		phys = <&usbphy 1>;
+		phys = <&usbphy>;
 		phy-names = "usb";
 
 		interrupt-parent = <&intc>;



More information about the lede-commits mailing list