ramips: add support for Sercomm CPJ routers
[openwrt/openwrt.git] / target / linux / ramips / dts / rt2880_airlink101_ar670w.dts
index 6c6f58d920e79b111d7e635372c2385fd407fca6..4c9014b7d8623f8dd82e041236ab3e2c61672fdb 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt2880.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                        };
 
                        factory: partition@30000 {
-                               reg = <0x30000 0x10000>;
+                               compatible = "nvmem-cells";
                                label = "factory";
+                               reg = <0x30000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_2000: eeprom@2000 {
+                                       reg = <0x2000 0x200>;
+                               };
+
+                               macaddr_factory_2004: macaddr@2004 {
+                                       reg = <0x2004 0x6>;
+                               };
                        };
 
                        partition@40000 {
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "ar670w:green:power";
+                       label = "green:power";
                        gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
                };
 
                wpsblue {
-                       label = "ar670w:blue:wps";
+                       label = "blue:wps";
                        gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
        };
        };
 };
 
-&gpio0 {
-       status = "okay";
-};
-
 &state_default {
        gpio {
                groups = "i2c", "spi", "uartlite";
@@ -91,7 +96,8 @@
 
 &ethernet {
        status = "okay";
-       mtd-mac-address = <&factory 0x2004>;
+       nvmem-cells = <&macaddr_factory_2004>;
+       nvmem-cell-names = "mac-address";
 
        port@0 {
                phy-handle = <&phy0>;
 };
 
 &wmac {
-       status = "okay";
-       ralink,mtd-eeprom = <&factory 0x2000>;
+       nvmem-cells = <&eeprom_factory_2000>;
+       nvmem-cell-names = "eeprom";
 };