ath79: add support for Yuncore XD3200

Specification:

- QCA9563 (775MHz), 128MB RAM, 16MB SPI NOR
- 2T2R 802.11b/g/n 2.4GHz
- 2T2R 802.11n/ac 5GHz
- 2x 10/100/1000 Mbps Ethernet, with 802.3at PoE support (WAN port)

LED for 5 GHz WLAN is currently not supported as it is connected directly
to the QCA9882 radio chip.

Flash instructions:

If your device comes with generic QSDK based firmware, you can login
over telnet (login: root, empty password, default IP: 192.168.188.253),
issue first (important!) 'fw_setenv' command and then perform regular
upgrade, using 'sysupgrade -n -F ...' (you can use 'wget' to download
image to the device, SSH server is not available):

  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
  sysupgrade -n -F openwrt-...-yuncore_...-squashfs-sysupgrade.bin

In case your device runs firmware with YunCore custom GUI, you can use
U-Boot recovery mode:

1. Set a static IP 192.168.0.141/24 on PC and start TFTP server with
   'tftp' image renamed to 'upgrade.bin'
2. Power the device with reset button pressed and release it after 5-7
   seconds, recovery mode should start downloading image from server
   (unfortunately, there is no visible indication that recovery got
   enabled - in case of problems check TFTP server logs)

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry-picked from commit c91df224f5)
This commit is contained in:
Thibaut VARÈNE 2022-04-15 13:17:49 +02:00 committed by Petr Štetiar
parent c5ef62a218
commit 06874171d1
6 changed files with 49 additions and 2 deletions

View File

@ -61,6 +61,7 @@ samsung,wam250|\
ubnt,nanostation-m|\
yuncore,a770|\
yuncore,a782|\
yuncore,xd3200|\
yuncore,xd4200|\
zyxel,nbg6616)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"

View File

@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca9563_yuncore_xd4200.dtsi"
/ {
compatible = "yuncore,xd3200", "qca,qca9563";
model = "YunCore XD3200";
aliases {
label-mac-device = &eth0;
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
};
leds {
compatible = "gpio-leds";
led_system: system {
label = "green:system";
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};

View File

@ -220,7 +220,8 @@ glinet,gl-x750)
hak5,lan-turtle)
ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1"
;;
joyit,jt-or750i)
joyit,jt-or750i|\
yuncore,xd3200)
ucidef_set_led_default "ath10k" "ath10k-disable" "ath10k-phy0" "0"
;;
meraki,mr12|\

View File

@ -306,6 +306,7 @@ ath79_setup_interfaces()
ubnt,nanobeam-ac-gen2|\
ubnt,nanostation-ac|\
yuncore,a782|\
yuncore,xd3200|\
yuncore,xd4200)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:wan"

View File

@ -44,7 +44,8 @@ case "$FIRMWARE" in
ubnt,powerbeam-5ac-500|\
ubnt,powerbeam-5ac-gen2|\
ubnt,unifiac-pro|\
yuncore,a770)
yuncore,a770|\
yuncore,xd3200)
caldata_extract "art" 0x5000 0x844
;;
devolo,dvl1200e|\

View File

@ -2242,6 +2242,17 @@ define Device/yuncore_a782
endef
TARGET_DEVICES += yuncore_a782
define Device/yuncore_xd3200
SOC := qca9563
DEVICE_VENDOR := YunCore
DEVICE_MODEL := XD3200
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
IMAGE_SIZE := 16000k
IMAGES += tftp.bin
IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m
endef
TARGET_DEVICES += yuncore_xd3200
define Device/yuncore_xd4200
SOC := qca9563
DEVICE_VENDOR := YunCore