ramips: add support for TP-Link TL-MR3420 v5
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / DIR-620-D1.dts
index d2650330ccd3b5d4b9138864e89a4c8344b87d07..2def8aae4a6f4f0e6c435469d786f7a9e844563b 100644 (file)
@@ -1,32 +1,51 @@
 /dts-v1/;
 
-/include/ "rt3352.dtsi"
+#include "rt3352.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
-       compatible = "DIR-620-D1", "ralink,rt3352-soc";
+       compatible = "dlink,dir-620-d1", "ralink,rt3352-soc";
        model = "D-Link DIR-620 D1";
 
-       palmbus@10000000 {
-               sysc@0 {
-                       ralink,pinmux = "i2c", "spi", "uartlite", "mdio", "sdram", "rgmii";
-                       ralink,gpiomux = "jtag";
-                       ralink,uartmux = "gpio";
-                       ralink,wdtmux = <1>;
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               status {
+                       label = "dir-620-d1:green:status";
+                       gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
-               gpio0: gpio@600 {
-                       status = "okay";
+               wifi {
+                       label = "dir-620-d1:green:wifi";
+                       gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
                };
+       };
 
-               spi@b00 {
-                       status = "okay";
-                       m25p80@0 {
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-                               compatible = "mx25l6405d";
-                               reg = <0 0>;
-                               linux,modalias = "m25p80", "mx25l6405d";
-                               spi-max-frequency = <10000000>;
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+
+               reset_wps {
+                       label = "reset_wps";
+                       gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
+               };
+       };
+};
+
+&spi0 {
+       status = "okay";
+
+       m25p80@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <10000000>;
 
                partition@0 {
                        label = "u-boot";
                        label = "firmware";
                        reg = <0x50000 0x7b0000>;
                };
-                       };
-               };
-       };
-
-       ethernet@10100000 {
-               status = "okay";
-       };
-
-       esw@10110000 {
-               status = "okay";
-               ralink,portmap = <0x2f>;
        };
+};
 
-       gpio-leds {
-               compatible = "gpio-leds";
-               status {
-                       label = "d-link:green:status";
-                       gpios = <&gpio0 9 1>;
-               };
-               wifi {
-                       label = "d-link:green:wifi";
-                       gpios = <&gpio0 17 1>;
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "i2c", "jtag", "uartf";
+                       ralink,function = "gpio";
                };
        };
+};
 
-       gpio-keys-polled {
-               compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               poll-interval = <20>;
-               reset_wps {
-                       label = "reset_wps";
-                       gpios = <&gpio0 7 1>;
-                       linux,code = <0x198>;
-               };
-       };
+&ethernet {
+       mtd-mac-address = <&factory 0x4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins &mdio_pins>;
+};
 
-       wmac@10180000 {
-               status = "okay";
-       };
+&esw {
+       mediatek,portmap = <0x2f>;
+};
 
-       ehci@101c0000 {
-               status = "okay";
-       };
+&wmac {
+       ralink,mtd-eeprom = <&factory 0>;
+};
 
-       ohci@101c1000 {
-               status = "okay";
-       };
+&ehci {
+       status = "okay";
+};
+
+&ohci {
+       status = "okay";
 };