openwrt/target/linux
Marco von Rosenberg f314debd4f ath79: add support for Huawei AP5030DN
Huawei AP5030DN is a dual-band, dual-radio 802.11ac Wave 1 3x3 MIMO
enterprise access point with two Gigabit Ethernet ports and PoE
support.

Hardware highlights:
- CPU: QCA9550 SoC at 720MHz
- RAM: 256MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: QCA9550-internal radio
- Wi-Fi 5GHz: QCA9880 PCIe WLAN SoC
- Ethernet 1: 10/100/1000 Mbps Ethernet through Broadcom B50612E PHY
- Ethernet 2: 10/100/1000 Mbps Ethernet through Marvell 88E1510 PHY
- PoE: input through Ethernet 1 port
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: SGM706 (1.6s timeout)

Serial console:
  9600n8 (9600 baud, no stop bits, no parity, 8 data bits)

MAC addresses:
  Each device has 32 consecutive MAC addresses allocated by
  the vendor, which don't overlap between devices.
  This was confirmed with multiple devices with consecutive
  serial numbers.
  The MAC address range starts with the address on the label.
  To be able to distinguish between the interfaces,
  the following MAC address scheme is used:
    - eth0 = label MAC
    - eth1 = label MAC + 1
    - radio0 (Wi-Fi 5GHz) = label MAC + 2
    - radio1 (Wi-Fi 2.4GHz) = label MAC + 3

Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP

1. Power up the AP

2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
   do what they say.
   Log in with default admin password "admin@huawei.com".

3. Boot the OpenWrt initramfs from TFTP using the hidden script
   "run ramboot". Replace IP address as needed:

   > setenv serverip 192.168.1.10
   > setenv ipaddr 192.168.1.1
   > setenv rambootfile
     openwrt-ath79-generic-huawei_ap5030dn-initramfs-kernel.bin
   > saveenv
   > run ramboot

4. Optional but recommended as the factory firmware cannot
   be downloaded publicly:
   Back up contents of "firmware" partition using the web interface or ssh:

   $ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap5030dn_fw_backup.bin

5. Run sysupgrade using sysupgrade image. OpenWrt
   shall boot from flash afterwards.

Return to factory firmware (using firmware upgrade package downloaded from
non-public Huawei website):
1. Start a TFTP server in the directory where
   the firmware upgrade package is located

2. Boot to u-boot as described above

3. Install firmware upgrade package and format the config partitions:

   > update system FatAP5X30XN_SOMEVERSION.bin
   > format_fs

Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
   for example using scp

2. Use sysupgrade with force to restore the backup:
   sysupgrade -F huawei_ap5030dn_fw_backup.bin

3. Boot AP to U-Boot as described above

Quirks and known issues
-----------------------

- On initial power-up, the Huawei-modified bootloader suspends both
ethernet PHYs (it sets the "Power Down" bit in the MII control
register). Unfortunately, at the time of the initial port, the kernel
driver for the B50612E/BCM54612E PHY behind eth0 doesn't have a resume
callback defined which would clear this bit. This makes the PHY unusable
since it remains suspended forever. This is why the backported kernel
patches in this commit are required which add this callback and for
completeness also a suspend callback.

- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.

- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the CPU_CLK/4 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
[fixed 6.6 backport patch naming]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 06cdc07f8c)
2024-04-03 02:56:56 +02:00
..
airoha kernel: bump 5.15 to 5.15.125 2023-08-10 21:07:50 +02:00
apm821xx apm821xx: WNDR4700: fix broken sysupgrade, factory images 2023-10-21 16:42:26 +02:00
archs38 treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
armsr armsr: preserve configuration during sysupgrade 2023-10-20 00:41:41 +02:00
at91 kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
ath25 kernel: bump 5.15 to 5.15.131 2023-09-25 23:04:37 +02:00
ath79 ath79: add support for Huawei AP5030DN 2024-04-03 02:56:56 +02:00
bcm27xx kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
bcm47xx kernel: bump 5.15 to 5.15.146 2024-01-08 23:15:35 +01:00
bcm53xx kernel: bump 5.15 to 5.15.152 2024-03-29 14:06:15 +01:00
bcm63xx kernel: bump 5.15 to 5.15.148 2024-02-10 20:19:28 +01:00
bcm4908 kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
bmips kernel: bump 5.15 to 5.15.148 2024-02-10 20:19:28 +01:00
gemini kernel: bump 5.15 to 5.15.146 2024-01-08 23:15:35 +01:00
generic ath79: add support for Huawei AP5030DN 2024-04-03 02:56:56 +02:00
imx kernel: backport NVMEM patches queued for the v6.5 2023-07-10 12:54:53 +02:00
ipq40xx generic: 5.15: backport upstream Aquantia PHY firmware loader patches 2024-02-13 05:41:32 +01:00
ipq806x kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
ipq807x kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
kirkwood kirkwood: fix Ctera C200 V1 ubi part name 2023-12-14 21:40:20 +01:00
lantiq lantiq: Fix build after kernel 5.15.150 2024-03-08 14:50:43 +01:00
layerscape kernel: 5.15: backport v6.1 PHY changes required for Aquantia 2024-01-31 11:57:41 +01:00
malta treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
mediatek kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
mpc85xx mpc85xx: allow mapping of cpu1 spin-table page 2023-12-04 14:21:21 +01:00
mvebu kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
mxs mxs: rework image generation 2023-07-06 17:04:13 +02:00
octeon kernel: bump 5.15 to 5.15.145 2024-01-07 12:57:30 +00:00
octeontx kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
omap treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
oxnas kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
pistachio kernel: fix mtd/NVMEM regression affecting U-Boot env NVMEM driver 2023-11-02 09:45:08 +01:00
qoriq kernel: fix handling of CONFIG_DYNAMIC_DEBUG 2023-05-03 10:26:17 -07:00
ramips ramips: add support for Z-ROUTER ZR-2660 2024-03-15 23:24:13 +01:00
realtek realtek: fix Netgear GS110TPP OEM install 2024-02-18 09:59:30 +01:00
rockchip rockchip: remove redundant 'console' parameter from boot script 2024-03-31 20:39:57 +02:00
sifiveu kernel: bump 5.15 to 5.15.153 2024-04-01 02:33:05 +02:00
sunxi sunxi: fixes led for nanopi boards 2023-10-31 00:44:03 +01:00
tegra treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
uml kernel: bump 5.15 to 5.15.132 2023-09-25 23:04:37 +02:00
x86 kernel: bump 5.15 to 5.15.139 2023-11-25 20:17:09 +01:00
zynq generic: enable CONFIG_ARM_CRYPTO for 32bit arm targets 2023-05-10 19:01:45 +02:00
Makefile linux: add dtb makefile target to targets list 2024-02-10 13:29:43 +01:00