From a736d912e2bad6c470c73fbf47c45ec3017371af Mon Sep 17 00:00:00 2001 From: Steven Lin Date: Mon, 2 Sep 2019 10:39:45 +0800 Subject: [PATCH] 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 [copied 4.19 dts to 5.4] Signed-off-by: Christian Lamparter --- package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-engenius_eap2200.qca4019 | Bin 0 -> 24324 bytes .../ipq-wifi/board-engenius_eap2200.qca9888 | Bin 0 -> 12172 bytes .../ipq40xx/base-files/etc/board.d/01_leds | 4 + .../ipq40xx/base-files/etc/board.d/02_network | 4 +- .../etc/hotplug.d/firmware/11-ath10k-caldata | 9 +- .../lib/preinit/05_set_iface_mac_ipq40xx.sh | 4 + .../base-files/lib/upgrade/platform.sh | 1 + .../arm/boot/dts/qcom-ipq4019-eap2200.dts | 282 ++++++++++++++++++ .../arm/boot/dts/qcom-ipq4019-eap2200.dts | 282 ++++++++++++++++++ target/linux/ipq40xx/image/Makefile | 12 + .../901-arm-boot-add-dts-files.patch | 3 +- .../901-arm-boot-add-dts-files.patch | 5 +- 13 files changed, 601 insertions(+), 7 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-engenius_eap2200.qca4019 create mode 100644 package/firmware/ipq-wifi/board-engenius_eap2200.qca9888 create mode 100644 target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts create mode 100644 target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 610dee18e0..fc1b10343e 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -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)) diff --git a/package/firmware/ipq-wifi/board-engenius_eap2200.qca4019 b/package/firmware/ipq-wifi/board-engenius_eap2200.qca4019 new file mode 100644 index 0000000000000000000000000000000000000000..337d896d1edd06375a76b19da6f0b3e0bf452fc1 GIT binary patch literal 24324 zcmeHPdr(tX8b3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xV0h)7m?BYurF zra$NCbf!G;OqO>aW*6_Cy~4=}NcRU%n^@qUEr3cU@VDJ4bb!V5eBQls+IaVuC=W*B z>Ehj!#K;&3QT%te`7ZNZ%?x;iE@&2e)yia>DOM_R9 zO@_mIje6t2MPsX>5{#3L*YyqRqJ#vY@4ywq$0nCnVwY~+6^al{^{nxfL95RMmkfrZ z`h1dnd!aHK(}RVK+q zgO`ns`T})I0v{XPz9RyZE)6so3iTPfxWOw>S*Y8g-UM!*11zIuB-Az=iq#tumYWRj z!5k(d4*00gxMa@(WKd#IvVp*CI5licjVYe92-NrHUWlp1STTr#3 zRIKqzz5n^96XKHPd)&8n^z3bkujU_O@2T(1Jrh+aILOYr(4eY_)CTSKNNQ`}-?;9G ze*rtAu_LP?=7e7%E2Fke)hIvaU+A&pWYyO9BhbIq@{@e!-Nj*^eEA zrrj@`vN6VipDAJx7#D#twEL%{n%PVGnCf<;+?Z?GiFo&pxz`Ni)l}^Q1Q@@)w;Km7BtsBdLi?@9a9vrAJP2z~c{E!_Rkj z4MT3_i@4UomFwtu%q9OYFWwb+@!RU#?@b3Ue!8)=#kZ%+e@)Ik9{ZQ!-Q!)ds6WHt z?X-kK0loTW`X7=I3*JUcA`#OSc(*NTCn>zC7ToLU3dc$vf_IOR#R&8Hcz-bqbf>Ta zA0m9Pf`ahIWflhtA0&LRND_Y>SsbXzS2)(8ox9%Hvu13IYj0VO5yTtbktAO@TF1NJ v@%cd#T#mQD^Y$i9m$)q*w{sMEQQkeiNaS*Soyz5Si$LpmDrYyldH4SZO~~I9 literal 0 HcmV?d00001 diff --git a/package/firmware/ipq-wifi/board-engenius_eap2200.qca9888 b/package/firmware/ipq-wifi/board-engenius_eap2200.qca9888 new file mode 100644 index 0000000000000000000000000000000000000000..2e938f4785c5cf4dd088028bfe37c5985c3a9a5e GIT binary patch literal 12172 zcmeHNZBSEJ8a_c>z=f52312ZDLqu{(A%x(rS3U$Ht|_@-uz?!t2VZKqg^-F+Fn;cA zYvNpztcYJ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| zE1EkA5$1#KV|pNyJ1>?gfbvw!>M9}gZph%$mGA(vg1tIH+Uk=u3Ki5=u7-6o=z zOceljcAfQqawj|&Ui}j*Bl}1buxx!SJ27Iw|62y0JbCi?@#BAnVaZhE`g=9sY0#XhY%uGVv#O{8=4;I>(sIyLNZ_& zpbY60PC`Rxpp4!roPvhVKN+1s7$ z5)(H>#QupYV(zPDG$g)7WA5FUhIr15o7?staG$?29r)AjFJsB_q9VDll;N@x{SSqp z&rv9Ho+k_TA6tgs^Wk#%EsyVWp`V!Yyp)hbxkk=NLBo6l!9YgCFb!bi{6?Z0R%@!6 yjZxmO<#HTXsl<6sXwKm|*2V|^dyD^)l1i~pc+SU&{55O8jIYQZB3r)vntuZV+o7WX literal 0 HcmV?d00001 diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index 0326bab382..dd7f35a0a3 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -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" diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 4b636fc701..190286541a 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -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 diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 957bee12ab..50bfbb0a86 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -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 |\ diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index 1bca152a38..f9ec8ab055 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -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}" diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index cdf7a2b8f2..377f65ea42 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -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" ;; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts new file mode 100644 index 0000000000..6862ca87e3 --- /dev/null +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts @@ -0,0 +1,282 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019.dtsi" +#include +#include + +/ { + model = "EnGenius EAP2200"; + compatible = "engenius,eap2200"; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + 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"; +}; diff --git a/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts new file mode 100644 index 0000000000..6862ca87e3 --- /dev/null +++ b/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts @@ -0,0 +1,282 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019.dtsi" +#include +#include + +/ { + model = "EnGenius EAP2200"; + compatible = "engenius,eap2200"; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + 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"; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index bbe4df9df4..9ddcd17f1d 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -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 diff --git a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch index 11e775a5dc..89e665db23 100644 --- a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- 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 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 \ diff --git a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch index 11e775a5dc..da53220f09 100644 --- a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- 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 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 \ -- 2.25.1