ath79: convert Winchannel WB2000 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>
(removed mtd-cal-data property, merged art + addr nodes back into
partition)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This commit is contained in:
Nick Hainke 2022-12-15 10:08:39 +01:00 committed by Christian Lamparter
parent fd456106aa
commit 08c114ee16
2 changed files with 26 additions and 20 deletions

View File

@ -119,16 +119,36 @@
read-only; read-only;
}; };
art: partition@fe0000 { partition@fe0000 {
label = "art"; label = "art";
reg = <0xfe0000 0x10000>; reg = <0xfe0000 0x10000>;
read-only; read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
calibration_art_1000: calibration@1000 {
reg = <0x1000 0x440>;
}; };
addr: partition@ff0000 { calibration_art_5000: calibration@5000 {
reg = <0x5000 0x440>;
};
};
partition@ff0000 {
label = "addr"; label = "addr";
reg = <0xff0000 0x10000>; reg = <0xff0000 0x10000>;
read-only; read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_addr_0: macaddr@0 {
reg = <0x0 0x6>;
};
}; };
}; };
}; };
@ -140,9 +160,8 @@
ath9k: wifi@0,0 { ath9k: wifi@0,0 {
compatible = "pci168c,0030"; compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>; reg = <0x0000 0 0 0 0>;
qca,no-eeprom; nvmem-cells = <&macaddr_addr_0>, <&calibration_art_5000>;
nvmem-cells = <&macaddr_addr_0>; nvmem-cell-names = "mac-address", "calibration";
nvmem-cell-names = "mac-address";
mac-address-increment = <0x10>; mac-address-increment = <0x10>;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-controller; gpio-controller;
@ -160,9 +179,8 @@
&wmac { &wmac {
status = "okay"; status = "okay";
mtd-cal-data = <&art 0x1000>; nvmem-cells = <&macaddr_addr_0>, <&calibration_art_1000>;
nvmem-cells = <&macaddr_addr_0>; nvmem-cell-names = "mac-address", "calibration";
nvmem-cell-names = "mac-address";
}; };
&mdio0 { &mdio0 {
@ -193,12 +211,3 @@
}; };
}; };
&addr {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_addr_0: macaddr@0 {
reg = <0x0 0x6>;
};
};

View File

@ -83,9 +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
winchannel,wb2000)
caldata_extract "art" 0x5000 0x440
;;
avm,fritz300e) avm,fritz300e)
caldata_extract_reverse "urloader" 0x1541 0x440 caldata_extract_reverse "urloader" 0x1541 0x440
;; ;;