ath79: add support for Dell SonicPoint ACi APL27-0B1
authorTomasz Maciej Nowak <tmn505@gmail.com>
Thu, 29 May 2025 20:15:16 +0000 (22:15 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 12 Jul 2025 23:03:36 +0000 (01:03 +0200)
Dell/SonicWall APL27-0B1 (marketed as SonicPoint ACi) is a dual band
wireless access point. Very similar to already supported APL26-0AE,
which all antennas are external, while this variant has internal
antennas. End of life as of 2022-07-31.

Specification
SoC: QualcommAtheros QCA9550
RAM: 256 MB DDR2
Flash: 32 MB SPI NOR
WIFI: 2.4 GHz 3T3R integrated
      5 GHz 3T3R QCA9890 oversized Mini PCIe card
Ethernet: 2x 10/100/1000 Mbps QCA8334
          port labeled lan1 is PoE capable (802.3at)
USB: 1x 2.0
LEDs: LEDs: 6x which 5 are GPIO controlled and two of them are dual color
Buttons: 1x GPIO controlled
Serial: RJ-45 port, SonicWall pinout
        baud: 115200, parity: none, flow control: none

Before flashing, be sure to have a copy of factory firmware, in case You
wish to revert to original firmware.

Installation
1. Prepare TFTP server with OpenWrt sysupgrade image and rename that
   image to "ap135.bin".
2. Connect to one of LAN ports.
3. Connect to serial port.
4. Hold the reset button (small through hole on side of the unit),
   power on the device and when prompted to stop autoboot, hit any key.
   The held button can now be released.
5. Alter U-Boot environment with following commands:
    setenv bootcmd bootm 0x9F110000
    saveenv
6. Adjust "ipaddr" (access point, default is 192.168.1.1) and "serverip"
   (TFTP server, default is 192.168.1.10) addresses in U-Boot
   environment, then run following commands:
    tftp 0x80060000 ap135.bin
    erase 0x9F110000 +0x1EF0000
    cp.b 0x80060000 0x9F110000 $filesize
7. After successful flashing, execute:
    boot
8. The access point will boot to OpenWrt. Wait few minutes, until the
    wrench LED will stop blinking, then it's ready for configuration.

Notes
By default no power is provided on USB port, so attached USB devices
won't enumerate. To change that enable regulator with:
echo "enabled" > /sys/devices/platform/output-usb-vbus/state
To disable power write "disabled" to the same file.
Ther regulator state will reset on reboot, consider running this command
on hotplug event or add it to /etc/rc.local. The hotplug event should
look like this:
if [ "${PRODUCT}" = "1d6b/2/606" ] && [ "${ACTION}" = "add" ]; then
echo "enabled" > /sys/devices/platform/output-usb-vbus/state
fi
Place it in /etc/hotplug.d/usb/10-usb-power.

Known issues
Initramfs image can't be bigger than specified kernel size, otherwise
bootloader will throw LZMA decompressing error. Switching to lzma-loader
should workaround that.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250529202033.28250-2-tmn505@terefe.re/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-tools/uboot-envtools/files/ath79
target/linux/ath79/dts/qca9550_dell_apl26-0ae.dts
target/linux/ath79/dts/qca9550_dell_apl27-0b1.dts [new file with mode: 0644]
target/linux/ath79/dts/qca9550_dell_apl2x.dtsi [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

index f275244cbe80c480ae819b0382d3ac719cf1ac01..f544bfaf79b58f6cf1a8827a2307b1fd343cdd0e 100644 (file)
@@ -111,7 +111,8 @@ buffalo,wzr-hp-g300nh-s|\
 linksys,ea4500-v3)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
        ;;
-dell,apl26-0ae)
+dell,apl26-0ae|\
+dell,apl27-0b1)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x10000"
        ;;
 domywifi,dw33d)
index 6ef2eb846d8701a8ed30d21d73a999c3875b5ea5..044de5add3209dec74277e84c08fa2438a6c5a84 100644 (file)
@@ -1,29 +1,14 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/leds/common.h>
-
-#include "qca955x.dtsi"
+#include "qca9550_dell_apl2x.dtsi"
 
 / {
        model = "Dell SonicPoint ACe (APL26-0AE)";
        compatible = "dell,apl26-0ae", "qca,qca9550", "qca,qca9558";
 
-       aliases {
-               label-mac-device = &eth0;
-               led-boot = &led_wrench;
-               led-failsafe = &led_wrench;
-               led-upgrade = &led_wrench;
-       };
-
        keys {
-               compatible = "gpio-keys";
-
                button-reset {
-                       label = "reset";
                        gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_RESTART>;
                };
 
                /* Accessible only after disassembling the casing */
        };
 
        leds {
-               compatible = "gpio-leds";
-               pinctrl-names = "default";
-               pinctrl-0 = <&jtag_disable_pins>;
-
                led-lan1-amber {
-                       color = <LED_COLOR_ID_AMBER>;
-                       function = LED_FUNCTION_LAN;
-                       function-enumerator = <1>;
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
 
                led-lan1-green {
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_LAN;
-                       function-enumerator = <1>;
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
                };
 
                led-lan2-amber {
-                       color = <LED_COLOR_ID_AMBER>;
-                       function = LED_FUNCTION_LAN;
-                       function-enumerator = <2>;
                        gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
                };
 
                led-lan2-green {
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_LAN;
-                       function-enumerator = <2>;
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                };
 
                led-wlan2g {
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_WLAN_2GHZ;
-                       linux,default-trigger = "phy1tpt";
                        gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
                };
 
                led-wlan5g {
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_WLAN_5GHZ;
-                       linux,default-trigger = "phy0tpt";
                        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
                };
 
-               led_wrench: led-wrench {
-                       color = <LED_COLOR_ID_AMBER>;
-                       function = LED_FUNCTION_STATUS;
+               led-wrench {
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
-&eth0 {
-       status = "okay";
-
-       nvmem-cells = <&macaddr_sysinfo_50 0>;
-       nvmem-cell-names = "mac-address";
-       phy-handle = <&phy0>;
-       pll-data = <0xa6000000 0x00000101 0x00001616>;
-};
-
-&eth1 {
-       status = "okay";
-
-       nvmem-cells = <&macaddr_sysinfo_50 1>;
-       nvmem-cell-names = "mac-address";
-       pll-data = <0x03000101 0x00000101 0x00001616>;
-
-       fixed-link {
-               speed = <1000>;
-               full-duplex;
-       };
-};
-
-&mdio0 {
-       status = "okay";
-
-       phy0: ethernet-phy@0 {
-               reg = <0>;
-
-               qca,ar8327-initvals = <
-                       0x04 0x07680000 /* PORT0 PAD MODE CTRL */
-                       0x0c 0x00000080 /* PORT6 PAD MODE CTRL */
-                       0x10 0x40000000 /* POWER_ON_STRAP */
-                       0x50 0xffb7c405 /* LED0 CTRL */
-                       0x54 0xffb7c305 /* LED1 CTRL */
-                       0x58 0xffb7c033 /* LED2 CTRL */
-                       0x5c 0x03ffff00 /* LED3 CTRL */
-                       0x7c 0x0000007e /* PORT0_STATUS */
-                       0x94 0x0000007e /* PORT6_STATUS */
-               >;
-       };
-};
-
 &pcie0 {
-       status = "okay";
-
        wifi@0,0 {
-               compatible = "qcom,ath10k";
-               reg = <0x0000 0 0 0 0>;
-
                /* OEM overwrites EEPROM stored adress and so do we */
                nvmem-cells = <&macaddr_sysinfo_50 2>;
                nvmem-cell-names = "mac-address";
 };
 
 &spi {
-       status = "okay";
-
        flash@0 {
-               compatible = "jedec,spi-nor";
-               reg = <0>;
-               spi-max-frequency = <25000000>;
                broken-flash-reset;
-
-               partitions {
-                       compatible = "fixed-partitions";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x0080000>;
-                               read-only;
-                       };
-
-                       partition@80000 {
-                               label = "u-boot-env";
-                               reg = <0x0080000 0x0040000>;
-                       };
-
-                       partition@c0000 {
-                               label = "sysinfo";
-                               reg = <0x00c0000 0x0040000>;
-                               read-only;
-
-                               nvmem-layout {
-                                       compatible = "fixed-layout";
-                                       #address-cells = <1>;
-                                       #size-cells = <1>;
-
-                                       macaddr_sysinfo_50: macaddr@50 {
-                                               compatible = "mac-base";
-                                               reg = <0x50 0x6>;
-                                               #nvmem-cell-cells = <1>;
-                                       };
-                               };
-                       };
-
-                       partition@100000 {
-                               label = "art";
-                               reg = <0x0100000 0x0010000>;
-                               read-only;
-
-                               nvmem-layout {
-                                       compatible = "fixed-layout";
-                                       #address-cells = <1>;
-                                       #size-cells = <1>;
-
-                                       cal_art_1000: calibration@1000 {
-                                               reg = <0x1000 0x440>;
-                                       };
-                               };
-                       };
-
-                       partition@110000 {
-                               label = "firmware";
-                               reg = <0x0110000 0x1ef0000>;
-                               compatible = "denx,uimage";
-                       };
-               };
        };
 };
-
-&usb_phy0 {
-       status = "okay";
-};
-
-&usb0 {
-       status = "okay";
-};
-
-&wmac {
-       status = "okay";
-
-       nvmem-cells = <&macaddr_sysinfo_50 10>, <&cal_art_1000>;
-       nvmem-cell-names = "mac-address", "calibration";
-};
diff --git a/target/linux/ath79/dts/qca9550_dell_apl27-0b1.dts b/target/linux/ath79/dts/qca9550_dell_apl27-0b1.dts
new file mode 100644 (file)
index 0000000..28d78f2
--- /dev/null
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9550_dell_apl2x.dtsi"
+
+/ {
+       model = "Dell SonicPoint ACi (APL27-0B1)";
+       compatible = "dell,apl27-0b1", "qca,qca9550", "qca,qca9558";
+
+       keys {
+               button-reset {
+                       gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       leds {
+               led-lan1-amber {
+                       gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+               };
+
+               led-lan1-green {
+                       gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+               };
+
+               led-lan2-amber {
+                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+               };
+
+               led-lan2-green {
+                       gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+               };
+
+               led-wlan2g {
+                       gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
+               };
+
+               led-wlan5g {
+                       gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+               };
+
+               led-wrench {
+                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       reg_usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb-vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+       };
+
+       output-usb-vbus {
+               compatible = "regulator-output";
+               vout-supply = <&reg_usb_vbus>;
+       };
+};
+
+&pcie0 {
+       wifi@0,0 {
+               nvmem-cells = <&macaddr_sysinfo_50 2>, <&cal_art_5000>;
+               nvmem-cell-names = "mac-address", "calibration";
+       };
+};
+
+&spi {
+       flash@0 {
+               partitions {
+                       partition@100000 {
+                               nvmem-layout {
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/target/linux/ath79/dts/qca9550_dell_apl2x.dtsi b/target/linux/ath79/dts/qca9550_dell_apl2x.dtsi
new file mode 100644 (file)
index 0000000..bcc558e
--- /dev/null
@@ -0,0 +1,207 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+#include "qca955x.dtsi"
+
+/ {
+       aliases {
+               label-mac-device = &eth0;
+               led-boot = &led_wrench;
+               led-failsafe = &led_wrench;
+               led-upgrade = &led_wrench;
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               button-reset {
+                       label = "reset";
+                       linux,code = <KEY_RESTART>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&jtag_disable_pins>;
+
+               led-lan1-amber {
+                       color = <LED_COLOR_ID_AMBER>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <1>;
+               };
+
+               led-lan1-green {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <1>;
+               };
+
+               led-lan2-amber {
+                       color = <LED_COLOR_ID_AMBER>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <2>;
+               };
+
+               led-lan2-green {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <2>;
+               };
+
+               led-wlan2g {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_WLAN_2GHZ;
+                       linux,default-trigger = "phy1tpt";
+               };
+
+               led-wlan5g {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_WLAN_5GHZ;
+                       linux,default-trigger = "phy0tpt";
+               };
+
+               led_wrench: led-wrench {
+                       color = <LED_COLOR_ID_AMBER>;
+                       function = LED_FUNCTION_STATUS;
+               };
+       };
+};
+
+&eth0 {
+       status = "okay";
+
+       nvmem-cells = <&macaddr_sysinfo_50 0>;
+       nvmem-cell-names = "mac-address";
+       phy-handle = <&phy0>;
+       pll-data = <0xa6000000 0x00000101 0x00001616>;
+};
+
+&eth1 {
+       status = "okay";
+
+       nvmem-cells = <&macaddr_sysinfo_50 1>;
+       nvmem-cell-names = "mac-address";
+       pll-data = <0x03000101 0x00000101 0x00001616>;
+
+       fixed-link {
+               speed = <1000>;
+               full-duplex;
+       };
+};
+
+&mdio0 {
+       status = "okay";
+
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+
+               qca,ar8327-initvals = <
+                       0x04 0x07680000 /* PORT0 PAD MODE CTRL */
+                       0x0c 0x00000080 /* PORT6 PAD MODE CTRL */
+                       0x10 0x40000000 /* POWER_ON_STRAP */
+                       0x50 0xffb7c405 /* LED0 CTRL */
+                       0x54 0xffb7c305 /* LED1 CTRL */
+                       0x58 0xffb7c033 /* LED2 CTRL */
+                       0x5c 0x03ffff00 /* LED3 CTRL */
+                       0x7c 0x0000007e /* PORT0_STATUS */
+                       0x94 0x0000007e /* PORT6_STATUS */
+               >;
+       };
+};
+
+&pcie0 {
+       status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+       };
+};
+
+&spi {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <25000000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0000000 0x0080000>;
+                               read-only;
+                       };
+
+                       partition@80000 {
+                               label = "u-boot-env";
+                               reg = <0x0080000 0x0040000>;
+                       };
+
+                       partition@c0000 {
+                               label = "sysinfo";
+                               reg = <0x00c0000 0x0040000>;
+                               read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_sysinfo_50: macaddr@50 {
+                                               compatible = "mac-base";
+                                               reg = <0x50 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
+                       };
+
+                       partition@100000 {
+                               label = "art";
+                               reg = <0x0100000 0x0010000>;
+                               read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+                               };
+                       };
+
+                       partition@110000 {
+                               label = "firmware";
+                               reg = <0x0110000 0x1ef0000>;
+                               compatible = "denx,uimage";
+                       };
+               };
+       };
+};
+
+&usb_phy0 {
+       status = "okay";
+};
+
+&usb0 {
+       status = "okay";
+};
+
+&wmac {
+       status = "okay";
+
+       nvmem-cells = <&macaddr_sysinfo_50 10>, <&cal_art_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
+};
index 41075634398d2ca3bc54676b09a81ca8b1511ad8..9ebdcdca6facd770e14cde4193ee0f4c92121ef6 100644 (file)
@@ -234,7 +234,8 @@ compex,wpj531-16m)
        ucidef_set_led_rssi "sig3" "SIG3" "green:sig3" "wlan0" "65" "100"
        ucidef_set_led_rssi "sig4" "SIG4" "green:sig4" "wlan0" "50" "100"
        ;;
-dell,apl26-0ae)
+dell,apl26-0ae|\
+dell,apl27-0b1)
        ucidef_set_led_switch "lan1" "LAN1" "amber:lan-1" "switch0" "0x04"
        ucidef_set_led_switch "lan2" "LAN2" "amber:lan-2" "switch0" "0x08"
        ;;
index d999784d6a2d654b0da3c97e5ad3cf8444d208d8..545bc14e36613fe88f6ea6001a8519662e3c7ef2 100644 (file)
@@ -298,7 +298,8 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "1:wan" "5:lan" "6@eth0"
                ;;
-       dell,apl26-0ae)
+       dell,apl26-0ae|\
+       dell,apl27-0b1)
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan:1" "3:lan:2" "6@eth1"
                ;;
index b74a22ba4d6bb73384619af089dc2d3c78b911b6..6e97960207ad6ca7142b45604df006da870ebbab 100644 (file)
@@ -978,22 +978,34 @@ define Device/compex_wpj563
 endef
 TARGET_DEVICES += compex_wpj563
 
-define Device/dell_apl26-0ae
+define Device/dell_apl2x
   SOC := qca9550
   DEVICE_VENDOR := Dell
   DEVICE_MODEL := SonicPoint
-  DEVICE_VARIANT := ACe (APL26-0AE)
   DEVICE_ALT0_VENDOR := SonicWall
   DEVICE_ALT0_MODEL := SonicPoint
-  DEVICE_ALT0_VARIANT := ACe (APL26-0AE)
   DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct kmod-usb2
   KERNEL_SIZE := 5952k
   IMAGE_SIZE := 31680k
   IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
        append-rootfs | pad-rootfs | check-size | append-metadata
 endef
+
+define Device/dell_apl26-0ae
+  $(Device/dell_apl2x)
+  DEVICE_VARIANT := ACe (APL26-0AE)
+  DEVICE_ALT0_VARIANT := ACe (APL26-0AE)
+endef
 TARGET_DEVICES += dell_apl26-0ae
 
+define Device/dell_apl27-0b1
+  $(Device/dell_apl2x)
+  DEVICE_VARIANT := ACi (APL27-0B1)
+  DEVICE_ALT0_VARIANT := ACi (APL27-0B1)
+  DEVICE_PACKAGES += kmod-regulator-userspace-consumer
+endef
+TARGET_DEVICES += dell_apl27-0b1
+
 define Device/devolo_dlan-pro-1200plus-ac
   SOC := ar9344
   DEVICE_VENDOR := devolo