ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt5350_unbranded_a5-v11.dts
index 8a3485971dda4165966350254505bacecfea348c..64fd8c6b15e69228f523d24f1132272a1d76ed14 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt5350.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
@@ -7,7 +5,7 @@
 
 / {
        compatible = "unbranded,a5-v11", "ralink,rt5350-soc";
-       model = "A5-V11";
+       model = "Unbranded A5-V11";
 
        aliases {
                led-boot = &led_power;
                compatible = "gpio-leds";
 
                system {
-                       label = "a5-v11:blue:system";
+                       label = "blue:system";
                        gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
                };
 
                led_power: power {
-                       label = "a5-v11:red:power";
+                       label = "red:power";
                        gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
                };
        };
@@ -63,7 +61,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_0: eeprom@0 {
+                                               reg = <0x0 0x200>;
+                                       };
+
+                                       macaddr_factory_4: macaddr@4 {
+                                               reg = <0x4 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
        };
 };
 
-&gpio1 {
-       status = "okay";
-};
-
 &state_default {
        gpio {
-               ralink,group = "i2c", "jtag", "uartf", "led";
-               ralink,function = "gpio";
+               groups = "i2c", "jtag", "uartf", "led";
+               function = "gpio";
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
-};
-
-&ehci {
-       status = "okay";
-};
-
-&ohci {
-       status = "okay";
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };