ramips: add NMBM support for ipTIME AX2004M
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3883_sitecom_wlr-6000.dts
index ffa99b5946c19bf681ed165eae034429910ec2c3..94a47b8735e2924f631ca3d7c49b061dba9a658b 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "sitecom,wlr-6000", "ralink,rt3883-soc";
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "wlr-6000:red:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
                };
 
                ops {
-                       label = "wlr-6000:white:ops";
+                       label = "white:ops";
                        gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
                };
        };
@@ -64,8 +66,8 @@
 
 &ethernet {
        status = "okay";
-       mtd-mac-address = <&factory 0x8004>;
-       mtd-mac-address-increment = <1>;
+       nvmem-cells = <&macaddr_factory_8004 1>;
+       nvmem-cell-names = "mac-address";
 
        port@0 {
                phy-handle = <&phy0>;
                                read-only;
                        };
 
-                       factory: partition@40000 {
+                       partition@40000 {
                                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>;
+                                       };
+
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+
+                                       macaddr_factory_8004: macaddr@8004 {
+                                               compatible = "mac-base";
+                                               reg = <0x8004 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "pci1814,3091";
                reg = <0x10000 0 0 0 0>;
-               ralink,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
 &wmac {
-       status = "okay";
        ralink,2ghz = <0>;
-       ralink,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &ehci {