ipq40xx: add support for EnGenius EAP2200

SOC:    IPQ4019 / QCA Dakota
CPU:    Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM:   256 MiB
FLASH:  NOR 4 MiB + NAND 128 MiB
ETH:    Qualcomm Atheros QCA8072
WLAN1:  Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2:2x2
WLAN2:  Qualcomm Atheros QCA4019 5GHz 802.11a/n/ac 2:2x2
WLAN2:  Qualcomm Atheros QCA9888 5GHz 802.11a/n/ac 2:2x2
INPUT:  WPS Button
LEDS:   Power, LAN1, LAN2, WLAN 2.4GHz, WLAN 5GHz-1, WLAN 5GHz-2, OPMODE

1. Load Ramdisk via U-Boot

To set up the flash memory environment, do the following:
a. As a preliminary step, ensure that the board console port is connected to the PC using these RS232 parameters:
   * 115200bps
   * 8N1
b. Confirm that the PC is connected to the board using one of the Ethernet ports.
c. Set a static ip 192.168.99.8 for Ethernet that connects to board.
d. The PC must have a TFTP server launched and listening on the interface to which the board is connected.
e. At this stage power up the board and, after a few seconds, press 4 and then any key during the countdown.

U-BOOT> set serverip 192.168.99.9 && tftpboot 0x84000000 192.168.99.8:openwrt.itb && bootm

Signed-off-by: Steven Lin <steven.lin@senao.com>
[copied 4.19 dts to 5.4]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
master
Steven Lin 2019-09-02 10:39:45 +08:00 committed by Christian Lamparter
parent 977c7f12de
commit a736d912e2
13 changed files with 601 additions and 7 deletions

View File

@ -28,6 +28,7 @@ ALLWIFIBOARDS:= \
aruba_ap-303 \
avm_fritzrepeater-1200 \
dlink_dap2610 \
engenius_eap2200 \
engenius_emd1 \
ezviz_cs-w3-wd1200g-eup \
linksys_ea8300 \
@ -95,6 +96,7 @@ endef
$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
$(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200))
$(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
$(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))

View File

@ -33,6 +33,10 @@ engenius,eap1300)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:yellow:wlan5g" "phy1tpt"
ucidef_set_led_default "mesh" "MESH" "${boardname}:blue:mesh" "0"
;;
engenius,eap2200)
ucidef_set_led_netdev "lan1" "LAN1" "${boardname}:blue:lan1" "eth0"
ucidef_set_led_netdev "lan2" "LAN2" "${boardname}:blue:lan2" "eth1"
;;
engenius,ens620ext)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt"

View File

@ -58,7 +58,8 @@ ipq40xx_setup_interfaces()
;;
avm,fritzrepeater-3000|\
compex,wpj419|\
compex,wpj428)
compex,wpj428|\
engenius,eap2200)
ucidef_set_interface_lan "eth0 eth1"
;;
ezviz,cs-w3-wd1200g-eup)
@ -109,6 +110,7 @@ ipq40xx_setup_macs()
lan_mac=$(mtd_get_mac_ascii bdcfg lanmac)
label_mac=$lan_mac
;;
engenius,eap220|\
engenius,emd1)
lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
label_mac=$lan_mac

View File

@ -31,14 +31,15 @@ case "$FIRMWARE" in
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
;;
engenius,eap2200 |\
openmesh,a62)
caldata_extract "0:ART" 0x9000 0x2f20
;;
linksys,ea8300)
caldata_extract "ART" 0x9000 0x2f20
# OEM assigns 4 sequential MACs
ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
;;
openmesh,a62)
caldata_extract "0:ART" 0x9000 0x2f20
;;
esac
;;
"ath10k/pre-cal-ahb-a000000.wifi.bin")
@ -80,6 +81,7 @@ case "$FIRMWARE" in
compex,wpj419 |\
compex,wpj428 |\
engenius,eap1300 |\
engenius,eap2200 |\
openmesh,a42 |\
openmesh,a62 |\
qxwlan,e2600ac-c1 |\
@ -159,6 +161,7 @@ case "$FIRMWARE" in
compex,wpj419 |\
compex,wpj428 |\
engenius,eap1300 |\
engenius,eap2200 |\
openmesh,a42 |\
openmesh,a62 |\
qxwlan,e2600ac-c1 |\

View File

@ -13,6 +13,10 @@ preinit_set_mac_address() {
ip link set dev eth0 address $(mtd_get_mac_binary "ART" 0x6)
ip link set dev eth1 address $(mtd_get_mac_binary "ART" 0x0)
;;
engenius,eap2200)
base_mac=$(cat /sys/class/net/eth0/address)
ip link set dev eth1 address $(macaddr_add "${base_mac}" +1)
;;
linksys,ea8300)
base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
ip link set dev eth0 address "${base_mac}"

View File

@ -53,6 +53,7 @@ platform_do_upgrade() {
avm,fritzrepeater-1200 |\
avm,fritzrepeater-3000 |\
cilab,meshpoint-one |\
engenius,eap2200 |\
qxwlan,e2600ac-c2)
nand_do_upgrade "$1"
;;

View File

@ -0,0 +1,282 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
model = "EnGenius EAP2200";
compatible = "engenius,eap2200";
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "eap2200:amber:power";
gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "eap2200:blue:lan1";
gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "eap2200:blue:lan2";
gpios = <&tlmm 45 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "eap2200:blue:wlan2g";
gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan5g {
label = "eap2200:yellow:wlan5g";
gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wlan5g2 {
label = "eap2200:yellow:wlan5g2";
gpios = <&tlmm 48 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy2tpt";
};
mode {
label = "eap2200:blue:mode";
gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
};
};
soc {
rng@22000 {
status = "okay";
};
mdio@90000 {
status = "okay";
};
ess-psgmii@98000 {
status = "okay";
};
crypto@8e3a000 {
status = "okay";
};
watchdog@b017000 {
status = "okay";
};
ess-switch@c000000 {
status = "okay";
switch_lan_bmp = <0x10>;
};
edma@c080000 {
status = "okay";
};
};
};
&blsp_dma {
status = "okay";
};
&blsp1_spi1 {
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
status = "okay";
cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <24000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition0@0 {
label = "0:SBL1";
reg = <0x00000000 0x00040000>;
read-only;
};
partition1@40000 {
label = "0:MIBIB";
reg = <0x00040000 0x00020000>;
read-only;
};
partition2@60000 {
label = "0:QSEE";
reg = <0x00060000 0x00060000>;
read-only;
};
partition3@c0000 {
label = "0:CDT";
reg = <0x000c0000 0x00010000>;
read-only;
};
partition4@d0000 {
label = "0:DDRPARAMS";
reg = <0x000d0000 0x00010000>;
read-only;
};
partition5@e0000 {
label = "0:APPSBLENV";
reg = <0x000e0000 0x00010000>;
read-only;
};
partition6@f0000 {
label = "0:APPSBL";
reg = <0x000f0000 0x00080000>;
read-only;
};
partition7@170000 {
label = "0:ART";
reg = <0x00170000 0x00010000>;
read-only;
};
};
};
};
&blsp1_uart1 {
pinctrl-0 = <&serial_0_pins>;
pinctrl-names = "default";
status = "okay";
};
&cryptobam {
status = "okay";
};
&gmac0 {
vlan_tag = <1 0x10>;
};
&nand {
pinctrl-0 = <&nand_pins>;
pinctrl-names = "default";
status = "okay";
nand@0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "rootfs1";
reg = <0x00000000 0x04000000>;
};
partition@40000000 {
label = "ubi";
reg = <0x04000000 0x04000000>;
};
};
};
};
&pcie0 {
status = "okay";
perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi2: wifi@1,0 {
compatible = "qcom,ath10k";
reg = <0x00010000 0 0 0 0>;
ieee80211-freq-limit = <5470000 5875000>;
qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
};
};
};
&qpic_bam {
status = "okay";
};
&tlmm {
nand_pins: nand_pins {
pullups {
pins = "gpio53", "gpio58", "gpio59";
function = "qpic";
bias-pull-up;
};
pulldowns {
pins = "gpio54", "gpio55", "gpio56",
"gpio57", "gpio60", "gpio61",
"gpio62", "gpio63", "gpio64",
"gpio65", "gpio66", "gpio67",
"gpio68", "gpio69";
function = "qpic";
bias-pull-down;
};
};
serial_0_pins: serial_pinmux {
mux {
pins = "gpio16", "gpio17";
function = "blsp_uart0";
bias-disable;
};
};
spi_0_pins: spi_0_pinmux {
pinmux {
function = "blsp_spi0";
pins = "gpio13", "gpio14", "gpio15";
drive-strength = <12>;
bias-disable;
};
pinmux_cs {
function = "gpio";
pins = "gpio12";
drive-strength = <2>;
bias-disable;
output-high;
};
};
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
};
&wifi1 {
status = "okay";
ieee80211-freq-limit = <5170000 5350000>;
qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
};

View File

@ -0,0 +1,282 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
model = "EnGenius EAP2200";
compatible = "engenius,eap2200";
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "eap2200:amber:power";
gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "eap2200:blue:lan1";
gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "eap2200:blue:lan2";
gpios = <&tlmm 45 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "eap2200:blue:wlan2g";
gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan5g {
label = "eap2200:yellow:wlan5g";
gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wlan5g2 {
label = "eap2200:yellow:wlan5g2";
gpios = <&tlmm 48 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy2tpt";
};
mode {
label = "eap2200:blue:mode";
gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
};
};
soc {
rng@22000 {
status = "okay";
};
mdio@90000 {
status = "okay";
};
ess-psgmii@98000 {
status = "okay";
};
crypto@8e3a000 {
status = "okay";
};
watchdog@b017000 {
status = "okay";
};
ess-switch@c000000 {
status = "okay";
switch_lan_bmp = <0x10>;
};
edma@c080000 {
status = "okay";
};
};
};
&blsp_dma {
status = "okay";
};
&blsp1_spi1 {
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
status = "okay";
cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <24000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition0@0 {
label = "0:SBL1";
reg = <0x00000000 0x00040000>;
read-only;
};
partition1@40000 {
label = "0:MIBIB";
reg = <0x00040000 0x00020000>;
read-only;
};
partition2@60000 {
label = "0:QSEE";
reg = <0x00060000 0x00060000>;
read-only;
};
partition3@c0000 {
label = "0:CDT";
reg = <0x000c0000 0x00010000>;
read-only;
};
partition4@d0000 {
label = "0:DDRPARAMS";
reg = <0x000d0000 0x00010000>;
read-only;
};
partition5@e0000 {
label = "0:APPSBLENV";
reg = <0x000e0000 0x00010000>;
read-only;
};
partition6@f0000 {
label = "0:APPSBL";
reg = <0x000f0000 0x00080000>;
read-only;
};
partition7@170000 {
label = "0:ART";
reg = <0x00170000 0x00010000>;
read-only;
};
};
};
};
&blsp1_uart1 {
pinctrl-0 = <&serial_0_pins>;
pinctrl-names = "default";
status = "okay";
};
&cryptobam {
status = "okay";
};
&gmac0 {
vlan_tag = <1 0x10>;
};
&nand {
pinctrl-0 = <&nand_pins>;
pinctrl-names = "default";
status = "okay";
nand@0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "rootfs1";
reg = <0x00000000 0x04000000>;
};
partition@40000000 {
label = "ubi";
reg = <0x04000000 0x04000000>;
};
};
};
};
&pcie0 {
status = "okay";
perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi2: wifi@1,0 {
compatible = "qcom,ath10k";
reg = <0x00010000 0 0 0 0>;
ieee80211-freq-limit = <5470000 5875000>;
qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
};
};
};
&qpic_bam {
status = "okay";
};
&tlmm {
nand_pins: nand_pins {
pullups {
pins = "gpio53", "gpio58", "gpio59";
function = "qpic";
bias-pull-up;
};
pulldowns {
pins = "gpio54", "gpio55", "gpio56",
"gpio57", "gpio60", "gpio61",
"gpio62", "gpio63", "gpio64",
"gpio65", "gpio66", "gpio67",
"gpio68", "gpio69";
function = "qpic";
bias-pull-down;
};
};
serial_0_pins: serial_pinmux {
mux {
pins = "gpio16", "gpio17";
function = "blsp_uart0";
bias-disable;
};
};
spi_0_pins: spi_0_pinmux {
pinmux {
function = "blsp_spi0";
pins = "gpio13", "gpio14", "gpio15";
drive-strength = <12>;
bias-disable;
};
pinmux_cs {
function = "gpio";
pins = "gpio12";
drive-strength = <2>;
bias-disable;
output-high;
};
};
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
};
&wifi1 {
status = "okay";
ieee80211-freq-limit = <5170000 5350000>;
qcom,ath10k-calibration-variant = "EnGenius-EAP2200";
};

View File

@ -278,6 +278,18 @@ define Device/engenius_eap1300
endef
TARGET_DEVICES += engenius_eap1300
define Device/engenius_eap2200
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := EnGenius
DEVICE_MODEL := EAP2200
SOC := qcom-ipq4019
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-engenius_eap2200 -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
endef
TARGET_DEVICES += engenius_eap2200
define Device/engenius_emd1
$(call Device/FitImage)
DEVICE_VENDOR := EnGenius

View File

@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -785,11 +785,42 @@ dtb-$(CONFIG_ARCH_QCOM) += \
@@ -785,11 +785,43 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8074-dragonboard.dtb \
qcom-apq8084-ifc6540.dtb \
qcom-apq8084-mtp.dtb \
@ -36,6 +36,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
qcom-ipq4019-ap.dk07.1-c1.dtb \
qcom-ipq4019-ap.dk07.1-c2.dtb \
+ qcom-ipq4019-a62.dtb \
+ qcom-ipq4019-eap2200.dtb \
+ qcom-ipq4019-fritzbox-7530.dtb \
+ qcom-ipq4019-fritzrepeater-1200.dtb \
+ qcom-ipq4019-fritzrepeater-3000.dtb \

View File

@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -785,11 +785,42 @@ dtb-$(CONFIG_ARCH_QCOM) += \
@@ -785,11 +785,43 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8074-dragonboard.dtb \
qcom-apq8084-ifc6540.dtb \
qcom-apq8084-mtp.dtb \
@ -36,10 +36,11 @@ Signed-off-by: John Crispin <john@phrozen.org>
qcom-ipq4019-ap.dk07.1-c1.dtb \
qcom-ipq4019-ap.dk07.1-c2.dtb \
+ qcom-ipq4019-a62.dtb \
+ qcom-ipq4019-ea8300.dtb \
+ qcom-ipq4019-eap2200.dtb \
+ qcom-ipq4019-fritzbox-7530.dtb \
+ qcom-ipq4019-fritzrepeater-1200.dtb \
+ qcom-ipq4019-fritzrepeater-3000.dtb \
+ qcom-ipq4019-ea8300.dtb \
+ qcom-ipq4019-map-ac2200.dtb \
+ qcom-ipq4019-e2600ac-c1.dtb \
+ qcom-ipq4019-e2600ac-c2.dtb \