ramips: fix nvmem-cells for routers based on TP-Link Archer
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_comfast_cf-e390ax.dts
index 106b16573b39fe1c2c737e8613340453387bc4e8..d7facb61a09cc0d3059b0cae792a45171c0a2435 100644 (file)
                compatible = "gpio-leds";
 
                led_status_green: status_green {
-                       label = "green:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
                };
 
                led_status_blue: status_blue {
-                       label = "blue:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
                };
 
                led_status_red: status_red {
-                       label = "red:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
        };
@@ -59,7 +62,8 @@
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
@@ -86,7 +90,7 @@
                                read-only;
                        };
 
-                       factory: partition@50000 {
+                       partition@50000 {
                                label = "factory";
                                reg = <0x50000 0x10000>;
                                read-only;
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0xe00>;
+                                       };
+
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@0 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cells = <&macaddr_factory_e000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
 
                port@4 {