ath79: ubnt: nvmem calibration
Userspace handling is deprecated. Moved pcie wifi nodes out of dtsi as these devices differ in wifi chipsets and thus calibration size. Added compatible lines too. Removed pointless label_mac assignments as label-mac-device is already implemented. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20303 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
f57a0e8db3
commit
fb1e8a446d
|
|
@ -19,3 +19,18 @@
|
||||||
ð1 {
|
ð1 {
|
||||||
compatible = "syscon", "simple-mfd";
|
compatible = "syscon", "simple-mfd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002a";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,12 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0x200>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
&usb_phy {
|
&usb_phy {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
@ -40,3 +46,12 @@
|
||||||
&usb {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002b";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,18 @@
|
||||||
ð1 {
|
ð1 {
|
||||||
compatible = "syscon", "simple-mfd";
|
compatible = "syscon", "simple-mfd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002a";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,18 @@
|
||||||
ð1 {
|
ð1 {
|
||||||
compatible = "syscon", "simple-mfd";
|
compatible = "syscon", "simple-mfd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002a";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,18 @@
|
||||||
ð1 {
|
ð1 {
|
||||||
compatible = "syscon", "simple-mfd";
|
compatible = "syscon", "simple-mfd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0x3d8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002e";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,18 @@
|
||||||
compatible = "ubnt,nanostation-m", "ubnt,xm", "qca,ar7241";
|
compatible = "ubnt,nanostation-m", "ubnt,xm", "qca,ar7241";
|
||||||
model = "Ubiquiti Nanostation M (XM)";
|
model = "Ubiquiti Nanostation M (XM)";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002a";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,18 @@
|
||||||
ð1 {
|
ð1 {
|
||||||
compatible = "syscon", "simple-mfd";
|
compatible = "syscon", "simple-mfd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002a";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,18 @@
|
||||||
ð1 {
|
ð1 {
|
||||||
compatible = "syscon", "simple-mfd";
|
compatible = "syscon", "simple-mfd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002a";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,18 @@
|
||||||
&usb {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&art {
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0xeb8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
wifi: wifi@0,0 {
|
||||||
|
compatible = "pci168c,002a";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
nvmem-cells = <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
reg = <0x7f0000 0x010000>;
|
reg = <0x7f0000 0x010000>;
|
||||||
read-only;
|
read-only;
|
||||||
|
|
||||||
nvmem-layout {
|
art: nvmem-layout {
|
||||||
compatible = "fixed-layout";
|
compatible = "fixed-layout";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
@ -83,11 +83,6 @@
|
||||||
|
|
||||||
&pcie {
|
&pcie {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
wifi: wifi@0,0 {
|
|
||||||
reg = <0x0000 0 0 0 0>;
|
|
||||||
qca,no-eeprom;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ð0 {
|
ð0 {
|
||||||
|
|
|
||||||
|
|
@ -829,8 +829,6 @@ ath79_setup_macs()
|
||||||
base_mac=$(mtd_get_mac_binary info 0x8)
|
base_mac=$(mtd_get_mac_binary info 0x8)
|
||||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||||
;;
|
;;
|
||||||
ubnt,powerbridge-m|\
|
|
||||||
ubnt,rocket-m|\
|
|
||||||
ubnt,unifi)
|
ubnt,unifi)
|
||||||
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,6 @@ case "$FIRMWARE" in
|
||||||
meraki,mr12)
|
meraki,mr12)
|
||||||
caldata_extract "art" 0x11000 0xeb8
|
caldata_extract "art" 0x11000 0xeb8
|
||||||
;;
|
;;
|
||||||
ubnt,powerbridge-m|\
|
|
||||||
ubnt,rocket-m)
|
|
||||||
caldata_extract "art" 0x1000 0x1000
|
|
||||||
;;
|
|
||||||
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)
|
||||||
|
|
|
||||||
|
|
@ -148,14 +148,7 @@ ath79_setup_macs()
|
||||||
lan_mac=$(get_mac_label)
|
lan_mac=$(get_mac_label)
|
||||||
wan_mac=$(macaddr_add "$lan_mac" 3)
|
wan_mac=$(macaddr_add "$lan_mac" 3)
|
||||||
;;
|
;;
|
||||||
engenius,enh202-v1|\
|
engenius,enh202-v1)
|
||||||
ubnt,airrouter|\
|
|
||||||
ubnt,bullet-m-ar7240|\
|
|
||||||
ubnt,bullet-m-ar7241|\
|
|
||||||
ubnt,nanobridge-m|\
|
|
||||||
ubnt,nanostation-loco-m|\
|
|
||||||
ubnt,nanostation-m|\
|
|
||||||
ubnt,picostation-m)
|
|
||||||
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
||||||
;;
|
;;
|
||||||
nec,wg600hp|\
|
nec,wg600hp|\
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
|
||||||
|
|
||||||
. /lib/functions/caldata.sh
|
|
||||||
|
|
||||||
board=$(board_name)
|
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
|
||||||
"ath9k-eeprom-pci-0000:00:00.0.bin")
|
|
||||||
case $board in
|
|
||||||
ubnt,airrouter|\
|
|
||||||
ubnt,bullet-m-ar7240|\
|
|
||||||
ubnt,bullet-m-ar7241|\
|
|
||||||
ubnt,nanobridge-m|\
|
|
||||||
ubnt,nanostation-loco-m|\
|
|
||||||
ubnt,nanostation-m|\
|
|
||||||
ubnt,picostation-m)
|
|
||||||
caldata_extract "art" 0x1000 0x1000
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
caldata_die "board $board is not supported yet"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
Loading…
Reference in New Issue