openwrt/package/boot
Kevin Abraham 1dd036a659 ath79: add support for Senao Engenius ENS1750
FCC ID: A8J-EWS660AP

Engenius ENS1750 is an outdoor wireless access point with
2 gigabit ethernet ports, dual-band wireless,
internal antenna plates, and 802.3at PoE+

Engenius EWS660AP, ENS1750, and ENS1200 are "electrically identical,
different model names are for marketing purpose" according to docs
provided by Engenius to the FCC.

**Specification:**

  - QCA9558 SOC		2.4 GHz, 3x3
  - QCA9880 WLAN	mini PCIe card, 5 GHz, 3x3, 26dBm
  - AR8035-A PHY	RGMII GbE with PoE+ IN
  - AR8033 PHY		SGMII GbE with PoE+ OUT
  - 40 MHz clock
  - 16 MB FLASH		MX25L12845EMI-10G
  - 2x 64 MB RAM
  - UART at J1		populated, RX grounded
  - 6 internal antenna plates (5 dbi, omni-directional)
  - 5 LEDs, 1 button (power, eth0, eth1, 2G, 5G) (reset)

**MAC addresses:**

  Base MAC addressed labeled as "MAC"
  Only one Vendor MAC address in flash

  eth0 *:d4 MAC art 0x0
  eth1 *:d5 --- art 0x0 +1
  phy1 *:d6 --- art 0x0 +2
  phy0 *:d7 --- art 0x0 +3

**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

**Installation:**

  2 ways to flash factory.bin from OEM:

  Method 1: Firmware upgrade page:

    OEM webpage at 192.168.1.1
    username and password "admin"
    Navigate to "Firmware Upgrade" page from left pane
    Click Browse and select the factory.bin image
    Upload and verify checksum
    Click Continue to confirm and wait 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.1.1/index.htm"
    Select the factory.bin image and upload
    wait about 3 minutes

**Return to OEM:**

  If you have a serial cable, see Serial Failsafe instructions
  otherwise, uboot-env can be used to make uboot load the failsafe image

  ssh into openwrt and run
  `fw_setenv rootfs_checksum 0`
  reboot, wait 3 minutes
  connect to ethernet and navigate to 192.168.1.1/index.htm
  select OEM firmware image from Engenius and click upgrade

**TFTP recovery:**

  Requires serial console, reset button does nothing

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

**Format of OEM firmware image:**

  The OEM software of ENS1750 is a heavily modified version
  of Openwrt Kamikaze. One of the many modifications
  is to the sysupgrade program. Image verification is performed
  simply by the successful ungzip and untar of the supplied file
  and name check and header verification of the resulting contents.
  To form a factory.bin that is accepted by OEM Openwrt build,
  the kernel and rootfs must have specific names...

    openwrt-ar71xx-generic-ens1750-uImage-lzma.bin
    openwrt-ar71xx-generic-ens1750-root.squashfs

  and begin with the respective headers (uImage, squashfs).
  Then the files must be tarballed and gzipped.
  The resulting binary is actually a tar.gz file in disguise.
  This can be verified by using binwalk on the OEM firmware images,
  ungzipping then untaring.

  Newer EnGenius software requires more checks but their script
  includes a way to skip them, otherwise the tar must include
  a text file with the version and md5sums in a deprecated format.

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

  OKLI kernel loader is required because the OEM software
  expects the kernel to be no greater than 1536k
  and the factory.bin 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`.
  Therefore the PLL registers for GMAC0
  do not need the bits for delay on the MAC side.
  This is possible due to fixes in at803x driver
  since Linux 5.1 and 5.3

Tested-by: Kevin Abraham <kevin@westhousefarm.com>
Signed-off-by: Kevin Abraham <kevin@westhousefarm.com>
2024-05-11 16:57:28 +02:00
..
apex treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
arm-trusted-firmware-bcm63xx treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
arm-trusted-firmware-mediatek arm-trusted-firmware-mediatek: add ram-download bl2 images 2024-05-07 22:02:55 +02:00
arm-trusted-firmware-mvebu arm-trusted-firmware-mvebu: refresh cryptopp hash 2024-04-29 13:02:23 +02:00
arm-trusted-firmware-rockchip arm-trusted-firmware-rockchip: Update to 2.10 2024-01-20 21:11:22 +01:00
arm-trusted-firmware-sunxi arm-trusted-firmware-sunxi: Update to 2.10 2023-12-20 10:53:48 +08:00
arm-trusted-firmware-tools arm-trusted-firmware-tools: fix build on macOS/Darwin 2023-08-12 16:45:47 +02:00
at91bootstrap at91bootstrap: update PKG_MIRROR_HASH to zstd for v3 at91bootstrap 2024-04-07 17:10:30 +02:00
fconfig treewide: unify OpenWrt hosted source via @OPENWRT 2021-02-05 12:00:24 -10:00
grub2 grub2: add EFI support for loongarch64 2024-05-04 14:14:24 +08:00
imx-bootlets imx-bootlets: refresh patches 2021-02-24 16:15:02 +01:00
kexec-tools kexec-tools: update to 2.0.28 2024-02-06 12:10:05 +01:00
kobs-ng kobs-ng: update dependencies after 'imx6' -> 'imx' rename 2021-11-03 12:45:40 +01:00
mt7623n-preloader mt7623n-preloader: remove mt7622-preloader 2021-02-28 04:12:23 +00:00
opensbi opensbi: bump to 1.4 2024-05-03 11:09:22 +02:00
rkbin rkbin: bump to latest git HEAD 2024-04-14 18:29:44 +02:00
tfa-layerscape treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
uboot-armsr uboot-armsr: add support for QEMU armv7/armv8 2023-06-10 21:50:22 +02:00
uboot-at91 treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
uboot-bcm53xx uboot-bcm53xx: bump to 2024.01 2024-01-20 19:38:20 +01:00
uboot-bcm4908 treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
uboot-bmips uboot-bmips: Add U-Boot for the BMIPS target 2024-05-01 21:30:32 +02:00
uboot-d1 uboot-d1: define default BUILD_SUBTARGET 2024-04-13 13:41:41 +02:00
uboot-envtools ath79: add support for Senao Engenius ENS1750 2024-05-11 16:57:28 +02:00
uboot-fritz4040 treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
uboot-imx treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00
uboot-kirkwood kirkwood: add support for Netgear Stora (MS2000/2110) NAS 2024-03-17 00:19:22 +01:00
uboot-lantiq treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00
uboot-layerscape treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
uboot-mediatek uboot-mediatek: bpi-r2: fix root= default cmdline parameter 2024-05-08 01:54:32 +01:00
uboot-mvebu uboot-mvebu: backport patch for Turris Omnia to enable LTO 2024-04-28 11:39:42 +02:00
uboot-mxs mxs: rework image generation 2023-06-30 19:24:52 +02:00
uboot-omap treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00
uboot-rockchip uboot-rockchip: add Bananapi-R2 Pro support 2024-05-05 00:46:48 +02:00
uboot-sifiveu uboot-sifiveu: use intree dtc explicitly 2023-11-26 19:44:56 +01:00
uboot-sunxi sunxi: add support for Lichee Pi Zero Dock (V3s) board 2024-05-04 00:41:02 +02:00
uboot-tegra treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00
uboot-zynq uboot-zynq: build with zynq generic subtarget 2022-12-25 11:55:53 +01:00