From 6e03304c76aee6fc5c3139f4af8c24665ec7f89b Mon Sep 17 00:00:00 2001 From: Matthew Hagan Date: Sat, 29 Jan 2022 09:03:11 +0900 Subject: [PATCH] ipq807x: add Edgecore EAP102 The Edgecore EAP102 is a wall/ceiling mountable AP. The AP can be powered by either PoE or AC adapter. Device info: - IPQ8071-A SoC - 1GiB RAM - 256MiB NAND flash - 32MiB SPI NOR - 2 Ethernet ports - 1 Console port - 2GHz/5GHz AX WLAN - 2 USB 2.0 ports Install instructions: Prerequistes - TFTP server, preferrably within 192.168.1.0/24 Console cable plugged in (115200 8N1 no flow control) 1. Power on device and interrupt u-boot to obtain u-boot CLI 2. set serverip to IP address of the TFTP server: `setenv serverip 192.168.1.250` 3. Download image from TFTP server: `tftpboot 0x44000000 openwrt-ipq807x-generic-edgecore_eap102-squashfs-nand-factory.ubi` 4. Flash ubi image to both partitions and reset: `sf probe imxtract 0x44000000 ubi nand device 0 nand erase 0x0 0x3400000 nand erase 0x3c00000 0x3400000 nand write $fileaddr 0x0 $filesize nand write $fileaddr 0x3c00000 $filesize reset` Signed-off-by: Matthew Hagan --- package/boot/uboot-envtools/files/ipq807x | 5 + package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-edgecore_eap102.ipq8074 | Bin 0 -> 131180 bytes .../ipq807x/base-files/etc/board.d/01_leds | 3 + .../ipq807x/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-ath11k-caldata | 1 + .../ipq807x/base-files/etc/init.d/bootcount | 13 + .../base-files/lib/upgrade/platform.sh | 12 + .../arm64/boot/dts/qcom/ipq8071-eap102.dts | 389 ++++++++++++++++++ target/linux/ipq807x/image/generic.mk | 14 + 10 files changed, 442 insertions(+) create mode 100644 package/firmware/ipq-wifi/board-edgecore_eap102.ipq8074 create mode 100755 target/linux/ipq807x/base-files/etc/init.d/bootcount create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x index e7057945b8c..71fa7b7b799 100644 --- a/package/boot/uboot-envtools/files/ipq807x +++ b/package/boot/uboot-envtools/files/ipq807x @@ -8,6 +8,11 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in +edgecore,eap102) + idx="$(find_mtd_index 0:appsblenv)" + [ -n "$idx" ] && \ + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1" + ;; edimax,cax1800) idx="$(find_mtd_index 0:appsblenv)" [ -n "$idx" ] && \ diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 02e1c8af488..e662f7408ac 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -27,6 +27,7 @@ endef ALLWIFIBOARDS:= \ aruba_ap-365 \ devolo_magic-2-wifi-next \ + edgecore_eap102 \ edgecore_ecw5410 \ edgecore_oap100 \ edimax_cax1800 \ @@ -123,6 +124,7 @@ endef $(eval $(call generate-ipq-wifi-package,aruba_ap-365,Aruba AP-365)) $(eval $(call generate-ipq-wifi-package,devolo_magic-2-wifi-next,devolo Magic 2 WiFi next)) +$(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102)) $(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410)) $(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100)) $(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800)) diff --git a/package/firmware/ipq-wifi/board-edgecore_eap102.ipq8074 b/package/firmware/ipq-wifi/board-edgecore_eap102.ipq8074 new file mode 100644 index 0000000000000000000000000000000000000000..36d0f42fb9707321f84398e6a04f6173ebad6b27 GIT binary patch literal 131180 zc-rlK3sjU>mhP^lkW7)tXXsK>dwram7bfM>DNqir+eMib64MRzx~%w z)u~eBj|v@if3;85zt8{gbN1P1?{oHFR8cjHitjECluw_&?Cz4~#kGrR)22-XRFlRp zG#{m7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uY`yMc zL|v+0Hz@JV__yO7N-M6Agez1RlpSpOi!sBo-%$-u#jfu72OPQK-P=++oagnU2b@24 zR_m<n2vszFhJtPsF zk5;`sGG;J6WIt~Cp7DFf2fZ%XuS*~A_fmp3eZcvIQ#~83`>xSSYp9jbD7D}?9Qrsq z42e)3T1k%ZN!BW;b9PAQ^iX@jJ_bD}sJ%lU`t6y(D-Nkn%3FBFmItx>!! zYDbH{J|>E{NAcn77wS78#YUcwi@H8ONd zMzL}6qr$vKqZ1T)Qssl~jS2IbW{-h<;@Bibeq6HJzm>*21~r~$)gtVfWMzF)oG#@& z>*rQ@jXWWNX;w$1yhZOnbwZj|(QjhQlsYX8CWnOWZK@OWeN@%t2gDMDYC&xw%F z^-rEMC?5m;V(+3TdrrOE;Pw8M_9$xnT5x{uv8wX-P7BS4KK|)5!tLw*%?!^sU!Rvh zYqom*_&K2tto;7!TwBb%i18E@hV@1NwwR*%q4VJH^-o@)_GgQU)HgP6VXo7vp}i$#**OG)+Z$=rHAk!<5C{YUfj}S-2m}IwKp+qZ z1OkCTAP@)y0)apv5C{YUfj}S-2m}IwKp+qZ1OkCzBK`i39Ctc>8ZWai5C{YUfk1Hk G;r|1-P9_Qf literal 0 Hc-jL100001 diff --git a/target/linux/ipq807x/base-files/etc/board.d/01_leds b/target/linux/ipq807x/base-files/etc/board.d/01_leds index f0a2bdd7bb9..04249584165 100644 --- a/target/linux/ipq807x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq807x/base-files/etc/board.d/01_leds @@ -6,6 +6,9 @@ board_config_update board=$(board_name) case "$board" in +edgecore,eap102) + ucidef_set_led_netdev "wan" "WAN" "green:wanpoe" "wan" + ;; redmi,ax6|\ xiaomi,ax3600) ucidef_set_led_netdev "wan" "WAN" "blue:network" "wan" diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network index 273547dc224..8856daff314 100644 --- a/target/linux/ipq807x/base-files/etc/board.d/02_network +++ b/target/linux/ipq807x/base-files/etc/board.d/02_network @@ -11,6 +11,9 @@ ipq807x_setup_interfaces() local board="$1" case "$board" in + edgecore,eap102) + ucidef_set_interfaces_lan_wan "lan" "wan" + ;; edimax,cax1800) ucidef_set_interfaces_lan_wan "lan" ;; diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata index 7ac05f29925..a2290ac124a 100644 --- a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata @@ -9,6 +9,7 @@ board=$(board_name) case "$FIRMWARE" in "ath11k/IPQ8074/hw2.0/cal-ahb-c000000.wifi.bin") case "$board" in + edgecore,eap102|\ edimax,cax1800|\ qnap,301w|\ redmi,ax6|\ diff --git a/target/linux/ipq807x/base-files/etc/init.d/bootcount b/target/linux/ipq807x/base-files/etc/init.d/bootcount new file mode 100755 index 00000000000..6917446a9bb --- /dev/null +++ b/target/linux/ipq807x/base-files/etc/init.d/bootcount @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common + +START=99 + +boot() { + case $(board_name) in + edgecore,eap102) + fw_setenv upgrade_available 0 + # Unset changed flag after sysupgrade complete + fw_setenv changed + ;; + esac +} diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh index fe204120834..ab3121c44f4 100644 --- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh @@ -43,6 +43,18 @@ platform_pre_upgrade() { platform_do_upgrade() { case "$(board_name)" in + edgecore,eap102) + active="$(fw_printenv -n active)" + if [ "$active" -eq "1" ]; then + CI_UBIPART="rootfs2" + else + CI_UBIPART="rootfs1" + fi + # force altbootcmd which handles partition change in u-boot + fw_setenv bootcount 3 + fw_setenv upgrade_available 1 + nand_do_upgrade "$1" + ;; edimax,cax1800) nand_do_upgrade "$1" ;; diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts new file mode 100644 index 00000000000..357b6368d9d --- /dev/null +++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts @@ -0,0 +1,389 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* Copyright (c) 2022, Matthew Hagan */ + +/dts-v1/; + +#include "ipq8074.dtsi" +#include "ipq8074-ac-cpu.dtsi" +#include "ipq8074-ess.dtsi" +#include +#include + +/ { + model = "Edgecore EAP102"; + compatible = "edgecore,eap102", "qcom,ipq8074"; + + aliases { + serial0 = &blsp1_uart5; + serial1 = &blsp1_uart3; + led-boot = &led_system_green; + led-failsafe = &led_system_green; + led-running = &led_system_green; + led-upgrade = &led_system_green; + /* Aliases as required by u-boot to patch MAC addresses */ + ethernet0 = &dp5; + ethernet1 = &dp6; + label-mac-device = &dp5; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&tlmm 66 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_wanpoe { + label = "green:wanpoe"; + gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>; + }; + + led_wlan2g { + label = "green:wlan2g"; + gpio = <&tlmm 47 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1radio"; + }; + + led_wlan5g { + label = "green:wlan5g"; + gpio = <&tlmm 48 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0radio"; + }; + + led_system_green: led_system { + label = "green:power"; + gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&tlmm { + mdio_pins: mdio-pins { + mdc { + pins = "gpio68"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + + mdio { + pins = "gpio69"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + button_pins: button_pins { + reset_button { + pins = "gpio66"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + }; +}; + +&blsp1_spi1 { + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "0:sbl1"; + reg = <0x0 0x50000>; + read-only; + }; + + partition@50000 { + label = "0:mibib"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "0:bootconfig"; + reg = <0x60000 0x20000>; + read-only; + }; + + partition@80000 { + label = "0:bootconfig1"; + reg = <0x80000 0x20000>; + read-only; + }; + + partition@a0000 { + label = "0:qsee"; + reg = <0xa0000 0x180000>; + read-only; + }; + + partition@220000 { + label = "0:qsee_1"; + reg = <0x220000 0x180000>; + read-only; + }; + + partition@3a0000 { + label = "0:devcfg"; + reg = <0x3a0000 0x10000>; + read-only; + }; + + partition@3b0000 { + label = "0:devcfg_1"; + reg = <0x3b0000 0x10000>; + read-only; + }; + + partition@3c0000 { + label = "0:apdp"; + reg = <0x3c0000 0x10000>; + read-only; + }; + + partition@3d0000 { + label = "0:apdp_1"; + reg = <0x3d0000 0x10000>; + read-only; + }; + + partition@3e0000 { + label = "0:rpm"; + reg = <0x3e0000 0x40000>; + read-only; + }; + + partition@420000 { + label = "0:rpm_1"; + reg = <0x420000 0x40000>; + read-only; + }; + + partition@460000 { + label = "0:cdt"; + reg = <0x460000 0x10000>; + read-only; + }; + + partition@470000 { + label = "0:cdt_1"; + reg = <0x470000 0x10000>; + read-only; + }; + + partition@480000 { + label = "0:appsblenv"; + reg = <0x480000 0x10000>; + }; + + partition@490000 { + label = "0:appsbl"; + reg = <0x490000 0xc0000>; + read-only; + }; + + partition@550000 { + label = "0:appsbl_1"; + reg = <0x530000 0xc0000>; + read-only; + }; + + partition@610000 { + label = "0:art"; + reg = <0x610000 0x40000>; + read-only; + }; + + partition@650000 { + label = "0:ethphyfw"; + reg = <0x650000 0x80000>; + read-only; + }; + + partition@6d0000 { + label = "0:product_info"; + reg = <0x6d0000 0x80000>; + read-only; + }; + + partition@750000 { + label = "priv_data1"; + reg = <0x750000 0x10000>; + read-only; + }; + + partition@760000 { + label = "priv_data2"; + reg = <0x760000 0x10000>; + read-only; + }; + }; + }; +}; + +&blsp1_uart3 { + status = "okay"; +}; + +&blsp1_uart5 { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&qusb_phy_0 { + status = "okay"; +}; + +&ssphy_0 { + status = "okay"; +}; + +&usb_0 { + status = "okay"; +}; + +&qpic_nand { + status = "okay"; + + nand@0 { + reg = <0>; + nand-ecc-strength = <8>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "rootfs1"; + reg = <0x0000000 0x3400000>; + }; + + partition@3400000 { + label = "0:wififw"; + reg = <0x3400000 0x800000>; + read-only; + }; + + partition@3c00000 { + label = "rootfs2"; + reg = <0x3c00000 0x3400000>; + }; + + partition@7000000 { + label = "0:wififw_1"; + reg = <0x7000000 0x800000>; + read-only; + }; + }; + }; +}; + +&mdio { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + + qca8081_24: ethernet-phy@24 { + compatible = "ethernet-phy-id004d.d101"; + reg = <24>; + reset-gpios = <&tlmm 33 GPIO_ACTIVE_LOW>; + }; + + qca8081_28: ethernet-phy@28 { + compatible = "ethernet-phy-id004d.d101"; + reg = <28>; + reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>; + }; +}; + +&switch { + status = "okay"; + + switch_cpu_bmp = <0x1>; /* cpu port bitmap */ + switch_lan_bmp = <0x3e>; /* lan port bitmap */ + switch_wan_bmp = <0x40>; /* wan port bitmap */ + switch_mac_mode = <0xff>; /* mac mode for uniphy instance0*/ + switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/ + bm_tick_mode = <0>; /* bm tick mode */ + tm_tick_mode = <0>; /* tm tick mode */ + + qcom,port_phyinfo { + port@4 { + port_id = <5>; + phy_address = <24>; + port_mac_sel = "QGMAC_PORT"; + }; + port@5 { + port_id = <6>; + phy_address = <28>; + port_mac_sel = "QGMAC_PORT"; + }; + }; +}; + +&edma { + status = "okay"; +}; + +&dp5 { + status = "okay"; + phy-handle = <&qca8081_28>; + label = "wan"; +}; + +&dp6 { + status = "okay"; + phy-handle = <&qca8081_24>; + label = "lan"; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "Edgecore-EAP102"; +}; diff --git a/target/linux/ipq807x/image/generic.mk b/target/linux/ipq807x/image/generic.mk index ae0d6d2ad05..23260ed1e78 100644 --- a/target/linux/ipq807x/image/generic.mk +++ b/target/linux/ipq807x/image/generic.mk @@ -17,6 +17,20 @@ define Device/UbiFit IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef +define Device/edgecore_eap102 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Edgecore + DEVICE_MODEL := EAP102 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_DTS_CONFIG := config@ac02 + SOC := ipq8071 + DEVICE_PACKAGES := ipq-wifi-edgecore_eap102 + IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand +endef +TARGET_DEVICES += edgecore_eap102 + define Device/edimax_cax1800 $(call Device/FitImage) $(call Device/UbiFit) -- 2.47.3