Skip to content

Commit b182f2e

Browse files
nehebhauke
authored andcommitted
ath79: meraki_mr1[26]: userspace cal to nvmem
Userspace handling is deprecated. Signed-off-by: Rosen Penev <[email protected]> Link: openwrt/openwrt#21002 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent 6b96130 commit b182f2e

File tree

3 files changed

+34
-36
lines changed

3 files changed

+34
-36
lines changed

target/linux/ath79/dts/ar7161_meraki_mr16.dts

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,20 @@
7474
&pcie0 {
7575
status = "okay";
7676

77-
ath9k0: wifi@11,0 { /* 2.4 GHz */
77+
wifi@11,0 { /* 2.4 GHz */
7878
compatible = "pci168c,0029";
7979
reg = <0x8800 0 0 0 0>;
80-
qca,no-eeprom;
81-
nvmem-cells = <&macaddr_config_66 1>;
82-
nvmem-cell-names = "mac-address";
80+
nvmem-cells = <&macaddr_config_66 1>, <&cal_art_11000>;
81+
nvmem-cell-names = "mac-address", "calibration";
8382
#gpio-cells = <2>;
8483
gpio-controller;
8584
};
8685

87-
ath9k1: wifi@12,0 { /* 5 GHz */
86+
wifi@12,0 { /* 5 GHz */
8887
compatible = "pci168c,0029";
8988
reg = <0x9000 0 0 0 0>;
90-
qca,no-eeprom;
91-
nvmem-cells = <&macaddr_config_66 2>;
92-
nvmem-cell-names = "mac-address";
89+
nvmem-cells = <&macaddr_config_66 2>, <&cal_art_15000>;
90+
nvmem-cell-names = "mac-address", "calibration";
9391
#gpio-cells = <2>;
9492
gpio-controller;
9593
};
@@ -139,7 +137,7 @@
139137
read-only;
140138
};
141139

142-
config: partition@80000 {
140+
partition@80000 {
143141
label = "config";
144142
reg = <0x80000 0x20000>;
145143
read-only;
@@ -167,6 +165,20 @@
167165
label = "art";
168166
reg = <0xfe0000 0x20000>;
169167
read-only;
168+
169+
nvmem-layout {
170+
compatible = "fixed-layout";
171+
#address-cells = <1>;
172+
#size-cells = <1>;
173+
174+
cal_art_11000: calibration@11000 {
175+
reg = <0x11000 0xeb8>;
176+
};
177+
178+
cal_art_15000: calibration@15000 {
179+
reg = <0x15000 0xeb8>;
180+
};
181+
};
170182
};
171183
};
172184
};

target/linux/ath79/dts/ar7242_meraki_mr12.dts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@
7777
wifi@0,0 {
7878
compatible = "pci168c,002a";
7979
reg = <0x0000 0 0 0 0>;
80-
qca,no-eeprom;
81-
nvmem-cells = <&macaddr_config_66 1>;
82-
nvmem-cell-names = "mac-address";
80+
nvmem-cells = <&macaddr_config_66 1>, <&cal_art_11000>;
81+
nvmem-cell-names = "mac-address", "calibration";
8382
};
8483
};
8584

@@ -139,7 +138,7 @@
139138
read-only;
140139
};
141140

142-
config: partition@80000 {
141+
partition@80000 {
143142
label = "config";
144143
reg = <0x80000 0x20000>;
145144
read-only;
@@ -167,6 +166,16 @@
167166
label = "art";
168167
reg = <0xfe0000 0x20000>;
169168
read-only;
169+
170+
nvmem-layout {
171+
compatible = "fixed-layout";
172+
#address-cells = <1>;
173+
#size-cells = <1>;
174+
175+
cal_art_11000: calibration@11000 {
176+
reg = <0x11000 0xeb8>;
177+
};
178+
};
170179
};
171180
};
172181
};

target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ case "$FIRMWARE" in
2525
avm,fritz300e)
2626
caldata_extract_reverse "urloader" 0x1541 0x440
2727
;;
28-
meraki,mr12)
29-
caldata_extract "art" 0x11000 0xeb8
30-
;;
3128
wd,mynet-wifi-rangeextender)
3229
caldata_extract "art" 0x1000 0x440
3330
ath9k_patch_mac $(nvram get wl0_hwaddr)
@@ -37,24 +34,4 @@ case "$FIRMWARE" in
3734
;;
3835
esac
3936
;;
40-
"ath9k-eeprom-pci-0000:00:11.0.bin")
41-
case $board in
42-
meraki,mr16)
43-
caldata_extract "art" 0x11000 0xeb8
44-
;;
45-
*)
46-
caldata_die "board $board is not supported yet"
47-
;;
48-
esac
49-
;;
50-
"ath9k-eeprom-pci-0000:00:12.0.bin")
51-
case $board in
52-
meraki,mr16)
53-
caldata_extract "art" 0x15000 0xeb8
54-
;;
55-
*)
56-
caldata_die "board $board is not supported yet"
57-
;;
58-
esac
59-
;;
6037
esac

0 commit comments

Comments
 (0)