Skip to content

Commit 62329a5

Browse files
committed
qualcommax: ipq807x: improve support for Aliyun AP8220
1 parent c14fe39 commit 62329a5

File tree

7 files changed

+45
-9
lines changed

7 files changed

+45
-9
lines changed

package/firmware/ipq-wifi/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ endef
2828
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
2929

3030
ALLWIFIBOARDS:= \
31+
aliyun_ap8220 \
3132
arcadyan_aw1000 \
3233
buffalo_wxr-5950ax12 \
3334
compex_wpq873 \
@@ -139,6 +140,7 @@ endef
139140
# Place files in this directory as board-<devicename>.<qca4019|qca9888|qca9889|qca9984|qca99x0|ipq8074>
140141
# Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
141142

143+
$(eval $(call generate-ipq-wifi-package,aliyun_ap8220,Aliyun AP8220))
142144
$(eval $(call generate-ipq-wifi-package,arcadyan_aw1000,Arcadyan AW1000))
143145
$(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
144146
$(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))
128 KB
Binary file not shown.

target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ap8220.dts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
aliases {
1717
serial0 = &blsp1_uart5;
18+
serial1 = &blsp1_uart3;
1819
led-boot = &led_pwr;
1920
led-failsafe = &led_pwr;
2021
led-running = &led_pwr;
@@ -23,7 +24,7 @@
2324

2425
chosen {
2526
stdout-path = "serial0:115200n8";
26-
bootargs-append = " root=/dev/ubiblock0_1 swiotlb=1 coherent_pool=2M";
27+
bootargs-append = " root=/dev/ubiblock0_1";
2728
};
2829

2930
keys {
@@ -259,6 +260,10 @@
259260
};
260261
};
261262

263+
&blsp1_uart3 {
264+
status = "okay";
265+
};
266+
262267
&blsp1_uart5 {
263268
status = "okay";
264269
};
@@ -348,9 +353,17 @@
348353
&dp5 {
349354
status = "okay";
350355
phy-handle = <&qca8081_24>;
356+
label = "lan";
351357
};
352358

353359
&dp6 {
354360
status = "okay";
355361
phy-handle = <&qca8081_28>;
362+
label = "wan";
363+
};
364+
365+
&wifi {
366+
status = "okay";
367+
qcom,ath11k-calibration-variant = "Aliyun-AP8220";
368+
qcom,ath11k-fw-memory-mode = <1>;
356369
};

target/linux/qualcommax/image/ipq807x.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ define Device/aliyun_ap8220
4242
PAGESIZE := 2048
4343
DEVICE_DTS_CONFIG := config@ac02
4444
SOC := ipq8071
45-
IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
45+
DEVICE_PACKAGES := ipq-wifi-aliyun_ap8220
4646
endef
4747
TARGET_DEVICES += aliyun_ap8220
4848

target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ ipq807x_setup_interfaces()
1111
local board="$1"
1212

1313
case "$board" in
14-
aliyun,ap8220)
15-
ucidef_set_interfaces_lan_wan "eth1" "eth0"
14+
aliyun,ap8220|\
15+
edgecore,eap102|\
16+
yuncore,ax880|\
17+
zte,mf269)
18+
ucidef_set_interfaces_lan_wan "lan" "wan"
1619
;;
1720
arcadyan,aw1000|\
1821
buffalo,wxr-5950ax12|\
@@ -28,11 +31,6 @@ ipq807x_setup_interfaces()
2831
xiaomi,ax3600)
2932
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
3033
;;
31-
edgecore,eap102|\
32-
yuncore,ax880|\
33-
zte,mf269)
34-
ucidef_set_interfaces_lan_wan "lan" "wan"
35-
;;
3634
edimax,cax1800)
3735
ucidef_set_interfaces_lan_wan "lan"
3836
;;
@@ -61,9 +59,30 @@ ipq807x_setup_interfaces()
6159
esac
6260
}
6361

62+
ipq807x_setup_macs()
63+
{
64+
local board="$1"
65+
local lan_mac=""
66+
local wan_mac=""
67+
local label_mac=""
68+
69+
case "$board" in
70+
aliyun,ap8220)
71+
wan_mac=$(mtd_get_mac_text product_info 0x4b)
72+
lan_mac=$(macaddr_add "$wan_mac" 1)
73+
label_mac="$wan_mac"
74+
;;
75+
esac
76+
77+
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
78+
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
79+
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
80+
}
81+
6482
board_config_update
6583
board=$(board_name)
6684
ipq807x_setup_interfaces $board
85+
ipq807x_setup_macs $board
6786
board_config_flush
6887

6988
exit 0

target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ board=$(board_name)
99
case "$FIRMWARE" in
1010
"ath11k/IPQ8074/hw2.0/cal-ahb-c000000.wifi.bin")
1111
case "$board" in
12+
aliyun,ap8220|\
1213
arcadyan,aw1000|\
1314
buffalo,wxr-5950ax12|\
1415
cmcc,rm2-6|\

target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ case "$board" in
1414
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 1 > /sys${DEVPATH}/macaddress
1515
[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress
1616
;;
17+
aliyun,ap8220|\
1718
cmcc,rm2-6|\
1819
zte,mf269)
1920
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress

0 commit comments

Comments
 (0)