ath79: convert Ubiquiti UniFi AP Pro WiFis to nvmem-cells

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

Signed-off-by: Nick Hainke <vincent@systemli.org>
(merged art node back into partition-node)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This commit is contained in:
Nick Hainke 2022-12-15 09:57:28 +01:00 committed by Christian Lamparter
parent f63cf33aa7
commit fd456106aa
2 changed files with 21 additions and 14 deletions

View file

@ -100,10 +100,26 @@
read-only; read-only;
}; };
art: partition@ff0000 { partition@ff0000 {
label = "art"; label = "art";
reg = <0xff0000 0x10000>; reg = <0xff0000 0x10000>;
read-only; 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>;
};
calibration_art_5000: calibration@5000 {
reg = <0x5000 0x440>;
};
}; };
}; };
}; };
@ -115,14 +131,16 @@
wifi@0,0 { wifi@0,0 {
compatible = "pci168c,0033"; compatible = "pci168c,0033";
reg = <0 0 0 0 0>; reg = <0 0 0 0 0>;
qca,no-eeprom; nvmem-cells = <&calibration_art_5000>;
nvmem-cell-names = "calibration";
}; };
}; };
&wmac { &wmac {
status = "okay"; status = "okay";
mtd-cal-data = <&art 0x1000>; nvmem-cells = <&calibration_art_1000>;
nvmem-cell-names = "calibration";
}; };
&mdio0 { &mdio0 {
@ -150,13 +168,3 @@
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-handle = <&phy0>; phy-handle = <&phy0>;
}; };
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
};

View file

@ -83,7 +83,6 @@ case "$FIRMWARE" in
;; ;;
"ath9k-eeprom-pci-0000:00:00.0.bin") "ath9k-eeprom-pci-0000:00:00.0.bin")
case $board in case $board in
ubnt,unifi-ap-pro|\
winchannel,wb2000) winchannel,wb2000)
caldata_extract "art" 0x5000 0x440 caldata_extract "art" 0x5000 0x440
;; ;;