ramips: add proper system clock and reset driver support for mt7621
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_zyxel_keenetic-extra-ii.dts
index 8b069d4370c6f9876cb4e76b491b02d824fa678c..c53289debf0934971c0d4a214c72ddc55e4db10b 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "mt7628an.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
 
                wps {
                        label = "wps";
-                       gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
 
                fn {
                        label = "fn";
-                       gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
                        linux,code = <BTN_0>;
                };
        };
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "keenetic-extra-ii:green:power";
-                       gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
-                       default-state = "keep";
+                       label = "green:power";
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
                };
 
                internet {
-                       label = "keenetic-extra-ii:green:internet";
-                       gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+                       label = "green:internet";
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
                };
 
                wifi {
-                       label = "keenetic-extra-ii:green:wifi";
-                       gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+                       label = "green:wifi";
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "keenetic-extra-ii:green:usb";
-                       gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+                       label = "green:usb";
+                       gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&ohci_port1>, <&ehci_port1>;
                        linux,default-trigger = "usbport";
                };
                usbpower {
                        gpio-export,name = "usbpower";
                        gpio-export,output = <1>;
-                       gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+                       gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       virtual_flash {
+               compatible = "mtd-concat";
+               devices = <&firmware1 &firmware2>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               reg = <0x0 0x1d20000>;
+                       };
                };
        };
 };
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
-               spi-max-frequency = <10000000>;
+               spi-max-frequency = <32000000>;
 
                partitions {
                        compatible = "fixed-partitions";
                                read-only;
                        };
 
-                       partition@50000 {
-                               compatible = "denx,uimage";
-                               label = "firmware";
+                       firmware1: partition@50000 {
+                               label = "firmware_1";
                                reg = <0x50000 0xe90000>;
                        };
 
                                read-only;
                        };
 
-                       partition@1050000 {
+                       firmware2: partition@1050000 {
                                label = "firmware_2";
                                reg = <0x1050000 0xe90000>;
-                               read-only;
                        };
 
                        partition@1ee0000 {
        };
 };
 
-&ehci {
-       status = "okay";
-};
-
-&ohci {
-       status = "okay";
+&ethernet {
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
-&ethernet {
-       mtd-mac-address = <&factory 0x4>;
-       mediatek,portmap = "wllll";
+&esw {
+       mediatek,portmap = <0x3e>;
 };
 
 &wmac {
        status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
 };
 
 &pcie {
 
 &pcie0 {
        mt76@0,0 {
+               compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "gpio", "i2s", "refclk", "spi cs1", "uart1", "wled_an";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "gpio", "i2s", "refclk", "spi cs1", "uart1", "wled_an";
+               function = "gpio";
+       };
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_4: macaddr@4 {
+               reg = <0x4 0x6>;
        };
 };