diff options
author | Edward Chow <equu@openmail.cc> | 2022-11-22 18:49:21 +0800 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-11-27 13:18:29 +0100 |
commit | 2c33fd39a5b84962cfc878a3561a2a51787d4c11 (patch) | |
tree | 72a9df7df66c3b5e498bb2f63bb32413713da5d8 /target | |
parent | 9fa8fff0af727b1cf1898285926cda8a480b08f7 (diff) | |
download | upstream-2c33fd39a5b84962cfc878a3561a2a51787d4c11.tar.gz upstream-2c33fd39a5b84962cfc878a3561a2a51787d4c11.tar.bz2 upstream-2c33fd39a5b84962cfc878a3561a2a51787d4c11.zip |
ath79: calibrate TP-LINK TL-WR2543ND with nvmem
Driver for and pci wlan card now pull the calibration data from the nvmem
subsystem.
This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.
The wifi mac address remains correct after these changes, because When both
"mac-address" and "calibration" are defined, the effective mac address
comes from the cell corresponding to "mac-address" and
mac-address-increment.
Test passed on my tplink tl-wr2543nd.
Signed-off-by: Edward Chow <equu@openmail.cc>
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts | 17 | ||||
-rw-r--r-- | target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 1 |
2 files changed, 13 insertions, 5 deletions
diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts index 3acdc9247d..e250f2a5b4 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -115,7 +115,7 @@ reg = <0x020000 0x7d0000>; }; - partition@7f0000 { + art: partition@7f0000 { label = "art"; reg = <0x7f0000 0x010000>; read-only; @@ -139,9 +139,8 @@ reg = <0x0000 0 0 0 0>; #gpio-cells = <2>; gpio-controller; - qca,no-eeprom; - nvmem-cells = <&macaddr_uboot_1fc00>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_uboot_1fc00>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; }; }; @@ -168,3 +167,13 @@ reg = <0x1fc00 0x6>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: cal@1000 { + reg = <0x1000 0x440>; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index bddaf0bdf8..d6d5b257ff 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -121,7 +121,6 @@ case "$FIRMWARE" in netgear,wnr2200-8m|\ netgear,wnr2200-16m|\ pcs,cap324|\ - tplink,tl-wr2543-v1|\ tplink,tl-wr842n-v1) caldata_extract "art" 0x1000 0x1000 ;; |