ath79: fortinet-fap-220-b: convert to nvmem-layout
authorLech Perczak <lech.perczak@gmail.com>
Thu, 16 Nov 2023 16:17:32 +0000 (17:17 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Sun, 26 Nov 2023 23:34:49 +0000 (00:34 +0100)
Now that MAC address parser supports the hex format (without
delimiters), use the canonical MAC address stored in U-boot partition.
Get rid of the "mac-address-increment" binding.
While at that, convert ART partition too.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
target/linux/ath79/dts/ar7161_fortinet_fap-220-b.dts
target/linux/ath79/dts/arxxxx_fortinet_loader.dtsi

index 63fe9ade532ad8941f9f7c7d633e0996d5f00269..ddcf68970d32c4e866d1c6beee13b15065fb0a58 100644 (file)
@@ -99,9 +99,8 @@
                compatible = "pci168c,0029";
                reg = <0x8800 0 0 0 0>;
                ieee80211-freq-limit = <2402000 2482000>;
-               nvmem-cells = <&macaddr_art_120c>, <&cal_art_1000>;
+               nvmem-cells = <&macaddr_uboot_3ff80 9>, <&cal_art_1000>;
                nvmem-cell-names = "mac-address", "calibration";
-               mac-address-increment = <9>;
                #gpio-cells = <2>;
                gpio-controller;
        };
                compatible = "pci168c,0029";
                reg = <0x9000 0 0 0 0>;
                ieee80211-freq-limit = <2402000 2482000 4900000 5990000>;
-               nvmem-cells = <&macaddr_art_520c>, <&cal_art_5000>;
+               nvmem-cells = <&macaddr_uboot_3ff80 2>, <&cal_art_5000>;
                nvmem-cell-names = "mac-address", "calibration";
-               mac-address-increment = <2>;
                #gpio-cells = <2>;
                gpio-controller;
        };
 
 &eth1 {
        status = "okay";
-       nvmem-cells = <&macaddr_art_120c>;
+       nvmem-cells = <&macaddr_uboot_3ff80 0>;
        nvmem-cell-names = "mac-address";
 
        pll-data = <0x00110000 0x00001099 0x00991099>;
        status = "okay";
 };
 
-&uboot {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       /* Currently doesn't work, because this one lacks colons as delimiters */
-       macaddr_uboot_3ff80: mac-address-ascii@3ff80 {
-               reg = <0x3ff80 0xc>;
-       };
-};
-
 &art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       cal_art_1000: calibration@1000 {
-               reg = <0x1000 0xeb8>;
-       };
+       nvmem-layout {
+               compatible = "fixed-layout";
+               #address-cells = <1>;
+               #size-cells = <1>;
 
-       macaddr_art_120c: mac-address@120c {
-               reg = <0x120c 0x6>;
-       };
-
-       cal_art_5000: calibration@5000 {
-               reg = <0x5000 0xeb8>;
-       };
+               cal_art_1000: calibration@1000 {
+                       reg = <0x1000 0xeb8>;
+               };
 
-       macaddr_art_520c: mac-address@520c {
-               reg = <0x520c 0x6>;
+               cal_art_5000: calibration@5000 {
+                       reg = <0x5000 0xeb8>;
+               };
        };
 };
index 3bc734313f0da33613f7e77c7bad87298974916a..786626828f2cae8122770e03ac2ff0b5a295ce95 100644 (file)
                                label = "u-boot";
                                reg = <0x000000 0x040000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_uboot_3ff80: mac-address@3ff80 {
+                                               compatible = "mac-base";
+                                               reg = <0x3ff80 0xc>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        fwconcat0: partition@40000 {