mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 08:44:39 +01:00
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
14 changed files with 137 additions and 46 deletions
|
|
@ -19,3 +19,18 @@
|
|||
ð1 {
|
||||
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 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
@ -40,3 +46,12 @@
|
|||
&usb {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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";
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
art: nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
|
@ -83,11 +83,6 @@
|
|||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
wifi: wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
|
|
|
|||
|
|
@ -829,8 +829,6 @@ ath79_setup_macs()
|
|||
base_mac=$(mtd_get_mac_binary info 0x8)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-m|\
|
||||
ubnt,unifi)
|
||||
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -42,10 +42,6 @@ case "$FIRMWARE" in
|
|||
meraki,mr12)
|
||||
caldata_extract "art" 0x11000 0xeb8
|
||||
;;
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-m)
|
||||
caldata_extract "art" 0x1000 0x1000
|
||||
;;
|
||||
wd,mynet-wifi-rangeextender)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(nvram get wl0_hwaddr)
|
||||
|
|
|
|||
|
|
@ -148,14 +148,7 @@ ath79_setup_macs()
|
|||
lan_mac=$(get_mac_label)
|
||||
wan_mac=$(macaddr_add "$lan_mac" 3)
|
||||
;;
|
||||
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)
|
||||
engenius,enh202-v1)
|
||||
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
||||
;;
|
||||
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…
Add table
Reference in a new issue