ramips: clean up useless dts partition labels
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_cudy_wr2100.dts
index 692c94da555f5f0814de2213fbf7b61b473d1882..5b21cff130567f1f7eb10518bc03104603055f61 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "cudy,wr2100", "mediatek,mt7621-soc";
@@ -51,7 +52,8 @@
                };
 
                wan {
-                       label = "green:wan";
+                       function = LED_FUNCTION_WAN;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
 
@@ -78,7 +80,8 @@
 };
 
 &gmac0 {
-       mtd-mac-address = <&bdinfo 0xde00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &pcie {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
 
 &pcie1 {
-       wifi@1,0 {
+       wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
                                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 0x400>;
+                                       };
+
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x4da8>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
                                read-only;
                        };
 
-                       bdinfo: partition@ff0000 {
+                       partition@ff0000 {
                                label = "bdinfo";
                                reg = <0xff0000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_bdinfo_de00: macaddr@de00 {
+                                               compatible = "mac-base";
+                                               reg = <0xde00 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
                };
        };
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_bdinfo_de00 1>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-
-                       mtd-mac-address = <&bdinfo 0xde00>;
-                       mtd-mac-address-increment = <1>;
-               };
        };
 };