From c7abf512dc70e93b2883576e27c387b798d13040 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 11 Nov 2022 21:16:21 +0100 Subject: [PATCH] ath79: add support for LevelOne WAB-8010 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 --- .../ath79/dts/qca9563_levelone_wab-8010.dts | 181 ++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 1 + target/linux/ath79/image/generic.mk | 11 ++ 3 files changed, 193 insertions(+) create mode 100644 target/linux/ath79/dts/qca9563_levelone_wab-8010.dts 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 index 0000000000..7a96faf09a --- /dev/null +++ b/target/linux/ath79/dts/qca9563_levelone_wab-8010.dts @@ -0,0 +1,181 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca956x.dtsi" + +#include +#include + +/ { + 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 = ð0; + }; + + keys { + compatible = "gpio-keys"; + + /* GPIO-7 - Switch (LOW S - HIGH M) */ + reset { + label = "reset"; + linux,code = ; + 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 */ + >; + }; +}; + +ð0 { + 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"; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 339005f051..a2b1690232 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -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|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index e5bc73e5a6..213631839c 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -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 -- 2.30.2