From a36fc589fe7ac53ccb83f4503953bd6646477d0a Mon Sep 17 00:00:00 2001 From: Dirk Buchwalder Date: Sat, 1 Jan 2022 23:17:51 +0100 Subject: [PATCH] ipq807x: add Edimax CAX1800 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Edimax CAX1800 is a 802.11 ax dual-band AP with PoE. AP can be ceiling or wall mount. Specifications: • CPU: Qualcomm IPQ8070A Quad core Cortex-A53 1.4GHz • RAM: 512MB of DDR3 • Storage: 128MB NAND (contains rootfs) / 8MB NOR (contains art and uboot-env) • Ethernet: 1x 1G RJ45 port (QCA8072) PoE • WLAN: 2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 574 Mbps PHY rate 5GHz: Qualcomm QCN5054 2x2 802.11a/b/g/n/ac/ax 1201 PHY rate • LEDs: 3 x GPIO-controlled System-LEDs (form one virtual RGB System-LED) black_small_square Buttons: 1x soft reset black_small_square Power: 12V DC jack or PoE (802.3af ) An unpopulated serial header is onboard. RX/TX is working, bootwait is active, secure boot is not enabled. SSH can be activated in the stock firmware, but it drops only to a limited shell . Installation Instructions: black_small_square obtain serial access black_small_square stop auto boot black_small_square tftpboot the initramfs image (serverip is set to 192.168.99.8 in uboot) black_small_square bootm black_small_square copy openwrt-ipq807x-generic-edimax_cax1800-squashfs-nand-factory.ubi to the device black_small_square write the image to the NAND: black_small_square cat /proc/mtd and look for rootfs partition (should be mtd0) black_small_square ubiformat /dev/mtd0 -f -y openwrt-ipq807x-generic-edimax_cax1800-squashfs- nand-factory.ubi black_small_square reboot Note: Device is not using dual partitioning (NAND contains other partitions with different manufacture data etc.) Draytek VigorAP 960C and Lancom LW-600 both look similar, but I haven't checked them. Signed-off-by: Dirk Buchwalder --- package/boot/uboot-envtools/files/ipq807x | 5 + package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-edimax_cax1800.ipq8074 | Bin 0 -> 131180 bytes .../ipq807x/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-ath11k-caldata | 1 + .../base-files/lib/upgrade/platform.sh | 3 + .../arm64/boot/dts/qcom/ipq8070-cax1800.dts | 322 ++++++++++++++++++ target/linux/ipq807x/image/generic.mk | 13 + 8 files changed, 349 insertions(+) create mode 100644 package/firmware/ipq-wifi/board-edimax_cax1800.ipq8074 create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x index 44f2d8a0c27..636f3344129 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 +edimax,cax1800) + idx="$(find_mtd_index 0:appsblenv)" + [ -n "$idx" ] && \ + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000" + ;; redmi,ax6|\ xiaomi,ax3600) idx="$(find_mtd_index 0:appsblenv)" diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 1fa7482ddb8..27672280801 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -29,6 +29,7 @@ ALLWIFIBOARDS:= \ devolo_magic-2-wifi-next \ edgecore_ecw5410 \ edgecore_oap100 \ + edimax_cax1800 \ extreme-networks_ws-ap3915i \ glinet_gl-a1300 \ glinet_gl-ap1300 \ @@ -120,6 +121,7 @@ $(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_ecw5410,Edgecore ECW5410)) $(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100)) +$(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800)) $(eval $(call generate-ipq-wifi-package,extreme-networks_ws-ap3915i,Edgecore OAP100)) $(eval $(call generate-ipq-wifi-package,glinet_gl-a1300,GL.iNet GL-A1300)) $(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300)) diff --git a/package/firmware/ipq-wifi/board-edimax_cax1800.ipq8074 b/package/firmware/ipq-wifi/board-edimax_cax1800.ipq8074 new file mode 100644 index 0000000000000000000000000000000000000000..5c9f4700f48413ba2c93c5ca6434fce88d47f842 GIT binary patch literal 131180 zcmeHw33OD~ndV=wN`)kZ5Tdjp0a8_Iv17Ys%qj_x0D&-)5ZX6D2y9~;u)ttrY_o$| z#42I1V>=G2@aWo}M12lj%wNWXycud-bYb zfuLTYLLlkh`d`)k@4f$BzW=}fz3=j#Sh29;&WgsWyYF6h=Yr)G^^0WV#*KndCmMfb zF0SrvkIr4QzWa{N8y~!L?fM6M?tF0F++v;Ueq_y-b!4Z_m~qErYqmVNX4BTWmFphd zxMusE3oBaho?Tpw`W$*qnmEMe(xbbV{As33oV!w|H|yUm`gg1T-KKxH>)#!EX?&e3 zW^6jYjLH~8I0;S*OEJ<1`0g4YZImUYIwt6!8IF1Sr_@oRf95-8>7RLl-#Lyl{WHrk zUH{B*Ow&Ipj-0@!48N0txF-o~CYY?5zpRmz$JiG{E*iOn!|{78BcUs@#Kl#}-yVkAmJ=uTmg_mD> z#&ub_>tNfjLq>^2Mj%cugw_i#Xa;xf zSmbI|35CFrA>fuDhHQAqT2&1x1a1rhVGDlxvsC0=z3!IXfVI=^26sT-?QWJx$|#b3Ivhdk43US5XpR1 z#IqN8bc!V6P-{#!?h*gjrHD=D{zPQ*hay?$Mbh>`9vhCa_lU$#h5SF;kpHPj4%*Lp zB_NOUwXriGp9}f_VMG4s=>PkH{JR+_XNoQdt~`15OV(>b$l48=rZ^*Rt<(U_nduKi6-;`mg@9-B__m}PW_Jr5h(pP%Gzb(yD-`ST| zADi=}@1YFr@64dr_jLXyYyX~orRz-D{`^PNyUbE}O61kn{?dct^&S6w`_Yo8d=F=I zhRPj6|H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8kK06f|sJE>rPfYxf;t@#0zjQH_m6gTxO2@wx4d;*{e;m%;A9UX{aURS{ZohQLrQ7w-U6(!= z_Iqa_-OM+CjZ(JeltWFTeZ#kIckt{PyfWe~sKg)}+8rHYdkdkeeI229nH{PeQk)0~Jtd3IT<{ zuty+Add!>gVLui%0EK`;Kp~(IPzWdl6aoqXg@8gpA)pXY2q**;0tx|zfI>hapb$_9 zCy)5Kssx1QY@a0fm4hapb$_9Cy)5Kssx1QY@a0fm4<;MPFk{{uP#JiPz_ literal 0 HcmV?d00001 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 cfe7580f8e7..e3f4d4f576d 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 + edimax,cax1800) + ucidef_set_interfaces_lan_wan "lan" + ;; redmi,ax6|\ xiaomi,ax3600) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" 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 0a2908f13d4..7f919bafc5d 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 + edimax,cax1800|\ redmi,ax6|\ xiaomi,ax3600) caldata_extract "0:art" 0x1000 0x20000 diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh index f9c28fad093..d6e5d04a31e 100644 --- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh @@ -42,6 +42,9 @@ platform_pre_upgrade() { platform_do_upgrade() { case "$(board_name)" in + edimax,cax1800) + nand_do_upgrade "$1" + ;; redmi,ax6|\ xiaomi,ax3600) # Make sure that UART is enabled diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts new file mode 100644 index 00000000000..2c9cbd5b3cd --- /dev/null +++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts @@ -0,0 +1,322 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* Copyright (c) 2021, Dirk Buchwalder */ + +/dts-v1/; + +#include "ipq8074-512m.dtsi" +#include "ipq8074-ac-cpu.dtsi" +#include "ipq8074-ess.dtsi" +#include +#include + +/ { + model = "Edimax CAX1800"; + compatible = "edimax,cax1800", "qcom,ipq8074"; + + aliases { + serial0 = &blsp1_uart5; + led-boot = &led_system_red; + led-failsafe = &led_system_red; + led-running = &led_system_green; + led-upgrade = &led_system_red; + /* Aliases as required by u-boot to patch MAC addresses */ + ethernet0 = &dp5; + label-mac-device = &dp5; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 32 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_system_red: system-red { + label = "red:system"; + gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>; + }; + + led_system_green: system-green { + label = "green:system"; + gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>; + }; + + led_system_blue: system-blue { + label = "blue:system"; + gpios = <&tlmm 27 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; + }; + }; +}; + +&blsp1_uart5 { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&qpic_nand { + status = "okay"; + + nand@0 { + reg = <0>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "rootfs"; + reg = <0x0000000 0x3400000>; + }; + }; + }; +}; + +&blsp1_spi1 { + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + cs-select = <0>; + status = "ok"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + use-default-sizes; + + 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 0xa0000>; + read-only; + }; + + partition@530000 { + label = "0:appsbl_1"; + reg = <0x530000 0xa0000>; + read-only; + }; + + partition@5d0000 { + label = "0:art"; + reg = <0x5d0000 0x40000>; + read-only; + }; + + partition@610000 { + label = "0:ethphyfw"; + reg = <0x610000 0x80000>; + read-only; + }; + }; + }; +}; + +&mdio { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + + reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; + + qca8075: ethernet-phy@4 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <4>; + }; +}; + +&switch { + status = "okay"; + + switch_cpu_bmp = <0x1>; /* cpu port bitmap */ + switch_lan_bmp = <0x1e>; /* lan port bitmap */ + switch_wan_bmp = <0x20>; /* wan port bitmap */ + switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/ + switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/ + bm_tick_mode = <0>; /* bm tick mode */ + tm_tick_mode = <0>; /* tm tick mode */ + + qcom,port_phyinfo { + port@0 { + port_id = <1>; + phy_address = <0>; + }; + port@1 { + port_id = <2>; + phy_address = <1>; + }; + port@2 { + port_id = <3>; + phy_address = <2>; + }; + port@3 { + port_id = <4>; + phy_address = <3>; + }; + port@4 { + port_id = <5>; + phy_address = <4>; + }; + }; +}; + +&edma { + status = "okay"; +}; + +&dp5 { + status = "okay"; + phy-handle = <&qca8075>; + label = "lan"; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "Edimax-CAX1800"; + qcom,ath11k-fw-memory-mode = <1>; +}; diff --git a/target/linux/ipq807x/image/generic.mk b/target/linux/ipq807x/image/generic.mk index 7fd0169a64c..95937512a95 100644 --- a/target/linux/ipq807x/image/generic.mk +++ b/target/linux/ipq807x/image/generic.mk @@ -17,6 +17,19 @@ define Device/UbiFit IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef +define Device/edimax_cax1800 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Edimax + DEVICE_MODEL := CAX1800 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_DTS_CONFIG := config@ac03 + SOC := ipq8070 + DEVICE_PACKAGES := ipq-wifi-edimax_cax1800 +endef +TARGET_DEVICES += edimax_cax1800 + define Device/redmi_ax6 $(call Device/xiaomi_ax3600) DEVICE_VENDOR := Redmi -- 2.30.2