ath79: add support for ALFA Network WiFi CampPro Nano Duo
authorPiotr Dymacz <pepe2k@gmail.com>
Mon, 22 Apr 2024 09:01:52 +0000 (11:01 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Tue, 22 Oct 2024 10:25:58 +0000 (12:25 +0200)
ALFA Network WiFi CampPro Nano Duo is a dual-radio Wi-Fi signal extender
(router) in USB dongle form-factor (Type-A plug is used only for power),
based on combination of two radio chipsets: Qualcomm QCA9531 (main SOC)
and MediaTek MT7610U (connected over USB 2.0 interface).

Specifications:

- SOC:      QCA9531 v2 (650 MHz)
- DRAM:     DDR2 128 MiB (Nanya NT5TU64M16HG-AC)
- Flash:    16 MiB SPI NOR (Macronix MX25L12835F)
- Ethernet: 1x 10/100 Mbps Ethernet (QCA9531)
- Wi-Fi:    2x2:2 2.4   GHz Wi-Fi 4 (QCA9531)
            1x1:1 2.4/5 GHz Wi-Fi 5 (MT7610U)
- Antenna:  3x RP-SMA (female) antenna connectors
- LED:      1x orange (RJ45, power indicator)
            2x green  (status + RJ45 activity/link)
            1x blue   (Wi-Fi 2.4 GHz status)
- Button:   1x button (reset)
- UART:     1x 4-pin, 2.00 mm pitch header on PCB
- Other:    external h/w watchdog (EM6324QYSP5B, enabled by default)
            GPIO-controlled USB power for MT7610U

MAC addresses:

- LAN:                 00:c0:ca:xx:xx:6d (art 0x2, -1)
- 2.4 GHz (QCA9531):   00:c0:ca:xx:xx:6e (art 0x2, device's label)
- 2.4/5 GHz (MT7610U): 00:c0:ca:xx:xx:6f (from eeprom)

Flash instructions:

You can use sysupgrade image directly in vendor firmware which is based
on LEDE/OpenWrt. Alternatively, you can use web recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24.
2. Connect PC with RJ45 port, press the reset button, power up device,
   wait for first blink of status LED (indicates network setup), then
   keep button for 3 following blinks and release it.
3. Open 192.168.1.1 address in your browser and upload sysupgrade image.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
target/linux/ath79/dts/qca9531_alfa-network_wifi-camppro-nano-duo.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/image/generic.mk

diff --git a/target/linux/ath79/dts/qca9531_alfa-network_wifi-camppro-nano-duo.dts b/target/linux/ath79/dts/qca9531_alfa-network_wifi-camppro-nano-duo.dts
new file mode 100644 (file)
index 0000000..e505081
--- /dev/null
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include <dt-bindings/leds/common.h>
+
+#include "qca9531_alfa-network_r36a.dtsi"
+
+/ {
+       model = "ALFA Network WiFi CampPro Nano Duo";
+       compatible = "alfa-network,wifi-camppro-nano-duo", "qca,qca9531";
+
+       aliases {
+               led-boot = &led_status;
+               led-failsafe = &led_status;
+               led-running = &led_status;
+               led-upgrade = &led_status;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&enable_gpio4>;
+
+               lan {
+                       function = LED_FUNCTION_LAN;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+               };
+
+               led_status: status {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+               };
+
+               wlan2g {
+                       function = LED_FUNCTION_WLAN_2GHZ;
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy1tpt";
+               };
+       };
+};
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_1002 (-1)>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       compatible = "syscon", "simple-mfd";
+};
+
+&gpio_export {
+       usb-power {
+               gpio-export,name = "usb-power";
+               gpio-export,output = <0>;
+               gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+       };
+};
index 143309a8b242f1b4e1f9b32bd4a655c0086165d3..0e5731dd743186f2ad11b3d8c70db10ec25a3ce2 100644 (file)
@@ -22,6 +22,7 @@ alcatel,hh40v)
        ;;
 alfa-network,ap121f|\
 alfa-network,ap121fe|\
+alfa-network,wifi-camppro-nano-duo|\
 avm,fritz450e|\
 glinet,6408|\
 glinet,6416|\
index 2ad4c899e092b5e98101980e1a5575b5414c84a0..8474c1c4c2df00ad7b681eec71f4133a6c66b83a 100644 (file)
@@ -14,6 +14,7 @@ ath79_setup_interfaces()
        alfa-network,ap121f|\
        alfa-network,pi-wifi4|\
        alfa-network,tube-2hq|\
+       alfa-network,wifi-camppro-nano-duo|\
        araknis,an-300-ap-i-n|\
        araknis,an-500-ap-i-ac|\
        araknis,an-700-ap-i-ac|\
@@ -622,6 +623,7 @@ ath79_setup_macs()
        alfa-network,pi-wifi4|\
        alfa-network,r36a|\
        alfa-network,tube-2hq|\
+       alfa-network,wifi-camppro-nano-duo|\
        engenius,eap300-v2|\
        engenius,ens202ext-v1)
                label_mac=$(mtd_get_mac_binary art 0x1002)
index 06448f21723d1d24256215a68fe622ca5b7c15f7..c075f050db2298b026a5081b49080ee2a1652505 100644 (file)
@@ -346,6 +346,16 @@ define Device/alfa-network_tube-2hq
 endef
 TARGET_DEVICES += alfa-network_tube-2hq
 
+define Device/alfa-network_wifi-camppro-nano-duo
+  SOC := qca9531
+  DEVICE_VENDOR := ALFA Network
+  DEVICE_MODEL := WiFi CampPro Nano Duo
+  DEVICE_PACKAGES := kmod-usb2 kmod-mt76x0u -swconfig
+  IMAGE_SIZE := 15872k
+  SUPPORTED_DEVICES += campnano-duo
+endef
+TARGET_DEVICES += alfa-network_wifi-camppro-nano-duo
+
 define Device/allnet_all-wap02860ac
   $(Device/senao_loader_okli)
   SOC := qca9558