ath79: convert WiFis based on ar7241_ubnt_unifi.dtsi to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

While working on it remove stale uboot partition label and merge art
into partition node.

Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Nick Hainke 2022-12-15 17:04:14 +01:00 committed by Hauke Mehrtens
parent b7ad3c5c5d
commit af5306ba70
4 changed files with 39 additions and 33 deletions

View File

@ -41,7 +41,7 @@
#address-cells = <1>;
#size-cells = <1>;
uboot: partition@0 {
partition@0 {
label = "u-boot";
reg = <0x0 0x40000>;
read-only;
@ -82,10 +82,26 @@
read-only;
};
art: partition@ff0000 {
partition@ff0000 {
label = "art";
reg = <0xff0000 0x10000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
calibration_art_1000: calibration@1000 {
reg = <0x1000 0xeb8>;
};
};
};
};
@ -105,18 +121,6 @@
&wifi {
ubnt,hsr;
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
nvmem-cells = <&calibration_art_1000>;
nvmem-cell-names = "calibration";
};

View File

@ -68,15 +68,32 @@
read-only;
};
art: partition@7f0000 {
partition@7f0000 {
label = "art";
reg = <0x7f0000 0x010000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
calibration_art_1000: calibration@1000 {
reg = <0x1000 0x440>;
};
};
};
};
};
&wifi {
nvmem-cells = <&calibration_art_1000>;
nvmem-cell-names = "calibration";
};
&eth0 {
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
@ -85,13 +102,3 @@
&eth1 {
compatible = "syscon", "simple-mfd";
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
};

View File

@ -26,7 +26,6 @@
wifi: wifi@0,0 {
reg = <0x0000 0 0 0 0>;
qca,no-eeprom;
};
};

View File

@ -86,11 +86,7 @@ case "$FIRMWARE" in
avm,fritz300e)
caldata_extract_reverse "urloader" 0x1541 0x440
;;
ubnt,unifi-ap-outdoor-plus)
caldata_extract "art" 0x1000 0xeb8
;;
buffalo,wzr-hp-g450h|\
ubnt,unifi)
buffalo,wzr-hp-g450h)
caldata_extract "art" 0x1000 0x440
;;
dlink,dir-825-c1|\