ath79: fortinet-fap-220-b: convert to nvmem-layout

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>
This commit is contained in:
Lech Perczak 2023-11-16 17:17:32 +01:00 committed by Christian Marangi
parent cee7622ab0
commit 7e5e010035
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7
2 changed files with 25 additions and 32 deletions

View file

@ -99,9 +99,8 @@
compatible = "pci168c,0029"; compatible = "pci168c,0029";
reg = <0x8800 0 0 0 0>; reg = <0x8800 0 0 0 0>;
ieee80211-freq-limit = <2402000 2482000>; 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"; nvmem-cell-names = "mac-address", "calibration";
mac-address-increment = <9>;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-controller; gpio-controller;
}; };
@ -110,9 +109,8 @@
compatible = "pci168c,0029"; compatible = "pci168c,0029";
reg = <0x9000 0 0 0 0>; reg = <0x9000 0 0 0 0>;
ieee80211-freq-limit = <2402000 2482000 4900000 5990000>; 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"; nvmem-cell-names = "mac-address", "calibration";
mac-address-increment = <2>;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-controller; gpio-controller;
}; };
@ -133,7 +131,7 @@
&eth1 { &eth1 {
status = "okay"; status = "okay";
nvmem-cells = <&macaddr_art_120c>; nvmem-cells = <&macaddr_uboot_3ff80 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
pll-data = <0x00110000 0x00001099 0x00991099>; pll-data = <0x00110000 0x00001099 0x00991099>;
@ -149,35 +147,18 @@
status = "okay"; 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 { &art {
compatible = "nvmem-cells"; nvmem-layout {
#address-cells = <1>; compatible = "fixed-layout";
#size-cells = <1>; #address-cells = <1>;
#size-cells = <1>;
cal_art_1000: calibration@1000 { cal_art_1000: calibration@1000 {
reg = <0x1000 0xeb8>; reg = <0x1000 0xeb8>;
}; };
macaddr_art_120c: mac-address@120c { cal_art_5000: calibration@5000 {
reg = <0x120c 0x6>; reg = <0x5000 0xeb8>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0xeb8>;
};
macaddr_art_520c: mac-address@520c {
reg = <0x520c 0x6>;
}; };
}; };

View file

@ -40,6 +40,18 @@
label = "u-boot"; label = "u-boot";
reg = <0x000000 0x040000>; reg = <0x000000 0x040000>;
read-only; 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 { fwconcat0: partition@40000 {