openwrt/target/linux
Michael Pratt 56716b578e ath79: add support for Araknis AN-500-AP-I-AC
FCC ID: 2AG6R-AN500APIAC

Araknis AN-500-AP-I-AC is an indoor wireless access point with
1 Gb ethernet port, dual-band wireless,
internal antenna plates, and 802.3at PoE+

this board is a Senao device:
the hardware is equivalent to EnGenius EAP1200
the software is modified Senao SDK which is based on openwrt and uboot
including image checksum verification at boot time,
and a failsafe image that boots if checksum fails

**Specification:**

  - QCA9557 SOC		MIPS 74kc, 2.4 GHz WMAC, 2x2
  - QCA9882 WLAN	PCI card 168c:003c, 5 GHz, 2x2, 26dBm
  - AR8035-A PHY	RGMII GbE with PoE+ IN
  - 40 MHz clock
  - 16 MB FLASH		MX25L12845EMI-10G
  - 2x 64 MB RAM	NT5TU32M16
  - UART console	J10, populated, RX shorted to ground
  - 4 antennas		5 dBi, internal omni-directional plates
  - 4 LEDs		power, 2G, 5G, wps
  - 1 button		reset

  NOTE: all 4 gpio controlled LEDS are viewed through the same lightguide
	therefore, the power LED is off for default state

**MAC addresses:**

  MAC address labeled as ETH
  Only one Vendor MAC address in flash at art 0x0

  eth0 ETH  *:e1 art 0x0
  phy1 2.4G *:e2 ---
  phy0 5GHz *:e3 ---

**Serial Access:**

  the RX line on the board for UART is shorted to ground by resistor R176
  therefore it must be removed to use the console
  but it is not necessary to remove to view boot log

  optionally, R175 can be replaced with a solder bridge short

  the resistors R175 and R176 are next to the UART RX pin at J10

**Installation:**

  Method 1: Firmware upgrade page:

    (if you cannot access the APs webpage)
    factory reset with the reset button
    connect ethernet to a computer
    OEM webpage at 192.168.20.253
    username and password 'araknis'
    make a new password, login again...

    Navigate to 'File Management' page from left pane
    Click Browse and select the factory.bin image
    Upload and verify checksum
    Click Continue to confirm
    wait about 3 minutes

  Method 2: Serial to load Failsafe webpage:

    After connecting to serial console and rebooting...
    Interrupt uboot with any key pressed rapidly
    execute `run failsafe_boot` OR `bootm 0x9fd70000`
    wait a minute
    connect to ethernet and navigate to
    192.168.20.253
    Select the factory.bin image and upload
    wait about 3 minutes

**Return to OEM:**

  Method 1: Serial to load Failsafe webpage (above)

  Method 2: delete a checksum from uboot-env
  this will make uboot load the failsafe image at next boot
  because it will fail the checksum verification of the image

    ssh into openwrt and run
    `fw_setenv rootfs_checksum 0`
    reboot, wait a minute
    connect to ethernet and navigate to
    192.168.20.253
    select OEM firmware image and click upgrade

  Method 3: backup mtd partitions before upgrade

**TFTP recovery:**

  Requires serial console, reset button does nothing

  rename initramfs-kernel.bin to '0101A8C0.img'
  make available on TFTP server at 192.168.1.101
  power board, interrupt boot with serial console
  execute `tftpboot` and `bootm 0x81000000`

  NOTE: TFTP may not be reliable due to bugged bootloader
	set MTU to 600 and try many times

**Format of OEM firmware image:**

  The OEM software is built using SDKs from Senao
  which is based on a heavily modified version
  of Openwrt Kamikaze or Altitude Adjustment.
  One of the many modifications is sysupgrade being performed by a custom script.
  Images are verified through successful unpackaging, correct filenames
  and size requirements for both kernel and rootfs files, and that they
  start with the correct magic numbers (first 2 bytes) for the respective headers.

  Newer Senao software requires more checks but their script
  includes a way to skip them.

  The OEM upgrade script is at
  /etc/fwupgrade.sh

  OKLI kernel loader is required because the OEM software
  expects the kernel to be less than 1536k
  and the OEM upgrade procedure would otherwise
  overwrite part of the kernel when writing rootfs.

Note on PLL-data cells:

  The default PLL register values will not work
  because of the external AR8035 switch between
  the SOC and the ethernet port.

  For QCA955x series, the PLL registers for eth0 and eth1
  can be see in the DTSI as 0x28 and 0x48 respectively.
  Therefore the PLL registers can be read from uboot
  for each link speed after attempting tftpboot
  or another network action using that link speed
  with `md 0x18050028 1` and `md 0x18050048 1`.

  The clock delay required for RGMII can be applied at the PHY side,
  using the at803x driver `phy-mode` setting through the DTS.
  Therefore, the Ethernet Configuration registers for GMAC0
  do not need the bits for RGMII delay on the MAC side.
  This is possible due to fixes in at803x driver
  since Linux 5.1 and 5.3

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2022-03-13 19:54:57 +01:00
..
apm821xx apm821xx: WNDR4700: use upstream tc654 cooling devices 2022-02-19 19:34:18 +01:00
archs38 kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigs 2022-03-01 22:57:40 +00:00
armvirt kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
at91 kernel: bump 5.10 to 5.10.103 2022-03-05 21:05:45 +01:00
ath25 ath25: drop Linux 5.4 support 2022-02-17 11:08:58 +01:00
ath79 ath79: add support for Araknis AN-500-AP-I-AC 2022-03-13 19:54:57 +01:00
bcm27xx kernel: bump 5.10 to 5.10.104 2022-03-13 19:24:13 +01:00
bcm47xx bcm47xx: switch to kernel 5.10 2021-11-08 15:56:39 +01:00
bcm53xx kernel: bump 5.10 to 5.10.104 2022-03-13 19:24:13 +01:00
bcm63xx bcm63xx: switch to Kernel 5.10 2022-02-27 14:41:28 +01:00
bcm4908 bcm4908: include U-Boot in images 2022-03-11 08:02:30 +01:00
bmips kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
gemini kernel: bump 5.10 to 5.10.94 2022-02-01 23:34:07 +00:00
generic kernel: wwan: add MeigLink SLM750 modem support 2022-03-10 17:59:07 +00:00
imx imx: fix USB support 2022-03-11 00:04:05 +01:00
ipq40xx kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
ipq806x ipq806x: provide ramoops for R7800/XR500 by default 2022-03-08 18:33:42 +01:00
kirkwood target/linux: replace egrep with grep -E 2022-02-07 00:03:27 +01:00
lantiq lantiq: xrx200: fix use after free bug 2022-03-08 18:33:42 +01:00
layerscape kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigs 2022-03-01 22:57:40 +00:00
malta kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
mediatek kernel: move parser_trx patches of custom magic to generic 2022-03-06 20:40:07 +01:00
mpc85xx mpc85xx: HiveAP-330: add tmp125 temperature sensor 2022-02-25 17:54:56 +01:00
mvebu kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
mxs kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
octeon octeon: switch to Kernel 5.10 2022-02-11 14:24:01 +01:00
octeontx octeontx: switch to 5.10 Kernel 2022-02-05 14:39:20 +01:00
omap omap: make use of 'rootfs-part' feature 2022-01-23 19:48:20 +00:00
oxnas kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigs 2022-03-01 22:57:40 +00:00
pistachio kernel: bump 5.10 to 5.10.95 2022-02-01 23:34:07 +00:00
qoriq qoriq: Expand generic subtarget description 2022-01-05 10:54:59 +02:00
ramips ramips: Apply pinctrl DTS changes to TL-WPA8631P 2022-03-13 12:39:58 +09:00
realtek realtek: add support for Panasonic Switch-M8eG PN28080K 2022-03-13 19:54:57 +01:00
rockchip kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigs 2022-03-01 22:57:40 +00:00
sunxi kernel: bump 5.10 to 5.10.101 2022-03-01 21:38:36 +01:00
tegra kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
uml uml: make use of 'rootfs-part' feature 2022-01-23 19:48:31 +00:00
x86 x86: legacy: enable pata_sis driver 2022-03-10 23:31:05 +01:00
zynq kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00