ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_wiznet_wizfi630s.dts
index 13475fe324457f4aa779ac3c6e78f9430876af39..9ce585021ecc615882d98632210bb4d288645c13 100644 (file)
@@ -1,5 +1,4 @@
-//SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 #include "mt7628an.dtsi"
 
                compatible = "gpio-leds";
 
                led_run: run {
-                       label = "wizfi630s:green:run";
-                       gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+                       label = "green:run";
+                       gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
                };
 
                ledwps {
-                       label = "wizfi630s:green:wps";
-                       gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+                       label = "green:wps";
+                       gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
                };
 
                leduart1 {
-                       label = "wizfi630s:green:uart1";
-                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+                       label = "green:uart1";
+                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                };
 
                leduart2 {
-                       label = "wizfi630s:green:uart2";
-                       gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+                       label = "green:uart2";
+                       gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
                };
        };
 
        keys {
-               compatible = "gpio-keys-polled";
+               compatible = "gpio-keys";
+
                #address-cells = <1>;
                #size-cells = <0>;
-               poll-interval = <20>;
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
 
                wps {
                        label = "wps";
-                       gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+                       gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
 
                scm1 {
                        label = "SCM1";
-                       gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                        linux,code = <BTN_1>;
+                       linux,input-type = <EV_SW>;
                };
 
                scm2 {
                        label = "SCM2";
-                       gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
                        linux,code = <BTN_2>;
+                       linux,input-type = <EV_SW>;
                };
-
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "gpio";
-                       ralink,function = "gpio";
-               };
-
-               i2s {
-                       ralink,group = "i2s";
-                       ralink,function = "gpio";
-               };
-
-               wdt {
-                       ralink,group = "wdt";
-                       ralink,function = "gpio";
-               };
-
-
-               i2c {
-                       ralink,group = "i2c";
-                       ralink,function = "gpio";
-               };
-
-               refclk {
-                       ralink,group = "refclk";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "gpio", "i2s", "i2c", "wdt", "refclk", "p1led_an", "p2led_an";
+               function = "gpio";
        };
 };
 
-&wmac {
-       status = "okay";
-};
-
 &spi0 {
        status = "okay";
 
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <40000000>;
-               m25p,chunked-io = <31>;
+               broken-flash-reset;
 
                partitions {
                        compatible = "fixed-partitions";
        };
 };
 
-&i2c {
+&uart1 {
        status = "okay";
 };
 
-&uart1 {
+&uart2 {
        status = "okay";
 };
 
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_2e>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
        mediatek,portmap = <0x3e>;
+       mediatek,portdisable = <0x26>;
 };
 
 &sdhci {
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_2e: macaddr@2e {
+               reg = <0x2e 0x6>;
+       };
 };