ramips: move common parts into dtsi
authorMathias Kresin <dev@kresin.me>
Sun, 30 Jul 2017 11:50:36 +0000 (13:50 +0200)
committerMathias Kresin <dev@kresin.me>
Thu, 3 Aug 2017 17:37:41 +0000 (19:37 +0200)
Move the common parts of boards with multiple flash size variants into
dtsi files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
15 files changed:
target/linux/ramips/dts/ALL0256N-4M.dts
target/linux/ramips/dts/ALL0256N-8M.dts
target/linux/ramips/dts/ALL0256N.dtsi [new file with mode: 0644]
target/linux/ramips/dts/ASL26555-16M.dts
target/linux/ramips/dts/ASL26555-8M.dts
target/linux/ramips/dts/ASL26555.dtsi [new file with mode: 0644]
target/linux/ramips/dts/M4-4M.dts
target/linux/ramips/dts/M4-8M.dts
target/linux/ramips/dts/M4.dtsi [new file with mode: 0644]
target/linux/ramips/dts/WR512-3GN-4M.dts
target/linux/ramips/dts/WR512-3GN-8M.dts
target/linux/ramips/dts/WR512-3GN.dtsi [new file with mode: 0644]
target/linux/ramips/dts/WT3020-4M.dts
target/linux/ramips/dts/WT3020-8M.dts
target/linux/ramips/dts/WT3020.dtsi [new file with mode: 0644]

index 2e1977c623d23485a7f05cc67f81604dda85c58e..0b673b49224e11da5efd07ab0d821c58f1ca8279 100644 (file)
@@ -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 {
                };
        };
 };
-
-&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>;
-};
index a662abbb3f91e168c794b89ab5f8808f294f1ef4..5e2e3895afba58267978fd19d2d7ecf04edd1df0 100644 (file)
@@ -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 {
                };
        };
 };
-
-&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 (file)
index 0000000..462b854
--- /dev/null
@@ -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>;
+};
index 525c4d314cbf0df438a6c1e19324765d5329c0a8..c61d45b7aa7b202185f085309e7efef5d6619a2c 100644 (file)
@@ -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 {
                };
        };
 };
-
-&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";
-};
index 66a67fdbf9bd9cfcfc988f0b7e8fbc7cff1408df..2beb9f56cef35a239cb8b0c8b8e8f0230ee904ec 100644 (file)
@@ -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;
                };
        };
 };
-
-&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 (file)
index 0000000..67dc347
--- /dev/null
@@ -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";
+};
index 1a7154e57c524b07ffb0a3b3773736fdb28f42d7..914eaf3648b84bc4aafb1c52ca604d3b43110773 100644 (file)
@@ -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 {
                };
        };
 };
-
-&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";
-};
index 6d5086950ea2095daefeeb059158d2c08ab3ac32..8fcca21eb15a2bcd8929655b236bfc9db90418b4 100644 (file)
@@ -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 {
                };
        };
 };
-
-&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 (file)
index 0000000..f657325
--- /dev/null
@@ -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";
+};
index 86355277f75f87c0cc178021d3152c3d27490938..dab003fd9442bbc321fbeb33c18e88abfc297963 100644 (file)
@@ -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";
                        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";
 };
index aa469082fe4e32cfd2ff5bdfbe4ed8aa32132c27..16abf9799f07a3044f33d6ca96f07f31c1bcef43 100644 (file)
@@ -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";
                        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 (file)
index 0000000..854ab25
--- /dev/null
@@ -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";
+};
index 0d6e57399502e1f18db0e380edbead8a9127d5e5..f7e87c6734e5f56db880732c7e0b0b7b023873db 100644 (file)
@@ -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 {
                };
        };
 };
-
-&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";
-               };
-       };
-};
index 9d78e26965d8fab935e2c9809336c3b30c4cf5eb..05ade7c5a43ab93cb36bad21173d0e3d1b1429ca 100644 (file)
@@ -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 {
                };
        };
 };
-
-&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 (file)
index 0000000..6bea6cc
--- /dev/null
@@ -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";
+               };
+       };
+};