ipq40xx: add support for EnGenius ENS620EXT

Hardware
--------
CPU:   Qualcomm IPQ4018
RAM:   256M
FLASH: 32M SPI NOR W25Q256
ETH:   QCA8075
WiFi2: IPQ4018 2T2R 2SS b/g/n
WiFi5: IPQ4018 2T2R 2SS n/ac
LED:    - Power amber
        - LAN1(PoE) green
        - LAN2 green
        - Wi-Fi 2.4GHz green
        - Wi-Fi 5GHz green
BTN:    - WPS
UART:  115200n8 3.3V J1
       VCC(1) - GND(2) - TX(3) - RX(4)

Added basic support to get the device up and running for a sysupgrade
image only.
There is currently no way back to factory firmware, so this is a one-way
street to OpenWRT.
Install from factory condition is convoluted, and may brick your device:
1) Enable SSH and disable the CLI on the factory device from the web user
   interface (Management->Advanced)
2) Reboot the device
3) Override the default, limited SSH shell:
   a) Get into the ssh shell:
      ssh admin@192.168.1.1 /bin/sh --login
   b) Change the dropbear script to disable the limited shell. At the
      empty command prompt type:
        sed -i '/login_ssh/s/^/#/g’ dropbear
        /etc/init.d/dropbear restart
        exit
4) ssh in to a (now-) normal OpenWRT SSH session
5) Flash your built image
   a) scp openwrt-ipq40xx-engenius_ens620ext-squashfs-sysupgrade.bin
      admin@192.168.1.1:/tmp/
   b) ssh admin@192.168.1.1
   c) sysupgrade -n
      /tmp/openwrt-ipq40xx-engenius_ens620ext-squashfs-sysupgrade.bin
6) After flash completes (it may say "Upgrade failed" followed by
   "Upgrade completed") and device reboots, log in to newly flashed
   system. Note you will now need to ssh as root rather than admin.

Signed-off-by: Steve Glennon <s.glennon@cablelabs.com>
[whitespace fixes, reordered partitions, removed rng node from 4.14,
fixed 901-arm-boot-add-dts-files.patch]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
master
Steve Glennon 6 years ago committed by Christian Lamparter
parent 5c11258297
commit dc4f6b896f
  1. 3
      package/firmware/ipq-wifi/Makefile
  2. BIN
      package/firmware/ipq-wifi/board-engenius_ens620ext.bin
  3. 6
      target/linux/ipq40xx/base-files/etc/board.d/01_leds
  4. 7
      target/linux/ipq40xx/base-files/etc/board.d/02_network
  5. 8
      target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
  6. 252
      target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
  7. 256
      target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
  8. 16
      target/linux/ipq40xx/image/Makefile
  9. 3
      target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch
  10. 3
      target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch

@ -18,7 +18,7 @@ endef
# Please send a mail with your device-specific board files upstream.
# You can find instructions and examples on the linux-wireless wiki:
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
ALLWIFIBOARDS:=alfa-network_ap120c-ac asus_map-ac2200 avm_fritzbox-7530 avm_fritzrepeater-3000 engenius_eap1300 linksys_ea6350v3 qxwlan_e2600ac
ALLWIFIBOARDS:=alfa-network_ap120c-ac asus_map-ac2200 avm_fritzbox-7530 avm_fritzrepeater-3000 engenius_eap1300 engenius_ens620ext linksys_ea6350v3 qxwlan_e2600ac
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
define Package/ipq-wifi-default
@ -56,6 +56,7 @@ endef
$(eval $(call generate-ipq-wifi-package,alfa-network_ap120c-ac,board-alfa-network_ap120c-ac.bin,ALFA Network AP120C-AC))
$(eval $(call generate-ipq-wifi-package,asus_map-ac2200,board-map-ac2200.bin,ASUS MAP-AC2200))
$(eval $(call generate-ipq-wifi-package,engenius_eap1300,board-engenius_eap1300.bin,EnGenius EAP1300))
$(eval $(call generate-ipq-wifi-package,engenius_ens620ext,board-engenius_ens620ext.bin,EnGenius ENS620EXT))
$(eval $(call generate-ipq-wifi-package,avm_fritzbox-7530,board-avm_fritzbox-7530.bin,AVM FRITZ!Box 7530))
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-3000,board-avm_fritzrepeater-3000.bin,AVM FRITZ!Repeater 3000))
$(eval $(call generate-ipq-wifi-package,linksys_ea6350v3,board-linksys_ea6350v3.bin,Linksys EA6350v3))

@ -35,6 +35,12 @@ engenius,eap1300)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:yellow:wlan5g" "phy1tpt"
ucidef_set_led_default "mesh" "MESH" "${boardname}:blue:mesh" "0"
;;
engenius,ens620ext)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt"
ucidef_set_led_netdev "lan1" "LAN1" "${boardname}:green:lan1" "eth0"
ucidef_set_led_netdev "lan2" "LAN2" "${boardname}:green:lan2" "eth1"
;;
netgear,ex6100v2 |\
netgear,ex6150v2)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "ex61x0v2:green:router" "phy0tpt"

@ -13,7 +13,8 @@ ipq40xx_setup_interfaces()
case "$board" in
8dev,jalapeno|\
alfa-network,ap120c-ac)
alfa-network,ap120c-ac|\
engenius,ens620ext)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
asus,map-ac2200|\
@ -75,6 +76,10 @@ ipq40xx_setup_macs()
wan_mac=$(mtd_get_mac_binary_ubi Factory 20486)
lan_mac=$(mtd_get_mac_binary_ubi Factory 4102)
;;
engenius,ens620ext)
wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
linksys,ea6350v3)
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
lan_mac=$(macaddr_add "$wan_mac" 1)

@ -152,6 +152,10 @@ case "$FIRMWARE" in
qxwlan,e2600ac-c2)
ath10kcal_extract "0:ART" 4096 12064
;;
engenius,ens620ext)
ath10kcal_extract "ART" 4096 12064
ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2)
;;
meraki,mr33)
ath10kcal_ubi_extract "ART" 4096 12064
ath10kcal_is_caldata_valid "202f" || ath10kcal_extract "ART" 4096 12064
@ -201,6 +205,10 @@ case "$FIRMWARE" in
qxwlan,e2600ac-c2)
ath10kcal_extract "0:ART" 20480 12064
;;
engenius,ens620ext)
ath10kcal_extract "ART" 20480 12064
ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3)
;;
meraki,mr33)
ath10kcal_ubi_extract "ART" 20480 12064
ath10kcal_is_caldata_valid "202f" || ath10kcal_extract "ART" 20480 12064

@ -0,0 +1,252 @@
// 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>
#include <dt-bindings/soc/qcom,tcsr.h>
/ {
model = "EnGenius ENS620EXT";
compatible = "engenius,ens620ext";
memory {
device_type = "memory";
reg = <0x80000000 0x10000000>;
};
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
};
soc {
mdio@90000 {
status = "okay";
};
ess-psgmii@98000 {
status = "okay";
};
tcsr@1949000 {
compatible = "qcom,tcsr";
reg = <0x1949000 0x100>;
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
};
ess_tcsr@1953000 {
compatible = "qcom,tcsr";
reg = <0x1953000 0x1000>;
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
};
tcsr@1957000 {
compatible = "qcom,tcsr";
reg = <0x1957000 0x100>;
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
crypto@8e3a000 {
status = "okay";
};
watchdog@b017000 {
status = "okay";
};
ess-switch@c000000 {
status = "okay";
};
edma@c080000 {
status = "okay";
};
};
buttons {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
power: power {
label = "ens620ext:amber:power";
gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "ens620ext:green:lan1";
gpios = <&tlmm 1 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "ens620ext:green:lan2";
gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
};
wlan2G {
label = "ens620ext:green:wlan2G";
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
};
wlan5G {
label = "ens620ext:green:wlan5G";
gpios = <&tlmm 0 GPIO_ACTIVE_LOW>;
};
};
};
&cryptobam {
status = "okay";
};
&blsp_dma {
status = "okay";
};
&tlmm {
serial_pins: serial_pinmux {
mux {
pins = "gpio60", "gpio61";
function = "blsp_uart0";
bias-disable;
};
};
spi_0_pins: spi_0_pinmux {
mux {
function = "blsp_spi0";
pins = "gpio55", "gpio56", "gpio57";
drive-strength = <12>;
bias-disable;
};
mux_cs {
function = "gpio";
pins = "gpio54";
drive-strength = <2>;
bias-disable;
output-high;
};
};
};
&blsp1_spi1 { /* BLSP1 QUP1 */
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
status = "okay";
cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
flash@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "SBL1";
reg = <0x00000000 0x00040000>;
read-only;
};
partition@40000 {
label = "MIBIB";
reg = <0x00040000 0x00020000>;
read-only;
};
partition@60000 {
label = "QSEE";
reg = <0x00060000 0x00060000>;
read-only;
};
partition@c0000 {
label = "CDT";
reg = <0x000c0000 0x00010000>;
read-only;
};
partition@d0000 {
label = "DDRPARAMS";
reg = <0x000d0000 0x00010000>;
read-only;
};
partition@e0000 {
label = "APPSBLENV"; /* uboot env*/
reg = <0x000e0000 0x00010000>;
read-only;
};
partition@f0000 {
label = "APPSBL"; /* uboot */
reg = <0x000f0000 0x00090000>;
read-only;
};
partition@180000 {
label = "ART";
reg = <0x00180000 0x00010000>;
read-only;
};
partition@190000 {
compatible = "denx,fit";
label = "firmware";
reg = <0x00190000 0x14d0000>;
};
partition@1660000 {
label = "failsafe";
reg = <0x01660000 0x008f0000>;
read-only;
};
partition@1f50000 {
label = "u-boot-env";
reg = <0x01f50000 0x00010000>;
read-only;
};
partition@1f60000 {
label = "userconfig";
reg = <0x01f60000 0x000a0000>;
read-only;
};
};
};
};
&blsp1_uart1 {
pinctrl-0 = <&serial_pins>;
pinctrl-names = "default";
status = "okay";
};
&usb3_ss_phy {
status = "okay";
};
&usb3_hs_phy {
status = "okay";
};
&usb2_hs_phy {
status = "okay";
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "EnGenius-ENS620EXT";
};
&wifi1 {
status = "okay";
qcom,ath10k-calibration-variant = "EnGenius-ENS620EXT";
};

@ -0,0 +1,256 @@
// 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>
#include <dt-bindings/soc/qcom,tcsr.h>
/ {
model = "EnGenius ENS620EXT";
compatible = "engenius,ens620ext";
memory {
device_type = "memory";
reg = <0x80000000 0x10000000>;
};
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
};
soc {
rng@22000 {
status = "okay";
};
mdio@90000 {
status = "okay";
};
ess-psgmii@98000 {
status = "okay";
};
tcsr@1949000 {
compatible = "qcom,tcsr";
reg = <0x1949000 0x100>;
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
};
ess_tcsr@1953000 {
compatible = "qcom,tcsr";
reg = <0x1953000 0x1000>;
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
};
tcsr@1957000 {
compatible = "qcom,tcsr";
reg = <0x1957000 0x100>;
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
crypto@8e3a000 {
status = "okay";
};
watchdog@b017000 {
status = "okay";
};
ess-switch@c000000 {
status = "okay";
};
edma@c080000 {
status = "okay";
};
};
buttons {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
power: power {
label = "ens620ext:amber:power";
gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "ens620ext:green:lan1";
gpios = <&tlmm 1 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "ens620ext:green:lan2";
gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
};
wlan2G {
label = "ens620ext:green:wlan2G";
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
};
wlan5G {
label = "ens620ext:green:wlan5G";
gpios = <&tlmm 0 GPIO_ACTIVE_LOW>;
};
};
};
&cryptobam {
status = "okay";
};
&blsp_dma {
status = "okay";
};
&tlmm {
serial_pins: serial_pinmux {
mux {
pins = "gpio60", "gpio61";
function = "blsp_uart0";
bias-disable;
};
};
spi_0_pins: spi_0_pinmux {
mux {
function = "blsp_spi0";
pins = "gpio55", "gpio56", "gpio57";
drive-strength = <12>;
bias-disable;
};
mux_cs {
function = "gpio";
pins = "gpio54";
drive-strength = <2>;
bias-disable;
output-high;
};
};
};
&blsp1_spi1 { /* BLSP1 QUP1 */
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
status = "okay";
cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
flash@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "SBL1";
reg = <0x00000000 0x00040000>;
read-only;
};
partition@40000 {
label = "MIBIB";
reg = <0x00040000 0x00020000>;
read-only;
};
partition@60000 {
label = "QSEE";
reg = <0x00060000 0x00060000>;
read-only;
};
partition@c0000 {
label = "CDT";
reg = <0x000c0000 0x00010000>;
read-only;
};
partition@d0000 {
label = "DDRPARAMS";
reg = <0x000d0000 0x00010000>;
read-only;
};
partition@e0000 {
label = "APPSBLENV"; /* uboot env*/
reg = <0x000e0000 0x00010000>;
read-only;
};
partition@f0000 {
label = "APPSBL"; /* uboot */
reg = <0x000f0000 0x00090000>;
read-only;
};
partition@180000 {
label = "ART";
reg = <0x00180000 0x00010000>;
read-only;
};
partition@190000 {
compatible = "denx,fit";
label = "firmware";
reg = <0x00190000 0x14d0000>;
};
partition@1660000 {
label = "failsafe";
reg = <0x01660000 0x008F0000>;
read-only;
};
partition@1f50000 {
label = "u-boot-env";
reg = <0x01f50000 0x00010000>;
read-only;
};
partition@1f60000 {
label = "userconfig";
reg = <0x01f60000 0x000a0000>;
read-only;
};
};
};
};
&blsp1_uart1 {
pinctrl-0 = <&serial_pins>;
pinctrl-names = "default";
status = "okay";
};
&usb3_ss_phy {
status = "okay";
};
&usb3_hs_phy {
status = "okay";
};
&usb2_hs_phy {
status = "okay";
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "EnGenius-ENS620EXT";
};
&wifi1 {
status = "okay";
qcom,ath10k-calibration-variant = "EnGenius-ENS620EXT";
};

@ -167,6 +167,22 @@ define Device/engenius_eap1300
endef
TARGET_DEVICES += engenius_eap1300
define Device/engenius_ens620ext
$(call Device/FitImage)
DEVICE_DTS := qcom-ipq4018-ens620ext
DEVICE_DTS_CONFIG := config@4
BLOCKSIZE := 64k
PAGESIZE := 256
DEVICE_TITLE := EnGenius ENS620EXT
IMAGE_SIZE := 21823488
KERNEL_SIZE := 5120k
FILESYSTEMS := squashfs
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | append-metadata
DEVICE_PACKAGES := ipq-wifi-engenius_ens620ext
endef
TARGET_DEVICES += engenius_ens620ext
define Device/glinet_gl-b1300
$(call Device/FitImage)
DEVICE_TITLE := GL.iNet GL-B1300

@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -697,7 +697,28 @@ dtb-$(CONFIG_ARCH_QCOM) += \
@@ -697,7 +697,29 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8074-dragonboard.dtb \
qcom-apq8084-ifc6540.dtb \
qcom-apq8084-mtp.dtb \
@ -18,6 +18,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ qcom-ipq4018-ap120c-ac.dtb \
+ qcom-ipq4018-ea6350v3.dtb \
+ qcom-ipq4018-eap1300.dtb \
+ qcom-ipq4018-ens620ext.dtb \
+ qcom-ipq4018-ex6100v2.dtb \
+ qcom-ipq4018-ex6150v2.dtb \
+ qcom-ipq4018-fritz4040.dtb \

@ -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,31 @@ dtb-$(CONFIG_ARCH_QCOM) += \
@@ -785,11 +785,32 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8074-dragonboard.dtb \
qcom-apq8084-ifc6540.dtb \
qcom-apq8084-mtp.dtb \
@ -18,6 +18,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ qcom-ipq4018-ap120c-ac.dtb \
+ qcom-ipq4018-ea6350v3.dtb \
+ qcom-ipq4018-eap1300.dtb \
+ qcom-ipq4018-ens620ext.dtb \
+ qcom-ipq4018-ex6100v2.dtb \
+ qcom-ipq4018-ex6150v2.dtb \
+ qcom-ipq4018-fritz4040.dtb \

Loading…
Cancel
Save