openwrt/target/linux/generic/backport-6.6
Marco von Rosenberg 06cdc07f8c 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>
2024-03-31 18:09:43 +02:00
..
400-v6.9-mtd-rawnand-brcmnand-Support-write-protection-settin.patch kernel: backport brcmnand support for "brcm,wp-not-connected" 2024-03-28 08:52:23 +01:00
702-01-v6.7-net-phy-aquantia-move-to-separate-directory.patch generic: 6.6: manually refresh backport patches 2024-03-11 20:17:26 +01:00
702-02-v6.7-net-phy-aquantia-move-MMD_VEND-define-to-header.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
702-03-v6.7-net-phy-aquantia-add-firmware-load-support.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
707-v6.8-02-net-phy-at803x-move-disable-WOL-to-specific-at8031-p.patch
707-v6.8-03-net-phy-at803x-raname-hw_stats-functions-to-qca83xx-.patch
707-v6.8-04-net-phy-at803x-move-qca83xx-specific-check-in-dedica.patch
707-v6.8-05-net-phy-at803x-move-specific-DT-option-for-at8031-to.patch
707-v6.8-06-net-phy-at803x-move-specific-at8031-probe-mode-check.patch
707-v6.8-07-net-phy-at803x-move-specific-at8031-config_init-to-d.patch
707-v6.8-08-net-phy-at803x-move-specific-at8031-WOL-bits-to-dedi.patch
707-v6.8-09-net-phy-at803x-move-specific-at8031-config_intr-to-d.patch
707-v6.8-10-net-phy-at803x-make-at8031-related-DT-functions-name.patch
707-v6.8-11-net-phy-at803x-move-at8031-functions-in-dedicated-se.patch
707-v6.8-12-net-phy-at803x-move-at8035-specific-DT-parse-to-dedi.patch
707-v6.8-13-net-phy-at803x-drop-specific-PHY-ID-check-from-cable.patch
708-v6.8-01-net-phy-at803x-move-specific-qca808x-config_aneg-to-.patch
708-v6.8-02-net-phy-at803x-make-read-specific-status-function-mo.patch
709-v6.8-01-net-phy-at803x-remove-extra-space-after-cast.patch
709-v6.8-02-net-phy-at803x-replace-msleep-1-with-usleep_range.patch
710-v6.8-net-phy-at803x-better-align-function-varibles-to-ope.patch
711-v6.8-01-net-phy-at803x-generalize-cdt-fault-length-function.patch
711-v6.8-02-net-phy-at803x-refactor-qca808x-cable-test-get-statu.patch
711-v6.8-03-net-phy-at803x-add-support-for-cdt-cross-short-test-.patch
711-v6.8-04-net-phy-at803x-make-read_status-more-generic.patch
712-v6.9-net-phy-at803x-add-LED-support-for-qca808x.patch
713-v6.9-01-net-phy-move-at803x-PHY-driver-to-dedicated-director.patch generic: 6.6: manually refresh backport patches 2024-03-11 20:17:26 +01:00
713-v6.9-02-net-phy-qcom-create-and-move-functions-to-shared-lib.patch
713-v6.9-03-net-phy-qcom-deatch-qca83xx-PHY-driver-from-at803x.patch
713-v6.9-04-net-phy-qcom-move-additional-functions-to-shared-lib.patch
713-v6.9-05-net-phy-qcom-detach-qca808x-PHY-driver-from-at803x.patch generic: 6.6: manually refresh backport patches 2024-03-11 20:17:26 +01:00
714-v6.8-01-net-phy-make-addr-type-u8-in-phy_package_shared-stru.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
714-v6.8-03-net-phy-restructure-__phy_write-read_mmd-to-helper-a.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
714-v6.8-04-net-phy-add-support-for-PHY-package-MMD-read-write.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
715-v6.9-01-net-phy-qcom-qca808x-fix-logic-error-in-LED-brightne.patch
715-v6.9-02-net-phy-qcom-qca808x-default-to-LED-active-High-if-n.patch
716-v6.9-02-net-phy-add-support-for-scanning-PHY-in-PHY-packages.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
716-v6.9-04-net-phy-qcom-move-more-function-to-shared-library.patch
716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
716-v6.9-07-net-phy-qcom-add-support-for-QCA807x-PHY-Family.patch
716-v6.9-08-net-phy-qcom-move-common-qca808x-LED-define-to-share.patch
716-v6.9-09-net-phy-qcom-generalize-some-qca808x-LED-functions.patch
716-v6.9-10-net-phy-qca807x-add-support-for-configurable-LED.patch
717-v6.9-net-phy-qca807x-move-interface-mode-check-to-.config.patch
720-v6.9-net-mdio-ipq4019-add-support-for-clock-frequency-pro.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
721-v6.7-net-phy-aquantia-drop-wrong-endianness-conversion-fo.patch
734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch ath79: add support for Huawei AP5030DN 2024-03-31 18:09:43 +02:00
751-03-v6.4-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
751-04-v6.4-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch
752-04-v6.6-net-ethernet-mtk_wed-check-update_wo_rx_stats-in-mtk.patch
752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-08-v6.7-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-09-v6.7-net-ethernet-mtk_wed-introduce-mtk_wed_buf-structure.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-10-v6.7-net-ethernet-mtk_wed-move-mem_region-array-out-of-mt.patch
752-11-v6.7-net-ethernet-mtk_wed-make-memory-region-optional.patch
752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-18-v6.7-net-ethernet-mtk_wed-debugfs-move-wed_v2-specific-re.patch
752-19-v6.7-net-ethernet-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
760-v6.9-net-phy-aquantia-add-AQR111-and-AQR111B0-PHY-ID.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
761-v6.9-net-phy-aquantia-add-AQR113-PHY-ID.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
762-v6.9-net-phy-aquantia-add-AQR813-PHY-ID.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
770-net-introduce-napi_is_scheduled-helper.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch kernel: bump 6.6 to 6.6.21 2024-03-17 21:16:52 +01:00
771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
795-v6.7-16-r8152-use-napi_gro_frags.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
800-v6.9-0001-dt-bindings-leds-Add-FUNCTION-defines-for-per-band-W.patch kernel: backport some useful LED_FUNCTION_* defines for DT 2024-03-17 22:55:32 +01:00
800-v6.9-0002-dt-bindings-leds-Add-LED_FUNCTION_WAN_ONLINE-for-Int.patch kernel: backport some useful LED_FUNCTION_* defines for DT 2024-03-17 22:55:32 +01:00
815-v6.7-2-leds-turris-omnia-Make-set_brightness-more-efficient.patch
815-v6.7-3-leds-turris-omnia-Support-HW-controlled-mode-via-pri.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
815-v6.7-4-leds-turris-omnia-Add-support-for-enabling-disabling.patch generic: 6.6: manually refresh backport patches 2024-03-11 20:17:26 +01:00
815-v6.7-5-leds-turris-omnia-Fix-brightness-setting-and-trigger.patch
816-v6.7-0001-nvmem-qfprom-Mark-core-clk-as-optional.patch
816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
816-v6.7-0003-nvmem-Use-device_get_match_data.patch
816-v6.7-0004-Revert-nvmem-add-new-config-option.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
818-v6.8-of-device-Export-of_device_make_bus_id.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0001-nvmem-Move-of_nvmem_layout_get_container-in-another-.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0002-nvmem-Create-a-header-for-internal-sharing.patch generic: 6.6: manually refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0005-nvmem-core-Rework-layouts-to-become-regular-devices.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0006-nvmem-core-Expose-cells-through-sysfs.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0007-nvmem-stm32-add-support-for-STM32MP25-BSEC-to-contro.patch
819-v6.8-0008-nvmem-layouts-refactor-.add_cells-callback-arguments.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0009-nvmem-drop-nvmem_layout_get_match_data.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
819-v6.8-0011-nvmem-u-boot-env-use-nvmem_add_one_cell-nvmem-subsys.patch
819-v6.8-0012-nvmem-u-boot-env-use-nvmem-device-helpers.patch
819-v6.8-0013-nvmem-u-boot-env-improve-coding-style.patch
831-v6.7-rtc-rtc7301-Support-byte-addressed-IO.patch
832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
833-v6.8-leds-core-Add-more-colors-from-DT-bindings-to-led_co.patch.patch
834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00
838-v6.9-leds-trigger-netdev-Fix-kernel-panic-on-interface-re.patch
850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch generic: 6.6: backport support for SDX75-based MHI 5G modems 2024-03-15 18:30:31 +00:00
851-v6.8-bus-mhi-host-pci_generic-Add-SDX75-based-modem-suppo.patch generic: 6.6: backport support for SDX75-based MHI 5G modems 2024-03-15 18:30:31 +00:00
852-stable-bus-mhi-host-pci_generic-constify-modem_telit_fn980_.patch generic: 6.6: backport support for SDX75-based MHI 5G modems 2024-03-15 18:30:31 +00:00
894-v6.8-net-ethtool-implement-ethtool_puts.patch generic: 6.6: refresh backport patches 2024-03-11 20:17:26 +01:00