ramips: mt7620a: convert to nvmem-layout
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_dovado_tiny-ac.dts
index 88bd514d53e780b75fba853f5c0f3617c76f8fc5..821aa04f9531e9f3f3d23036b2227db9da395f06 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "mt7620a.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
@@ -9,22 +7,18 @@
        compatible = "dovado,tiny-ac", "ralink,mt7620a-soc";
        model = "Dovado Tiny AC";
 
-       chosen {
-               bootargs = "console=ttyS0,57600";
-       };
-
        leds {
                compatible = "gpio-leds";
 
                usb {
-                       label = "tiny-ac:green:usb";
+                       label = "green:usb";
                        gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&ohci_port1>, <&ehci_port1>;
                        linux,default-trigger = "usbport";
                };
 
                wifi {
-                       label = "tiny-ac:orange:wifi";
+                       label = "orange:wifi";
                        gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
        };
        };
 };
 
-&gpio0 {
-       status = "okay";
-};
-
 &gpio2 {
        status = "okay";
 };
@@ -66,7 +56,7 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
 };
 
 &ethernet {
-       status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
        mediatek,portmap = "llllw";
 
        port@4 {
 };
 
 &gsw {
-       mediatek,port4 = "gmac";
+       mediatek,port4-gmac;
+       mediatek,ephy-base = /bits/ 8 <8>;
 };
 
 &pcie {
 
 &state_default {
        gpio {
-               ralink,group = "uartf", "nd_sd", "wled";
-               ralink,function = "gpio";
+               groups = "uartf", "nd_sd", "wled";
+               function = "gpio";
        };
 };
 
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };