Skip to content

Commit

Permalink
ipq807x: add Arcadyan AW1000 support
Browse files Browse the repository at this point in the history
Hardware specification:
  SoC: Qualcomm IPQ8072A
  Flash: Toshiba NAND 1GiB
  RAM: 1 GiB of DDR3 466 MHz
  Ethernet: 4x 1Gbps + 1x 2.5Gbps
  WiFi1: QCN5024 2.4GHz ax 4x4
  WiFi2: QCN5054 5GHz ax 4x4
  Button: WiFi, WPS, Reset
  Modem: RG500Q-EA
  USB: 1 x USB 3.0
  Power: DC 12V 4A

Flash instructions:
  1. Download the initramfs image, rename it to
     initramfs.bin, and host it with tftp server.
  2. Interrupt U-Boot and run these commands:
     tftpboot initramfs.bin
     bootm
  3. After openwrt boots up, use scp or luci web
     to upload sysupgrade.bin to upgrade.

Signed-off-by: Chukun Pan <[email protected]>
Reviewed-by: Robert Marko <[email protected]>
  • Loading branch information
aiamadeus authored and Ansuel committed Dec 13, 2023
1 parent ab6a029 commit fbcda36
Show file tree
Hide file tree
Showing 8 changed files with 393 additions and 8 deletions.
2 changes: 2 additions & 0 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ endef
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>

ALLWIFIBOARDS:= \
arcadyan_aw1000 \
buffalo_wxr-5950ax12 \
compex_wpq873 \
dynalink_dl-wrx36 \
Expand Down Expand Up @@ -136,6 +137,7 @@ endef
# Board files should follow this name structure:
# board-<devicename>.<qca4019|qca9888|qca9889|qca9984|qca99x0|ipq8074>

$(eval $(call generate-ipq-wifi-package,arcadyan_aw1000,Arcadyan AW1000))
$(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
$(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))
$(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/* Copyright (c) 2023, Chukun Pan <[email protected]> */

/dts-v1/;

#include "ipq8074.dtsi"
#include "ipq8074-hk-cpu.dtsi"
#include "ipq8074-ess.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
model = "Arcadyan AW1000";
compatible = "arcadyan,aw1000", "qcom,ipq8074";

aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
serial0 = &blsp1_uart5;
/*
* Aliases as required by u-boot
* to patch MAC addresses
*/
ethernet0 = &dp1;
ethernet1 = &dp2;
ethernet2 = &dp3;
ethernet3 = &dp4;
ethernet4 = &dp6_syn;
label-mac-device = &dp1;
};

chosen {
stdout-path = "serial0:115200n8";
bootargs-append = " root=/dev/ubiblock0_1";
};

gpio-export {
compatible = "gpio-export";

lte-pwrkey {
gpio-export,name = "lte_pwrkey";
gpio-export,output = <1>;
gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
};

lte-power {
gpio-export,name = "lte_power";
gpio-export,output = <1>;
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
};

lte-reset {
gpio-export,name = "lte_reset";
gpio-export,output = <1>;
gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
};

usb-vbus {
gpio-export,name = "usb_vbus";
gpio-export,output = <0>;
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
};
};

keys {
compatible = "gpio-keys";

wlan {
label = "wlan";
linux,code = <KEY_WLAN>;
gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
};

wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
};

reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
};
};

led-spi {
compatible = "spi-gpio";
#address-cells = <1>;
#size-cells = <0>;

sck-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
mosi-gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;

led_gpio: led-gpio@0 {
compatible = "fairchild,74hc595";
reg = <0>;
gpio-controller;
#gpio-cells = <2>;
registers-number = <2>;
spi-max-frequency = <1000000>;
enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
};
};

leds {
compatible = "gpio-leds";

led_power: power {
label = "green:power";
gpios = <&led_gpio 0 GPIO_ACTIVE_HIGH>;
};

wifi {
label = "green:wifi";
gpios = <&led_gpio 1 GPIO_ACTIVE_HIGH>;
};

internet {
label = "green:internet";
gpios = <&led_gpio 2 GPIO_ACTIVE_HIGH>;
};

5g-red {
label = "red:5g";
gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
};

5g-green {
label = "green:5g";
gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
};

5g-blue {
label = "blue:5g";
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
};

signal-red {
label = "red:signal";
gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
};

signal-green {
label = "green:signal";
gpios = <&led_gpio 8 GPIO_ACTIVE_LOW>;
};

signal-blue {
label = "blue:signal";
gpios = <&led_gpio 9 GPIO_ACTIVE_LOW>;
};

phone {
label = "green:phone";
gpios = <&led_gpio 11 GPIO_ACTIVE_HIGH>;
};
};
};

&tlmm {
mdio_pins: mdio-pins {
mdc {
pins = "gpio68";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};

mdio {
pins = "gpio69";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
};

&blsp1_uart5 {
status = "okay";
};

&cryptobam {
status = "okay";
};

&crypto {
status = "okay";
};

&prng {
status = "okay";
};

&qpic_bam {
status = "okay";
};

&qpic_nand {
status = "okay";

nand@0 {
reg = <0>;
nand-ecc-strength = <8>;
nand-ecc-step-size = <512>;
nand-bus-width = <8>;

partitions {
compatible = "qcom,smem-part";
};
};
};

&qusb_phy_0 {
status = "okay";
};

&qusb_phy_1 {
status = "okay";
};

&ssphy_0 {
status = "okay";
};

&ssphy_1 {
status = "okay";
};

&usb_0 {
status = "okay";
};

&usb_1 {
status = "okay";
};

&mdio {
status = "okay";

pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;

qca8075_0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};

qca8075_1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};

qca8075_2: ethernet-phy@2 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
};

qca8075_3: ethernet-phy@3 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <3>;
};

qca8081: ethernet-phy@28 {
compatible = "ethernet-phy-id004d.d101";
reg = <28>;
reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
};
};

&switch {
status = "okay";

switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/

qcom,port_phyinfo {
port@1 {
port_id = <1>;
phy_address = <0>;
};
port@2 {
port_id = <2>;
phy_address = <1>;
};
port@3 {
port_id = <3>;
phy_address = <2>;
};
port@4 {
port_id = <4>;
phy_address = <3>;
};
port@6 {
port_id = <6>;
phy_address = <28>;
port_mac_sel = "QGMAC_PORT";
};
};
};

&edma {
status = "okay";
};

&dp1 {
status = "okay";
phy-handle = <&qca8075_0>;
label = "lan1";
};

&dp2 {
status = "okay";
phy-handle = <&qca8075_1>;
label = "lan2";
};

&dp3 {
status = "okay";
phy-handle = <&qca8075_2>;
label = "lan3";
};

&dp4 {
status = "okay";
phy-handle = <&qca8075_3>;
label = "lan4";
};

&dp6_syn {
status = "okay";
phy-handle = <&qca8081>;
label = "wan";
};

&wifi {
status = "okay";

qcom,ath11k-calibration-variant = "Arcadyan-AW1000";
};
14 changes: 14 additions & 0 deletions target/linux/qualcommax/image/ipq807x.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ define Build/wax6xx-netgear-tar
rm -rf $@.tmp
endef

define Device/arcadyan_aw1000
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Arcadyan
DEVICE_MODEL := AW1000
BLOCKSIZE := 256k
PAGESIZE := 4096
DEVICE_DTS_CONFIG := config@hk09
SOC := ipq8072
DEVICE_PACKAGES := ipq-wifi-arcadyan_aw1000 kmod-spi-gpio \
kmod-gpio-nxp-74hc164 kmod-usb-serial-option uqmi
endef
TARGET_DEVICES += arcadyan_aw1000

define Device/buffalo_wxr-5950ax12
$(call Device/FitImage)
DEVICE_VENDOR := Buffalo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ board_config_update
board=$(board_name)

case "$board" in
arcadyan,aw1000)
ucidef_set_led_netdev "5g" "5G" "green:5g" "wwan0"
ucidef_set_led_netdev "wan" "WAN" "green:internet" "wan"
;;
edgecore,eap102)
ucidef_set_led_netdev "wan" "WAN" "green:wanpoe" "wan"
;;
Expand Down
Loading

0 comments on commit fbcda36

Please sign in to comment.