tn3399_openwrt/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts

99 lines
1.6 KiB
Plaintext
Raw Normal View History

ath79: add support for Senao Engenius EAP350 v1 FCC ID: U2M-EAP350 Engenius EAP350 is a wireless access point with 1 gigabit PoE ethernet port, 2.4 GHz wireless, external ethernet switch, and 2 internal antennas. Specification: - AR7242 SOC - AR9283 WLAN (2.4 GHz, 2x2, PCIe on-board) - AR8035-A switch (GbE with 802.3af PoE) - 40 MHz reference clock - 8 MB FLASH MX25L6406E - 32 MB RAM EM6AA160TSA-5G - UART at J2 (populated) - 3 LEDs, 1 button (power, eth, 2.4 GHz) (reset) - 2 internal antennas MAC addresses: MAC address is labeled as "MAC" Only 1 address on label and in flash The OEM software reports these MACs for the ifconfig eth0 MAC *:0c art 0x0 phy0 --- *:0d --- Installation: 2 ways to flash factory.bin from OEM: - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop or halt which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.10.1 username and password "admin" Navigate to "Upgrade Firmware" 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 0x9f670000` 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 *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will not work DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt 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 Format of OEM firmware image: The OEM software of EAP350 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-senao-eap350-uImage-lzma.bin openwrt-senao-eap350-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. The OEM upgrade script is at /etc/fwupgrade.sh Later models in the EAP series likely have a different platform and the upgrade and image verification process differs. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1024k and the factory.bin upgrade procedure would 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-A switch between the SOC and the ethernet PHY chips. For AR724x series, the PLL register for GMAC0 can be seen in the DTSI as 0x2c. Therefore the PLL register can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x1805002c 1`. uboot did not have a good value for 1 GBps so it was taken from other similar DTS file. Tested from master, all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
2020-09-19 07:09:11 +00:00
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar7242.dtsi"
ath79: adjust ath79/tiny Senao APs to 4k blocksize ath79/tiny kernel config has CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y from commit 05d35403b211ccb9bf20e2b3c0b7a30c82c6d6a2 Because of this, these changes are required for 2 reasons: 1. Senao devices in ath79/tiny with a 'failsafe' partition and the tar.gz sysupgrade platform and a flash chip that supports 4k sectors will fail to reboot to openwrt after a sysupgrade. the stored checksum is made with the 64k blocksize length of the image to be flashed, and the actual checksum changes after flashing due to JFFS2 space being formatted within the length of the rootfs from the image example: 0x440000 length of kernel + rootfs (from sysupgrade.bin) 0x439000 offset of rootfs_data (from kernel log) 2. for boards with flash chips that support 4k sectors: saving configuration over sysupgrade is not possible because sysupgrade.tgz is appended at a 64k boundary and the mtd parser starts JFFS2 at a 4k boundary. for boards with flash chips that do not support 4k sectors: partitioning with 4k boundaries causes a boot loop from the mtd parser not finding kernel and rootfs. Also: Some of the Senao boards that belong in ath79/tiny, for example ENH202, have a flash chip that does not support 4k sectors (no SECT_4K symbol in upstream source). Because of this, partitioning must be different for these devices depending on the flash chip model detected by the kernel. Therefore: this creates 2 DTSI files to replace the single one with 64k partitioning for 4k and 64k partitioning respectively. Signed-off-by: Michael Pratt <mcpratt@pm.me>
2021-02-21 22:41:30 +00:00
#include "ar724x_senao_loader-4k.dtsi"
ath79: add support for Senao Engenius EAP350 v1 FCC ID: U2M-EAP350 Engenius EAP350 is a wireless access point with 1 gigabit PoE ethernet port, 2.4 GHz wireless, external ethernet switch, and 2 internal antennas. Specification: - AR7242 SOC - AR9283 WLAN (2.4 GHz, 2x2, PCIe on-board) - AR8035-A switch (GbE with 802.3af PoE) - 40 MHz reference clock - 8 MB FLASH MX25L6406E - 32 MB RAM EM6AA160TSA-5G - UART at J2 (populated) - 3 LEDs, 1 button (power, eth, 2.4 GHz) (reset) - 2 internal antennas MAC addresses: MAC address is labeled as "MAC" Only 1 address on label and in flash The OEM software reports these MACs for the ifconfig eth0 MAC *:0c art 0x0 phy0 --- *:0d --- Installation: 2 ways to flash factory.bin from OEM: - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop or halt which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.10.1 username and password "admin" Navigate to "Upgrade Firmware" 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 0x9f670000` 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 *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will not work DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt 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 Format of OEM firmware image: The OEM software of EAP350 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-senao-eap350-uImage-lzma.bin openwrt-senao-eap350-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. The OEM upgrade script is at /etc/fwupgrade.sh Later models in the EAP series likely have a different platform and the upgrade and image verification process differs. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1024k and the factory.bin upgrade procedure would 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-A switch between the SOC and the ethernet PHY chips. For AR724x series, the PLL register for GMAC0 can be seen in the DTSI as 0x2c. Therefore the PLL register can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x1805002c 1`. uboot did not have a good value for 1 GBps so it was taken from other similar DTS file. Tested from master, all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
2020-09-19 07:09:11 +00:00
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "engenius,eap350-v1", "qca,ar7242";
model = "EnGenius EAP350 v1";
aliases {
label-mac-device = &eth0;
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "blue:power";
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
};
ath9k-leds {
compatible = "gpio-leds";
wlan {
label = "blue:wlan";
gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
};
&mdio0 {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
eee-broken-100tx;
eee-broken-1000t;
};
};
&eth0 {
status = "okay";
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
ath79: add support for Senao Engenius EAP350 v1 FCC ID: U2M-EAP350 Engenius EAP350 is a wireless access point with 1 gigabit PoE ethernet port, 2.4 GHz wireless, external ethernet switch, and 2 internal antennas. Specification: - AR7242 SOC - AR9283 WLAN (2.4 GHz, 2x2, PCIe on-board) - AR8035-A switch (GbE with 802.3af PoE) - 40 MHz reference clock - 8 MB FLASH MX25L6406E - 32 MB RAM EM6AA160TSA-5G - UART at J2 (populated) - 3 LEDs, 1 button (power, eth, 2.4 GHz) (reset) - 2 internal antennas MAC addresses: MAC address is labeled as "MAC" Only 1 address on label and in flash The OEM software reports these MACs for the ifconfig eth0 MAC *:0c art 0x0 phy0 --- *:0d --- Installation: 2 ways to flash factory.bin from OEM: - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop or halt which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.10.1 username and password "admin" Navigate to "Upgrade Firmware" 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 0x9f670000` 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 *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will not work DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt 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 Format of OEM firmware image: The OEM software of EAP350 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-senao-eap350-uImage-lzma.bin openwrt-senao-eap350-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. The OEM upgrade script is at /etc/fwupgrade.sh Later models in the EAP series likely have a different platform and the upgrade and image verification process differs. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1024k and the factory.bin upgrade procedure would 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-A switch between the SOC and the ethernet PHY chips. For AR724x series, the PLL register for GMAC0 can be seen in the DTSI as 0x2c. Therefore the PLL register can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x1805002c 1`. uboot did not have a good value for 1 GBps so it was taken from other similar DTS file. Tested from master, all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
2020-09-19 07:09:11 +00:00
phy-handle = <&phy4>;
phy-mode = "rgmii-id";
pll-data = <0x02000000 0x00000101 0x00001313>;
};
&pcie {
status = "okay";
ath9k: wifi@0,0,0 {
compatible = "pci168c,002a";
reg = <0x0 0 0 0 0>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
ath79: add support for Senao Engenius EAP350 v1 FCC ID: U2M-EAP350 Engenius EAP350 is a wireless access point with 1 gigabit PoE ethernet port, 2.4 GHz wireless, external ethernet switch, and 2 internal antennas. Specification: - AR7242 SOC - AR9283 WLAN (2.4 GHz, 2x2, PCIe on-board) - AR8035-A switch (GbE with 802.3af PoE) - 40 MHz reference clock - 8 MB FLASH MX25L6406E - 32 MB RAM EM6AA160TSA-5G - UART at J2 (populated) - 3 LEDs, 1 button (power, eth, 2.4 GHz) (reset) - 2 internal antennas MAC addresses: MAC address is labeled as "MAC" Only 1 address on label and in flash The OEM software reports these MACs for the ifconfig eth0 MAC *:0c art 0x0 phy0 --- *:0d --- Installation: 2 ways to flash factory.bin from OEM: - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop or halt which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.10.1 username and password "admin" Navigate to "Upgrade Firmware" 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 0x9f670000` 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 *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will not work DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt 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 Format of OEM firmware image: The OEM software of EAP350 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-senao-eap350-uImage-lzma.bin openwrt-senao-eap350-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. The OEM upgrade script is at /etc/fwupgrade.sh Later models in the EAP series likely have a different platform and the upgrade and image verification process differs. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1024k and the factory.bin upgrade procedure would 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-A switch between the SOC and the ethernet PHY chips. For AR724x series, the PLL register for GMAC0 can be seen in the DTSI as 0x2c. Therefore the PLL register can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x1805002c 1`. uboot did not have a good value for 1 GBps so it was taken from other similar DTS file. Tested from master, all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
2020-09-19 07:09:11 +00:00
qca,no-eeprom;
#gpio-cells = <2>;
gpio-controller;
};
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
};