ath79: add support for LevelOne WAB-8010 wab8010
authorDavid Bauer <mail@david-bauer.net>
Fri, 11 Nov 2022 20:16:21 +0000 (21:16 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sat, 12 Nov 2022 14:08:25 +0000 (15:08 +0100)
Hardware
--------
Qualcomm Atheros QCA9563
64M DDR2 RAM
16M SPI-NOR (Macronix MX25L12805D)
Qualcomm Atheros AR8334
Qualcomm Atheros QCA9886 2T2R 802.11ac Wave 2

Button: Reset-Button, Mode-Switch
LED:    WLAN, ETH0/1, RSSI, SYS

UART: Pinholes next to CPU (labled)
      Don't connect 3V3!
      115200 - 8N1

Installation
------------

Rename the tftp factory-image to upgrade.bin and make it available using
a tftp server with the IP address 192.168.0.141/24.

Connect your computer to the WAN port of the AP. Power on the AP while
keeping the reset-button pressed.

The device will install OpenWrt and reboot afterwards.

Vendor-FW shell-access
----------------------

Shell-access to the vendor-firmware can be obtained by configuring the
remote-syslog server to "$(passwd -d root)". Password-less root-access
is possible afterwards usin the already running telnet/SSH server or
UART console.

Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/ath79/dts/qca9563_levelone_wab-8010.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/image/generic.mk

diff --git a/target/linux/ath79/dts/qca9563_levelone_wab-8010.dts b/target/linux/ath79/dts/qca9563_levelone_wab-8010.dts
new file mode 100644 (file)
index 0000000..7a96faf
--- /dev/null
@@ -0,0 +1,181 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca956x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "LevelOne WAB-8010";
+       compatible = "levelone,wab-8010", "qca,qca9563";
+
+       aliases {
+               led-boot = &led_system;
+               led-failsafe = &led_system;
+               led-running = &led_system;
+               led-upgrade = &led_system;
+               label-mac-device = &eth0;
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               /* GPIO-7 - Switch (LOW S - HIGH M) */
+               reset {
+                       label = "reset";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&jtag_disable_pins>;
+
+               led_system: system {
+                       label = "green:system";
+                       gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+               };
+
+               signal0 {
+                       label = "green:signal0";
+                       gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+               };
+
+               signal1 {
+                       label = "green:signal1";
+                       gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+               };
+
+               signal2 {
+                       label = "green:signal2";
+                       gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+               };
+
+               signal3 {
+                       label = "green:signal3";
+                       gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&spi {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <50000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x40000>;
+                               read-only;
+                       };
+
+                       partition@40000 {
+                               label = "u-boot-env";
+                               reg = <0x40000 0x10000>;
+                       };
+
+                       partition@50000 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               reg = <0x50000 0xfa0000>;
+                       };
+
+                       art: partition@ff0000 {
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               label = "art";
+                               reg = <0xff0000 0x10000>;
+                               read-only;
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               precalibration_ath10k: pre-calibration@5000 {
+                                       reg = <0x5000 0x2f20>;
+                               };
+                       };
+               };
+       };
+};
+
+&mdio0 {
+       status = "okay";
+
+       phy-mask = <0x1>;
+
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+               phy-mode = "sgmii";
+
+               qca,ar8327-initvals = <
+                       0x04 0x00000080 /* PORT0 PAD MODE CTRL */
+                       0x08 0x01000000 /* PORT5 PAD MODE CTRL */
+                       0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
+                       0x10 0x602613a0 /* POWER_ON_STRAP */
+                       0x50 0xcf35cf35 /* LED_CTRL0 */
+                       0x54 0xca35ca35 /* LED_CTRL1 */
+                       0x58 0xc935c935 /* LED_CTRL2 */
+                       0x5c 0x03ffff00 /* LED_CTRL3 */
+                       0x7c 0x000000fe /* PORT0_STATUS */
+                       0x94 0x000010c2 /* PORT6_STATUS */
+                       0xe0 0xc74164de /* SGMII_CTRL */
+               >;
+       };
+};
+
+&eth0 {
+       status = "okay";
+
+       phy-mode = "sgmii";
+       phy-handle = <&phy0>;
+
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       status = "disabled";
+
+       /* The 2.4 GHz radio is not connected to the antenna.
+        * However it is configured in the vendor-firmware and
+        * has caldata on-chip.
+        *
+        * As the device does not promote 2.4 GHz capability, keep
+        * the radio disabled.
+        */
+
+       mac-address-increment = <1>;
+
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&pcie {
+       status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0 0 0 0 0>;
+
+               mac-address-increment = <2>;
+
+               nvmem-cells = <&macaddr_art_0>, <&precalibration_ath10k>;
+               nvmem-cell-names = "mac-address", "pre-calibration";
+       };
+};
index 339005f051768603de1993966aa41d7554ded494..a2b1690232a40f42eb93b049c7e35cb2151f0486 100644 (file)
@@ -378,6 +378,7 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan"
                ;;
+       levelone,wab-8010|\
        nec,wg1200cr|\
        qxwlan,e1700ac-v2-8m|\
        qxwlan,e1700ac-v2-16m|\
index e5bc73e5a6c50fc414d92c80d2a1604f5391848a..213631839c15e06d6867b80df87bd1b59a912622 100644 (file)
@@ -1584,6 +1584,17 @@ define Device/letv_lba-047-ch
 endef
 TARGET_DEVICES += letv_lba-047-ch
 
+define Device/levelone_wab-8010
+  SOC := qca9563
+  DEVICE_VENDOR := LevelOne
+  DEVICE_MODEL := WAB-8010
+  IMAGE_SIZE := 16000k
+  IMAGES += tftp.bin
+  IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+endef
+TARGET_DEVICES += levelone_wab-8010
+
 define Device/librerouter_librerouter-v1
   SOC := qca9558
   DEVICE_VENDOR := Librerouter