aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-07-30 13:50:36 +0200
committerMathias Kresin <dev@kresin.me>2017-08-03 19:37:41 +0200
commit313ce3afbbe05abf3689d0943f70d594a7791517 (patch)
treea2faabea8fe894c2330a26d919658c199a699c60
parent70b192f57358f753842cbe1f8f82e26e8c6f9e1e (diff)
downloadupstream-313ce3afbbe05abf3689d0943f70d594a7791517.tar.gz
upstream-313ce3afbbe05abf3689d0943f70d594a7791517.tar.bz2
upstream-313ce3afbbe05abf3689d0943f70d594a7791517.zip
ramips: move common parts into dtsi
Move the common parts of boards with multiple flash size variants into dtsi files. Signed-off-by: Mathias Kresin <dev@kresin.me>
-rw-r--r--target/linux/ramips/dts/ALL0256N-4M.dts62
-rw-r--r--target/linux/ramips/dts/ALL0256N-8M.dts62
-rw-r--r--target/linux/ramips/dts/ALL0256N.dtsi65
-rw-r--r--target/linux/ramips/dts/ASL26555-16M.dts97
-rw-r--r--target/linux/ramips/dts/ASL26555-8M.dts99
-rw-r--r--target/linux/ramips/dts/ASL26555.dtsi100
-rw-r--r--target/linux/ramips/dts/M4-4M.dts53
-rw-r--r--target/linux/ramips/dts/M4-8M.dts58
-rw-r--r--target/linux/ramips/dts/M4.dtsi61
-rw-r--r--target/linux/ramips/dts/WR512-3GN-4M.dts74
-rw-r--r--target/linux/ramips/dts/WR512-3GN-8M.dts74
-rw-r--r--target/linux/ramips/dts/WR512-3GN.dtsi77
-rw-r--r--target/linux/ramips/dts/WT3020-4M.dts61
-rw-r--r--target/linux/ramips/dts/WT3020-8M.dts61
-rw-r--r--target/linux/ramips/dts/WT3020.dtsi65
15 files changed, 379 insertions, 690 deletions
diff --git a/target/linux/ramips/dts/ALL0256N-4M.dts b/target/linux/ramips/dts/ALL0256N-4M.dts
index 2e1977c623..0b673b4922 100644
--- a/target/linux/ramips/dts/ALL0256N-4M.dts
+++ b/target/linux/ramips/dts/ALL0256N-4M.dts
@@ -1,49 +1,10 @@
/dts-v1/;
-#include "rt3050.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "ALL0256N.dtsi"
/ {
compatible = "allnet,all0256n-4m", "allnet,all0256n", "ralink,rt3050-soc";
model = "Allnet ALL0256N (4M)";
-
- gpio-leds {
- compatible = "gpio-leds";
-
- rssilow {
- label = "all0256n:green:rssilow";
- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
- };
-
- rssimed {
- label = "all0256n:green:rssimed";
- gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
- };
-
- rssihigh {
- label = "all0256n:green:rssihigh";
- gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
- };
- };
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
-};
-
-&gpio0 {
- status = "okay";
};
&spi0 {
@@ -80,24 +41,3 @@
};
};
};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
- ralink,function = "gpio";
- };
- };
-};
-
-&ethernet {
- mtd-mac-address = <&factory 0x28>;
-};
-
-&esw {
- mediatek,portmap = <0x3f>;
-};
-
-&wmac {
- ralink,mtd-eeprom = <&factory 0>;
-};
diff --git a/target/linux/ramips/dts/ALL0256N-8M.dts b/target/linux/ramips/dts/ALL0256N-8M.dts
index a662abbb3f..5e2e3895af 100644
--- a/target/linux/ramips/dts/ALL0256N-8M.dts
+++ b/target/linux/ramips/dts/ALL0256N-8M.dts
@@ -1,49 +1,10 @@
/dts-v1/;
-#include "rt3050.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "ALL0256N.dtsi"
/ {
compatible = "allnet,all0256n-8m", "allnet,all0256n", "ralink,rt3050-soc";
model = "Allnet ALL0256N (8M)";
-
- gpio-leds {
- compatible = "gpio-leds";
-
- rssilow {
- label = "all0256n:green:rssilow";
- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
- };
-
- rssimed {
- label = "all0256n:green:rssimed";
- gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
- };
-
- rssihigh {
- label = "all0256n:green:rssihigh";
- gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
- };
- };
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
-};
-
-&gpio0 {
- status = "okay";
};
&spi0 {
@@ -80,24 +41,3 @@
};
};
};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
- ralink,function = "gpio";
- };
- };
-};
-
-&ethernet {
- mtd-mac-address = <&factory 0x28>;
-};
-
-&esw {
- mediatek,portmap = <0x3f>;
-};
-
-&wmac {
- ralink,mtd-eeprom = <&factory 0>;
-};
diff --git a/target/linux/ramips/dts/ALL0256N.dtsi b/target/linux/ramips/dts/ALL0256N.dtsi
new file mode 100644
index 0000000000..462b854fa5
--- /dev/null
+++ b/target/linux/ramips/dts/ALL0256N.dtsi
@@ -0,0 +1,65 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "allnet,all0256n", "ralink,rt3050-soc";
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ rssilow {
+ label = "all0256n:green:rssilow";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ rssimed {
+ label = "all0256n:green:rssimed";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ rssihigh {
+ label = "all0256n:green:rssihigh";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio0 {
+ status = "okay";
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0>;
+};
diff --git a/target/linux/ramips/dts/ASL26555-16M.dts b/target/linux/ramips/dts/ASL26555-16M.dts
index 525c4d314c..c61d45b7aa 100644
--- a/target/linux/ramips/dts/ASL26555-16M.dts
+++ b/target/linux/ramips/dts/ASL26555-16M.dts
@@ -1,80 +1,10 @@
/dts-v1/;
-#include "rt3050.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "ASL26555.dtsi"
/ {
compatible = "alphanetworks,asl26555-16m", "alphanetworks,asl26555", "ralink,rt3050-soc";
model = "Alpha ASL26555 (16M)";
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
- linux,code = <KEY_RESTART>;
- };
-
- wps {
- label = "wps";
- gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- linux,code = <KEY_WPS_BUTTON>;
- };
- };
-
- gpio-leds {
- compatible = "gpio-leds";
-
- eth {
- label = "asl26555:green:eth";
- gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
- };
-
- wan-red {
- label = "asl26555:red:wan";
- gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
- };
-
- wan-green {
- label = "asl26555:green:wan";
- gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
- };
-
- wlan {
- label = "asl26555:green:wlan";
- gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
- };
-
- power-green {
- label = "asl26555:green:power";
- gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
- };
-
- power-red {
- label = "asl26555:red:power";
- gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
- };
-
- 3g-green {
- label = "asl26555:green:3g";
- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
- };
-
- 3g-red {
- label = "asl26555:red:3g";
- gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
- };
- };
-};
-
-&gpio0 {
- status = "okay";
};
&spi0 {
@@ -129,28 +59,3 @@
};
};
};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
- ralink,function = "gpio";
- };
- };
-};
-
-&ethernet {
- mtd-mac-address = <&devdata 0x4004>;
-};
-
-&esw {
- mediatek,portmap = <0x1e>;
-};
-
-&wmac {
- ralink,mtd-eeprom = <&devdata 0x4000>;
-};
-
-&otg {
- status = "okay";
-};
diff --git a/target/linux/ramips/dts/ASL26555-8M.dts b/target/linux/ramips/dts/ASL26555-8M.dts
index 66a67fdbf9..2beb9f56ce 100644
--- a/target/linux/ramips/dts/ASL26555-8M.dts
+++ b/target/linux/ramips/dts/ASL26555-8M.dts
@@ -1,80 +1,10 @@
/dts-v1/;
-#include "rt3050.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "ASL26555.dtsi"
/ {
compatible = "alphanetworks,asl26555-8m", "alphanetworks,asl26555", "ralink,rt3050-soc";
model = "Alpha ASL26555 (8M)";
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
- linux,code = <KEY_RESTART>;
- };
-
- wps {
- label = "wps";
- gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- linux,code = <KEY_WPS_BUTTON>;
- };
- };
-
- gpio-leds {
- compatible = "gpio-leds";
-
- eth {
- label = "asl26555:green:eth";
- gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
- };
-
- wan-red {
- label = "asl26555:red:wan";
- gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
- };
-
- wan-green {
- label = "asl26555:green:wan";
- gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
- };
-
- wlan {
- label = "asl26555:green:wlan";
- gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
- };
-
- power-green {
- label = "asl26555:green:power";
- gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
- };
-
- power-red {
- label = "asl26555:red:power";
- gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
- };
-
- 3g-green {
- label = "asl26555:green:3g";
- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
- };
-
- 3g-red {
- label = "asl26555:red:3g";
- gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
- };
- };
-};
-
-&gpio0 {
- status = "okay";
};
&spi0 {
@@ -93,7 +23,7 @@
read-only;
};
- ubootenv: partition@30000 {
+ devdata: partition@30000 {
label = "uboot-env";
reg = <0x30000 0x10000>;
read-only;
@@ -123,28 +53,3 @@
};
};
};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
- ralink,function = "gpio";
- };
- };
-};
-
-&ethernet {
- mtd-mac-address = <&ubootenv 0x4004>;
-};
-
-&esw {
- mediatek,portmap = <0x1e>;
-};
-
-&wmac {
- ralink,mtd-eeprom = <&ubootenv 0x4000>;
-};
-
-&otg {
- status = "okay";
-};
diff --git a/target/linux/ramips/dts/ASL26555.dtsi b/target/linux/ramips/dts/ASL26555.dtsi
new file mode 100644
index 0000000000..67dc34787e
--- /dev/null
+++ b/target/linux/ramips/dts/ASL26555.dtsi
@@ -0,0 +1,100 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "alphanetworks,asl26555", "ralink,rt3050-soc";
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ eth {
+ label = "asl26555:green:eth";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wan-red {
+ label = "asl26555:red:wan";
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ wan-green {
+ label = "asl26555:green:wan";
+ gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan {
+ label = "asl26555:green:wlan";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ power-green {
+ label = "asl26555:green:power";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ power-red {
+ label = "asl26555:red:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ 3g-green {
+ label = "asl26555:green:3g";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g-red {
+ label = "asl26555:red:3g";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio0 {
+ status = "okay";
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&devdata 0x4004>;
+};
+
+&esw {
+ mediatek,portmap = <0x1e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devdata 0x4000>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/M4-4M.dts b/target/linux/ramips/dts/M4-4M.dts
index 1a7154e57c..914eaf3648 100644
--- a/target/linux/ramips/dts/M4-4M.dts
+++ b/target/linux/ramips/dts/M4-4M.dts
@@ -1,35 +1,10 @@
/dts-v1/;
-#include "rt5350.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "M4.dtsi"
/ {
compatible = "poray,m4-4m", "poray,m4", "ralink,rt5350-soc";
model = "Poray M4 (4M)";
-
- gpio-leds {
- compatible = "gpio-leds";
-
- status {
- label = "m4:blue:status";
- gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
- };
- };
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
};
&spi0 {
@@ -66,29 +41,3 @@
};
};
};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "jtag", "uartf";
- ralink,function = "gpio";
- };
- };
-};
-
-&ethernet {
- mtd-mac-address = <&factory 0x4>;
-};
-
-&esw {
- mediatek,portmap = <0x2f>;
- mediatek,led_polarity = <1>;
-};
-
-&ehci {
- status = "okay";
-};
-
-&ohci {
- status = "okay";
-};
diff --git a/target/linux/ramips/dts/M4-8M.dts b/target/linux/ramips/dts/M4-8M.dts
index 6d5086950e..8fcca21eb1 100644
--- a/target/linux/ramips/dts/M4-8M.dts
+++ b/target/linux/ramips/dts/M4-8M.dts
@@ -1,35 +1,10 @@
/dts-v1/;
-#include "rt5350.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "M4.dtsi"
/ {
compatible = "poray,m4-8m", "poray,m4", "ralink,rt5350-soc";
model = "Poray M4 (8M)";
-
- gpio-leds {
- compatible = "gpio-leds";
-
- status {
- label = "m4:blue:status";
- gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
- };
- };
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
};
&spi0 {
@@ -66,34 +41,3 @@
};
};
};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "jtag", "uartf";
- ralink,function = "gpio";
- };
- };
-};
-
-&ethernet {
- mtd-mac-address = <&factory 0x4>;
-};
-
-&esw {
- mediatek,portmap = <0x2f>;
- mediatek,led_polarity = <1>;
-};
-
-&wmac {
- ralink,mtd-eeprom = <&factory 0>;
- ralink,led-polarity = <1>;
-};
-
-&ehci {
- status = "okay";
-};
-
-&ohci {
- status = "okay";
-};
diff --git a/target/linux/ramips/dts/M4.dtsi b/target/linux/ramips/dts/M4.dtsi
new file mode 100644
index 0000000000..f657325b53
--- /dev/null
+++ b/target/linux/ramips/dts/M4.dtsi
@@ -0,0 +1,61 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "poray,m4", "ralink,rt5350-soc";
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ status {
+ label = "m4:blue:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "jtag", "uartf";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <1>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0>;
+ ralink,led-polarity = <1>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/WR512-3GN-4M.dts b/target/linux/ramips/dts/WR512-3GN-4M.dts
index 86355277f7..dab003fd94 100644
--- a/target/linux/ramips/dts/WR512-3GN-4M.dts
+++ b/target/linux/ramips/dts/WR512-3GN-4M.dts
@@ -1,9 +1,6 @@
/dts-v1/;
-#include "rt3050.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "WR512-3GN.dtsi"
/ {
compatible = "unbranded,wr512-3gn-4m", "unbranded,wr512-3gn", "ralink,rt3052-soc";
@@ -40,73 +37,4 @@
reg = <0x50000 0x3c8000>;
};
};
-
- gpio-leds {
- compatible = "gpio-leds";
-
- 3g {
- label = "wr512-3gn:green:3g";
- gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
- };
-
- gateway {
- label = "wr512-3gn:green:gateway";
- gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
- };
-
- ap {
- label = "wr512-3gn:green:ap";
- gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
- };
-
- wps {
- label = "wr512-3gn:green:wps";
- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
- };
-
- station {
- label = "wr512-3gn:green:station";
- gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
- };
- };
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset_wps {
- label = "reset_wps";
- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
-
- mode {
- label = "mode";
- gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
- linux,code = <BTN_0>;
- };
- };
-};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
- ralink,function = "gpio";
- };
- };
-};
-
-&esw {
- mediatek,portmap = <0x2f>;
-};
-
-&wmac {
- ralink,mtd-eeprom = <&factory 0>;
-};
-
-&otg {
- status = "okay";
};
diff --git a/target/linux/ramips/dts/WR512-3GN-8M.dts b/target/linux/ramips/dts/WR512-3GN-8M.dts
index aa469082fe..16abf9799f 100644
--- a/target/linux/ramips/dts/WR512-3GN-8M.dts
+++ b/target/linux/ramips/dts/WR512-3GN-8M.dts
@@ -1,9 +1,6 @@
/dts-v1/;
-#include "rt3050.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "WR512-3GN.dtsi"
/ {
compatible = "unbranded,wr512-3gn-8m", "unbranded,wr512-3gn", "ralink,rt3052-soc";
@@ -40,73 +37,4 @@
reg = <0x50000 0x7b0000>;
};
};
-
- gpio-leds {
- compatible = "gpio-leds";
-
- 3g {
- label = "wr512-3gn:green:3g";
- gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
- };
-
- gateway {
- label = "wr512-3gn:green:gateway";
- gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
- };
-
- ap {
- label = "wr512-3gn:green:ap";
- gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
- };
-
- wps {
- label = "wr512-3gn:green:wps";
- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
- };
-
- station {
- label = "wr512-3gn:green:station";
- gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
- };
- };
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset_wps {
- label = "reset_wps";
- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
-
- mode {
- label = "mode";
- gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
- linux,code = <BTN_0>;
- };
- };
-};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
- ralink,function = "gpio";
- };
- };
-};
-
-&esw {
- mediatek,portmap = <0x2f>;
-};
-
-&wmac {
- ralink,mtd-eeprom = <&factory 0>;
-};
-
-&otg {
- status = "okay";
};
diff --git a/target/linux/ramips/dts/WR512-3GN.dtsi b/target/linux/ramips/dts/WR512-3GN.dtsi
new file mode 100644
index 0000000000..854ab251ba
--- /dev/null
+++ b/target/linux/ramips/dts/WR512-3GN.dtsi
@@ -0,0 +1,77 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "unbranded,wr512-3gn", "ralink,rt3052-soc";
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ 3g {
+ label = "wr512-3gn:green:3g";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ gateway {
+ label = "wr512-3gn:green:gateway";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ ap {
+ label = "wr512-3gn:green:ap";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "wr512-3gn:green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ station {
+ label = "wr512-3gn:green:station";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/WT3020-4M.dts b/target/linux/ramips/dts/WT3020-4M.dts
index 0d6e573995..f7e87c6734 100644
--- a/target/linux/ramips/dts/WT3020-4M.dts
+++ b/target/linux/ramips/dts/WT3020-4M.dts
@@ -1,43 +1,10 @@
/dts-v1/;
-#include "mt7620n.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "WT3020.dtsi"
/ {
compatible = "nexx,wt3020-4m", "nexx,wt3020", "ralink,mt7620n-soc";
model = "Nexx WT3020 (4M)";
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
-
- gpio-leds {
- compatible = "gpio-leds";
-
- power {
- label = "wt3020:blue:power";
- gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
- };
- };
-};
-
-&gpio2 {
- status = "okay";
-};
-
-&gpio3 {
- status = "okay";
};
&spi0 {
@@ -74,29 +41,3 @@
};
};
};
-
-&ehci {
- status = "okay";
-};
-
-&ohci {
- status = "okay";
-};
-
-&ethernet {
- mtd-mac-address = <&factory 0x4>;
- mediatek,portmap = "wllll";
-};
-
-&wmac {
- ralink,mtd-eeprom = <&factory 0>;
-};
-
-&pinctrl {
- state_default: pinctrl0 {
- default {
- ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf";
- ralink,function = "gpio";
- };
- };
-};
diff --git a/target/linux/ramips/dts/WT3020-8M.dts b/target/linux/ramips/dts/WT3020-8M.dts
index 9d78e26965..05ade7c5a4 100644
--- a/target/linux/ramips/dts/WT3020-8M.dts
+++ b/target/linux/ramips/dts/WT3020-8M.dts
@@ -1,43 +1,10 @@
/dts-v1/;
-#include "mt7620n.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "WT3020.dtsi"
/ {
compatible = "nexx,wt3020-8m", "nexx,wt3020", "ralink,mt7620n-soc";
model = "Nexx WT3020 (8M)";
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
-
- gpio-leds {
- compatible = "gpio-leds";
-
- power {
- label = "wt3020:blue:power";
- gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
- };
- };
-};
-
-&gpio2 {
- status = "okay";
-};
-
-&gpio3 {
- status = "okay";
};
&spi0 {
@@ -74,29 +41,3 @@
};
};
};
-
-&ehci {
- status = "okay";
-};
-
-&ohci {
- status = "okay";
-};
-
-&ethernet {
- mtd-mac-address = <&factory 0x4>;
- mediatek,portmap = "wllll";
-};
-
-&wmac {
- ralink,mtd-eeprom = <&factory 0>;
-};
-
-&pinctrl {
- state_default: pinctrl0 {
- default {
- ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf";
- ralink,function = "gpio";
- };
- };
-};
diff --git a/target/linux/ramips/dts/WT3020.dtsi b/target/linux/ramips/dts/WT3020.dtsi
new file mode 100644
index 0000000000..6bea6cc1f3
--- /dev/null
+++ b/target/linux/ramips/dts/WT3020.dtsi
@@ -0,0 +1,65 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "nexx,wt3020", "ralink,mt7620n-soc";
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "wt3020:blue:power";
+ gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x4>;
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0>;
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ default {
+ ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf";
+ ralink,function = "gpio";
+ };
+ };
+};