From: Dirk Buchwalder Date: Sun, 3 Mar 2024 15:00:46 +0000 (+0100) Subject: qualcommax: ipq60xx: add support for netgear wax214 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=93610492b634c94e882dc048fde23d67a056ea1a;p=openwrt%2Fstaging%2Fwigyori.git qualcommax: ipq60xx: add support for netgear wax214 Netgear WAX214 is a 802.11 ax dual-band AP with PoE. (similar to Engenius EWS357APV3) Specifications: • CPU: Qualcomm IPQ6010 Quad core Cortex-A53 • RAM: 512MB of DDR3 • Storage: 128MB NAND (Macronix MX30UF1G18AC) • Ethernet: 1x 1G RJ45 port (QCA8072) PoE • WIFI: 2.4GHz: Qualcomm QCN5022 2x2 802.11b/g/n/ax 574 Mbps PHY rate 5GHz: Qualcomm QCN5052 2x2 802.11a/b/g/n/ac/ax 1201 PHY rate • LEDs: 4 x GPIO-controlled LEDs - 1 Power LED (orange) - 1 LAN LED (blue) - 1 WIFI 5g LED (blue) - 1 WIFI 2g LED (blue) black_small_square Buttons: 1x soft reset black_small_square Power: 12V DC jack or PoE (802.3af ) An populated serial header is onboard, format is 1.25mm 4p (DF13A-4P-1.25H) RX/TX is working, bootwait is active, secure boot is not enabled. The root password of the stock firmware is unknown, but failsafe mode can be entered to reset the password. Installation Instructions: - obtain serial access - stop auto boot (press "4", Entr boot command line interface) - setenv active_fw 0 (to boot from the primary rootfs, or set to 1 to boot from the secondary rootfs partition) - saveenv - tftpboot the initramfs image - bootm - copy openwrt-qualcommax-ipq60xx-netgear_wax214-squashfs-factory.ubi to the device - write the image to the NAND: - cat /proc/mtd and look for rootfs partition (should be mtd11, or mtd12 if you choose active_fw 1) - ubiformat /dev/mtd11 -f -y openwrt-qualcommax-ipq60xx-netgear_wax214-squashfs-factory.ubi - reboot Note: the firmware is senao-based. But I was unable to build a valid senao-header into the image. Maybe they changed the header format and senaoFW isn't working any more. Signed-off-by: Dirk Buchwalder --- diff --git a/package/boot/uboot-envtools/files/qualcommax_ipq60xx b/package/boot/uboot-envtools/files/qualcommax_ipq60xx index df19a30335..33cb94f99d 100644 --- a/package/boot/uboot-envtools/files/qualcommax_ipq60xx +++ b/package/boot/uboot-envtools/files/qualcommax_ipq60xx @@ -14,6 +14,11 @@ case "$board" in [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" ;; +netgear,wax214) + idx="$(find_mtd_index 0:appsblenv)" + [ -n "$idx" ] && \ + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2" + ;; esac config_load ubootenv diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 959e7e4b10..b6c1a34bde 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \ linksys_mx5300 \ netgear_lbr20 \ netgear_rax120v2 \ + netgear_wax214 \ netgear_wax218 \ netgear_wax620 \ netgear_wax630 \ @@ -157,6 +158,7 @@ $(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200)) $(eval $(call generate-ipq-wifi-package,linksys_mx5300,Linksys MX5300)) $(eval $(call generate-ipq-wifi-package,netgear_lbr20,Netgear LBR20)) $(eval $(call generate-ipq-wifi-package,netgear_rax120v2,Netgear RAX120v2)) +$(eval $(call generate-ipq-wifi-package,netgear_wax214,Netgear WAX214)) $(eval $(call generate-ipq-wifi-package,netgear_wax218,Netgear WAX218)) $(eval $(call generate-ipq-wifi-package,netgear_wax620,Netgear WAX620)) $(eval $(call generate-ipq-wifi-package,netgear_wax630,Netgear WAX630)) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-wax214.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-wax214.dts new file mode 100644 index 0000000000..90a4828c17 --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-wax214.dts @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: (GPL-2.0+) + +/dts-v1/; + +#include "ipq6018.dtsi" +#include "ipq6018-cp-cpu.dtsi" +#include "ipq6018-ess.dtsi" +#include +#include +#include + +/ { + model = "Netgear WAX214"; + compatible = "netgear,wax214", "qcom,ipq6018"; + + aliases { + serial0 = &blsp1_uart3; + ethernet0 = &dp3; + label-mac-device = &dp3; + led-boot = &pwr; + led-failsafe = &pwr; + led-running = &pwr; + led-upgrade = &pwr; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + pwr: pwr { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>; + }; + + lan { + color = ; + function = LED_FUNCTION_LAN; + gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>; + }; + + wlan2g { + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <0>; + gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0radio"; + }; + + wlan5g { + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <1>; + gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1radio"; + }; + }; +}; + +&blsp1_uart3 { + pinctrl-0 = <&serial_3_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&tlmm { + mdio_pins: mdio-pins { + mdc { + pins = "gpio64"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + + mdio { + pins = "gpio65"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + }; +}; + +&dp3 { + status = "okay"; + + phy-handle = <&qca8072_4>; + label = "lan"; +}; + +&edma { + status = "okay"; +}; + +&mdio { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; + reset-delay-us = <10000>; + reset-post-delay-us = <50000>; + + ethernet-phy-package@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "qcom,qca8075-package"; + reg = <0>; + + qcom,package-mode = "psgmii"; + + qca8072_4: ethernet-phy@4 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <4>; + }; + }; +}; + +&switch { + status = "okay"; + + switch_lan_bmp = ; + switch_mac_mode = ; + port3_pcs_channel = <4>; + + qcom,port_phyinfo { + port@3 { + port_id = <3>; + phy_address = <4>; + }; + }; +}; + +&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 = "qcom,smem-part"; + }; + }; +}; + + +&wifi { + status = "okay"; + qcom,ath11k-fw-memory-mode = <1>; + qcom,ath11k-calibration-variant = "Netgear-WAX214"; +}; \ No newline at end of file diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index 00dead93ad..a7851e3dc5 100644 --- a/target/linux/qualcommax/image/ipq60xx.mk +++ b/target/linux/qualcommax/image/ipq60xx.mk @@ -10,3 +10,16 @@ define Device/8devices_mango-dvk DEVICE_PACKAGES := ipq-wifi-8devices_mango endef TARGET_DEVICES += 8devices_mango-dvk + +define Device/netgear_wax214 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Netgear + DEVICE_MODEL := WAX214 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_DTS_CONFIG := config@cp03-c1 + SOC := ipq6010 + DEVICE_PACKAGES := ipq-wifi-netgear_wax214 +endef +TARGET_DEVICES += netgear_wax214 diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network index 081d894e1e..aaa2522c92 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network @@ -14,6 +14,9 @@ ipq60xx_setup_interfaces() 8devices,mango-dvk) ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" ;; + netgear,wax214) + ucidef_set_interfaces_lan_wan "lan" + ;; *) echo "Unsupported hardware. Network interfaces not initialized" ;; diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata index c14722c799..89d4c265ab 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata @@ -12,6 +12,9 @@ case "$FIRMWARE" in 8devices,mango-dvk) caldata_extract "0:ART" 0x1000 0x20000 ;; + netgear,wax214) + caldata_extract "0:art" 0x1000 0x10000 + ;; esac ;; *) diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh index 3d3c17b3b9..4008cb0224 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh @@ -10,6 +10,9 @@ platform_check_image() { platform_do_upgrade() { case "$(board_name)" in + netgear,wax214) + nand_do_upgrade "$1" + ;; *) default_do_upgrade "$1" ;;