ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3352_allnet_all5002.dts
index ea5386c5e492eb84811b05699b1a9751d0882837..a1133464b37f2ec6ad40a0bbc83e36d6c22212b3 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt3352.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                compatible = "gpio-leds";
 
                ld1 {
-                       label = "all5002:green:ld1";
+                       label = "green:ld1";
                        gpios = <&pcf0 0 GPIO_ACTIVE_LOW>;
                };
 
                ld2 {
-                       label = "all5002:green:ld2";
+                       label = "green:ld2";
                        gpios = <&pcf0 1 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
-&gpio0 {
-       status = "okay";
-};
-
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               macaddr_factory_28: macaddr@28 {
+                                       reg = <0x28 0x6>;
+                               };
                        };
 
                        partition@50000 {
 
 &state_default {
        gpio {
-               ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
-               ralink,function = "gpio";
+               groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+               function = "gpio";
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &ehci {