ramips: fix DTS EEPROM property for some MT7628 devices
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_winstars_ws-wn583a6.dts
index 2897f42f1dc6c3a41f516706f163f3ae30ea0c72..f699b4c47a14df1c3095aec173b2a5a9139ec89a 100644 (file)
@@ -1,5 +1,4 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
 
 #include "mt7621.dtsi"
 
                compatible = "gpio-leds";
 
                night_light_white {
-                       label = "ws-wn583a6:white:night_light";
+                       label = "white:night_light";
                        gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_blue: status_blue {
-                       label = "ws-wn583a6:blue:status";
+                       label = "blue:status";
                        gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
                };
 
                status_amber {
-                       label = "ws-wn583a6:amber:status";
+                       label = "amber:status";
                        gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
                };
 
                led_status_red: status_red {
-                       label = "ws-wn583a6:red:status";
+                       label = "red:status";
                        gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
                };
        };
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x400>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        partition@50000 {
        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";
        };
 };
 
        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";
        };
 };
 
+&ethernet {
+       pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
+};
+
 &gmac0 {
-       mtd-mac-address = <&factory 0xe000>;
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
                port@0 {
                        status = "okay";
                        label = "wan";
-                       mtd-mac-address = <&factory 0xe006>;
+                       nvmem-cells = <&macaddr_factory_e006>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@1 {