mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 08:44:39 +01:00
ath79: meraki_mr1[26]: userspace cal to nvmem
Userspace handling is deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21002 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
6b961303e0
commit
b182f2e0b4
3 changed files with 34 additions and 36 deletions
|
|
@ -74,22 +74,20 @@
|
||||||
&pcie0 {
|
&pcie0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
ath9k0: wifi@11,0 { /* 2.4 GHz */
|
wifi@11,0 { /* 2.4 GHz */
|
||||||
compatible = "pci168c,0029";
|
compatible = "pci168c,0029";
|
||||||
reg = <0x8800 0 0 0 0>;
|
reg = <0x8800 0 0 0 0>;
|
||||||
qca,no-eeprom;
|
nvmem-cells = <&macaddr_config_66 1>, <&cal_art_11000>;
|
||||||
nvmem-cells = <&macaddr_config_66 1>;
|
nvmem-cell-names = "mac-address", "calibration";
|
||||||
nvmem-cell-names = "mac-address";
|
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-controller;
|
gpio-controller;
|
||||||
};
|
};
|
||||||
|
|
||||||
ath9k1: wifi@12,0 { /* 5 GHz */
|
wifi@12,0 { /* 5 GHz */
|
||||||
compatible = "pci168c,0029";
|
compatible = "pci168c,0029";
|
||||||
reg = <0x9000 0 0 0 0>;
|
reg = <0x9000 0 0 0 0>;
|
||||||
qca,no-eeprom;
|
nvmem-cells = <&macaddr_config_66 2>, <&cal_art_15000>;
|
||||||
nvmem-cells = <&macaddr_config_66 2>;
|
nvmem-cell-names = "mac-address", "calibration";
|
||||||
nvmem-cell-names = "mac-address";
|
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-controller;
|
gpio-controller;
|
||||||
};
|
};
|
||||||
|
|
@ -139,7 +137,7 @@
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
config: partition@80000 {
|
partition@80000 {
|
||||||
label = "config";
|
label = "config";
|
||||||
reg = <0x80000 0x20000>;
|
reg = <0x80000 0x20000>;
|
||||||
read-only;
|
read-only;
|
||||||
|
|
@ -167,6 +165,20 @@
|
||||||
label = "art";
|
label = "art";
|
||||||
reg = <0xfe0000 0x20000>;
|
reg = <0xfe0000 0x20000>;
|
||||||
read-only;
|
read-only;
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
cal_art_11000: calibration@11000 {
|
||||||
|
reg = <0x11000 0xeb8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
cal_art_15000: calibration@15000 {
|
||||||
|
reg = <0x15000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -77,9 +77,8 @@
|
||||||
wifi@0,0 {
|
wifi@0,0 {
|
||||||
compatible = "pci168c,002a";
|
compatible = "pci168c,002a";
|
||||||
reg = <0x0000 0 0 0 0>;
|
reg = <0x0000 0 0 0 0>;
|
||||||
qca,no-eeprom;
|
nvmem-cells = <&macaddr_config_66 1>, <&cal_art_11000>;
|
||||||
nvmem-cells = <&macaddr_config_66 1>;
|
nvmem-cell-names = "mac-address", "calibration";
|
||||||
nvmem-cell-names = "mac-address";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -139,7 +138,7 @@
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
config: partition@80000 {
|
partition@80000 {
|
||||||
label = "config";
|
label = "config";
|
||||||
reg = <0x80000 0x20000>;
|
reg = <0x80000 0x20000>;
|
||||||
read-only;
|
read-only;
|
||||||
|
|
@ -167,6 +166,16 @@
|
||||||
label = "art";
|
label = "art";
|
||||||
reg = <0xfe0000 0x20000>;
|
reg = <0xfe0000 0x20000>;
|
||||||
read-only;
|
read-only;
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
cal_art_11000: calibration@11000 {
|
||||||
|
reg = <0x11000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,6 @@ case "$FIRMWARE" in
|
||||||
avm,fritz300e)
|
avm,fritz300e)
|
||||||
caldata_extract_reverse "urloader" 0x1541 0x440
|
caldata_extract_reverse "urloader" 0x1541 0x440
|
||||||
;;
|
;;
|
||||||
meraki,mr12)
|
|
||||||
caldata_extract "art" 0x11000 0xeb8
|
|
||||||
;;
|
|
||||||
wd,mynet-wifi-rangeextender)
|
wd,mynet-wifi-rangeextender)
|
||||||
caldata_extract "art" 0x1000 0x440
|
caldata_extract "art" 0x1000 0x440
|
||||||
ath9k_patch_mac $(nvram get wl0_hwaddr)
|
ath9k_patch_mac $(nvram get wl0_hwaddr)
|
||||||
|
|
@ -37,24 +34,4 @@ case "$FIRMWARE" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
"ath9k-eeprom-pci-0000:00:11.0.bin")
|
|
||||||
case $board in
|
|
||||||
meraki,mr16)
|
|
||||||
caldata_extract "art" 0x11000 0xeb8
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
caldata_die "board $board is not supported yet"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
"ath9k-eeprom-pci-0000:00:12.0.bin")
|
|
||||||
case $board in
|
|
||||||
meraki,mr16)
|
|
||||||
caldata_extract "art" 0x15000 0xeb8
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
caldata_die "board $board is not supported yet"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue