qualcommax: ipq60xx: add support for netgear wax214
authorDirk Buchwalder <buchwalder@posteo.de>
Sun, 3 Mar 2024 15:00:46 +0000 (16:00 +0100)
committerDirk Buchwalder <buchwalder@posteo.de>
Tue, 5 Mar 2024 05:34:35 +0000 (06:34 +0100)
    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 <buchwalder@posteo.de>
package/boot/uboot-envtools/files/qualcommax_ipq60xx
package/firmware/ipq-wifi/Makefile
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-wax214.dts [new file with mode: 0644]
target/linux/qualcommax/image/ipq60xx.mk
target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network
target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata
target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh

index df19a3033577b242eae9d919c9006f1b2e19f4d1..33cb94f99d18f15ebe85d86772f5a48ea67526b2 100644 (file)
@@ -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
index 959e7e4b10d28a83f721a99b68a6cef5c997a184..b6c1a34bde2a948de50c773109d699609c5fe44e 100644 (file)
@@ -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 (file)
index 0000000..90a4828
--- /dev/null
@@ -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 <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+       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 = <KEY_RESTART>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr: pwr {
+                       color = <LED_COLOR_ID_ORANGE>;
+                       function = LED_FUNCTION_POWER;
+                       gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
+               };
+
+               lan  {
+                       color = <LED_COLOR_ID_BLUE>;
+                       function = LED_FUNCTION_LAN;
+                       gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
+               };
+
+               wlan2g  {
+                       color = <LED_COLOR_ID_BLUE>;
+                       function = LED_FUNCTION_WLAN;
+                       function-enumerator = <0>;
+                       gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "phy0radio";
+               };
+
+               wlan5g  {
+                       color = <LED_COLOR_ID_BLUE>;
+                       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 = <ESS_PORT3>;
+       switch_mac_mode = <MAC_MODE_PSGMII>;
+       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
index 00dead93ad1f2984dfcd154d5fb04b5ab2fd9273..a7851e3dc586711550aa44b277efb32032573db1 100644 (file)
@@ -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
index 081d894e1eed3902627757d0e8823bc6e329a427..aaa2522c92831548e830dea97e54a7abfb0e7b78 100644 (file)
@@ -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"
                ;;
index c14722c799c430c2561608133fd8a55b7cd7056a..89d4c265abb5171eef6a411c0dc951f09b83d769 100644 (file)
@@ -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
        ;;
 *)
index 3d3c17b3b90d164e45730f50530dc063ce5aa3c8..4008cb0224193c15047304055063bc718ead04c5 100644 (file)
@@ -10,6 +10,9 @@ platform_check_image() {
 
 platform_do_upgrade() {
        case "$(board_name)" in
+       netgear,wax214)
+               nand_do_upgrade "$1"
+               ;;
        *)
                default_do_upgrade "$1"
                ;;