ath79: tp9343: convert to nvmem-layout
authorRosen Penev <rosenp@gmail.com>
Sun, 26 Nov 2023 01:36:49 +0000 (17:36 -0800)
committerRosen Penev <rosenp@gmail.com>
Sun, 26 Nov 2023 03:43:35 +0000 (19:43 -0800)
Allows getting rid of deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts
target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts
target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts
target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi

index b2c009c346878d99ea83608513663def503f739b..b38cd418176af3be8fc15ef8285e167603fde878 100644 (file)
@@ -63,7 +63,6 @@
 };
 
 &eth1 {
-       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00 (-1)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-1)>;
 };
index daf77793141bd164274350374d965c9b9ca671da..f837dccff9af14105b589f5b378c5ad74c695c11 100644 (file)
@@ -66,6 +66,6 @@
 };
 
 &eth1 {
-       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00 0>;
        nvmem-cell-names = "mac-address";
 };
index 409f288f07adc2fe97e3c83e081a94f24188c5ae..ccb3bb167090b12af14fe2f165d6c4cf3db172d3 100644 (file)
@@ -30,6 +30,6 @@
 };
 
 &eth1 {
-       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00 0>;
        nvmem-cell-names = "mac-address";
 };
index d4638f1acf40077d9960ecea396fffcc58346c60..61adc08289a985e32700bc6feaf2c4593c08d577 100644 (file)
                                label = "config";
                                reg = <0x750000 0x0a0000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_config_8: macaddr@8 {
+                                               compatible = "mac-base";
+                                               reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        art: partition@7f0000 {
 
        phy-handle = <&swphy0>;
 
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &eth1 {
        status = "okay";
 
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 0>;
        nvmem-cell-names = "mac-address";
 };
-
-&config {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_config_8: macaddr@8 {
-               reg = <0x8 0x6>;
-       };
-};
index 3a38b8025abdd9f8c7728b21f65e46e0d5556f1a..89dff4340569899a5b4e46c8a3bc1e1a49044ce5 100644 (file)
                                label = "u-boot";
                                reg = <0x000000 0x020000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_uboot_1fc00: macaddr@1fc00 {
+                                               compatible = "mac-base";
+                                               reg = <0x1fc00 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        partition@20000 {
@@ -50,9 +62,8 @@
 
        phy-handle = <&swphy4>;
 
-       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &eth1 {
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00 0>;
        nvmem-cell-names = "mac-address";
 };
-
-&uboot {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_uboot_1fc00: macaddr@1fc00 {
-               reg = <0x1fc00 0x6>;
-       };
-};