ramips: convert the remaining mtd-mac-address to NVMEM format
authorShiji Yang <yangshiji66@qq.com>
Mon, 2 Oct 2023 03:42:08 +0000 (11:42 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 17 Oct 2023 10:07:22 +0000 (12:07 +0200)
`mtd-mac-address` has been abandoned. Therefore, convert them to
NVMEM format. This patch also removes some useless mtd-mac-address
properties.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
target/linux/ramips/dts/mt7620a_netcore_nw5212.dts
target/linux/ramips/dts/mt7620n_netgear_pr2000.dts
target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts

index 25287ebc0bc6be553a8e9294e98c041657c4e0c5..e4f8c0f1fe8d04e3634fcc43ca7c47d75a16072c 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_factory_28: macaddr@28 {
+                                       reg = <0x28 0x6>;
+                               };
                        };
 
                        partition@50000 {
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
        mediatek,portmap = "llllw";
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &ehci {
index 6b4dde543217e11ded9b64e5c5f56aed7ba89da5..09d70af4c71e1c2b76396cb71164cbe236b7b302 100644 (file)
                        };
 
                        board_data: partition@f70000 {
+                               compatible = "nvmem-cells";
                                label = "board_data";
                                reg = <0xf70000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_board_data_b0: macaddr@b0 {
+                                       reg = <0xb0 0x6>;
+                               };
                        };
 
                        partition@f80000 {
 };
 
 &ethernet {
-       mtd-mac-address = <&board_data 0xb0>;
        mediatek,portmap = "wllll";
+       nvmem-cells = <&macaddr_board_data_b0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &ehci {
 
 &wmac {
        ralink,mtd-eeprom = <&factory 0x0>;
-       mtd-mac-address = <&board_data 0xb0>;
+       nvmem-cells = <&macaddr_board_data_b0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &state_default {
index 81734ed4fbfb55a34d362b71b4031c609fc74f2f..bec9e9518258c210f72ec857700bf6dc79ed5628 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_factory_8004: macaddr@8004 {
+                                       reg = <0x8004 0x6>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
                        };
 
                        partition@50000 {
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
-               mtd-mac-address = < 0x8004>;
+               nvmem-cells = <&macaddr_factory_8004>;
+               nvmem-cell-names = "mac-address";
                mac-address-increment = <2>;
        };
 };
        status = "okay";
        mediatek,mtd-eeprom = <&factory 0x0>;
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-       macaddr_factory_e000: macaddr@4 {
-               reg = <0xe000 0x6>;
-       };
-};