qualcommax: ipq807x: improve support for Aliyun AP8220

This commit is contained in:
coolsnowwolf 2025-01-25 22:01:02 +08:00
parent c14fe39288
commit 62329a55f8
7 changed files with 45 additions and 9 deletions

View File

@ -28,6 +28,7 @@ endef
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
ALLWIFIBOARDS:= \
aliyun_ap8220 \
arcadyan_aw1000 \
buffalo_wxr-5950ax12 \
compex_wpq873 \
@ -139,6 +140,7 @@ endef
# Place files in this directory as board-<devicename>.<qca4019|qca9888|qca9889|qca9984|qca99x0|ipq8074>
# Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
$(eval $(call generate-ipq-wifi-package,aliyun_ap8220,Aliyun AP8220))
$(eval $(call generate-ipq-wifi-package,arcadyan_aw1000,Arcadyan AW1000))
$(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
$(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))

View File

@ -15,6 +15,7 @@
aliases {
serial0 = &blsp1_uart5;
serial1 = &blsp1_uart3;
led-boot = &led_pwr;
led-failsafe = &led_pwr;
led-running = &led_pwr;
@ -23,7 +24,7 @@
chosen {
stdout-path = "serial0:115200n8";
bootargs-append = " root=/dev/ubiblock0_1 swiotlb=1 coherent_pool=2M";
bootargs-append = " root=/dev/ubiblock0_1";
};
keys {
@ -259,6 +260,10 @@
};
};
&blsp1_uart3 {
status = "okay";
};
&blsp1_uart5 {
status = "okay";
};
@ -348,9 +353,17 @@
&dp5 {
status = "okay";
phy-handle = <&qca8081_24>;
label = "lan";
};
&dp6 {
status = "okay";
phy-handle = <&qca8081_28>;
label = "wan";
};
&wifi {
status = "okay";
qcom,ath11k-calibration-variant = "Aliyun-AP8220";
qcom,ath11k-fw-memory-mode = <1>;
};

View File

@ -42,7 +42,7 @@ define Device/aliyun_ap8220
PAGESIZE := 2048
DEVICE_DTS_CONFIG := config@ac02
SOC := ipq8071
IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
DEVICE_PACKAGES := ipq-wifi-aliyun_ap8220
endef
TARGET_DEVICES += aliyun_ap8220

View File

@ -11,8 +11,11 @@ ipq807x_setup_interfaces()
local board="$1"
case "$board" in
aliyun,ap8220)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
aliyun,ap8220|\
edgecore,eap102|\
yuncore,ax880|\
zte,mf269)
ucidef_set_interfaces_lan_wan "lan" "wan"
;;
arcadyan,aw1000|\
buffalo,wxr-5950ax12|\
@ -28,11 +31,6 @@ ipq807x_setup_interfaces()
xiaomi,ax3600)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
;;
edgecore,eap102|\
yuncore,ax880|\
zte,mf269)
ucidef_set_interfaces_lan_wan "lan" "wan"
;;
edimax,cax1800)
ucidef_set_interfaces_lan_wan "lan"
;;
@ -61,9 +59,30 @@ ipq807x_setup_interfaces()
esac
}
ipq807x_setup_macs()
{
local board="$1"
local lan_mac=""
local wan_mac=""
local label_mac=""
case "$board" in
aliyun,ap8220)
wan_mac=$(mtd_get_mac_text product_info 0x4b)
lan_mac=$(macaddr_add "$wan_mac" 1)
label_mac="$wan_mac"
;;
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
}
board_config_update
board=$(board_name)
ipq807x_setup_interfaces $board
ipq807x_setup_macs $board
board_config_flush
exit 0

View File

@ -9,6 +9,7 @@ board=$(board_name)
case "$FIRMWARE" in
"ath11k/IPQ8074/hw2.0/cal-ahb-c000000.wifi.bin")
case "$board" in
aliyun,ap8220|\
arcadyan,aw1000|\
buffalo,wxr-5950ax12|\
cmcc,rm2-6|\

View File

@ -14,6 +14,7 @@ case "$board" in
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress
;;
aliyun,ap8220|\
cmcc,rm2-6|\
zte,mf269)
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress