ath79: add support for Arris SBC-AC1750

Specifications:
- SoC: QCA9558
- Flash: 128M NAND
- RAM: 256M
- Ethernet: QCA8337, 1 WAN and 4 LANs
- 2.4GHz wireless: SoC integrated
- 5GHz wireless: QCA9880
- 2 buttons (Reset and WPS)
- 4 GPIO-LEDs
- USB 2.0 port

Flash instructions: (To be done)

Note:
This router has an external watchdog connected to SoC's GPIO 18.
If the watchdog is not fed for about 2 seconds, it will reset the
SoC. Unfortunately, the stock U-boot has a bug that it does not
feed the watchdog when decompressing kernel. If the kernel is
LZMA-compressed, it might take too long before watchdog timeout.
So we have to use gzip instead for faster decompressing speed.

For initramfs image, compression is not used because it is bigger
and will take even more time to decompress.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
DENG Qingfang 2020-05-27 11:52:26 +08:00 committed by CN_SZTL
parent 5396b44d06
commit f9b94cbbad
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
5 changed files with 231 additions and 0 deletions

View File

@ -0,0 +1,205 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "qca955x.dtsi"
/ {
model = "Arris SBR-AC1750";
compatible = "arris,sbr-ac1750", "qca,qca9557";
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-upgrade = &led_wps;
label-mac-device = &eth0;
};
leds {
compatible = "gpio-leds";
wlan2g {
label = "green:wlan2g";
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wlan5g {
label = "green:wlan5g";
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
usb {
label = "green:usb";
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
trigger-sources = <&hub_port0>, <&hub_port1>;
linux,default-trigger = "usbport";
};
led_wps: wps {
label = "green:wps";
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
wps {
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
};
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
hw_algo = "toggle";
hw_margin_ms = <1600>;
always-running;
};
};
&pcie0 {
status = "okay";
};
&uart {
status = "okay";
};
&gpio {
status = "okay";
};
&usb_phy0 {
status = "okay";
};
&usb0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
hub_port0: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
&usb_phy1 {
status = "okay";
};
&usb1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
hub_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
&nand {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};
partition@100000 {
label = "boot-flag";
reg = <0x100000 0x100000>;
};
partition@200000 {
label = "kernel";
reg = <0x200000 0x400000>;
};
partition@600000 {
label = "ubi";
reg = <0x600000 0x6400000>;
};
ft: partition@6a00000 {
label = "ft";
reg = <0x6a00000 0x100000>;
read-only;
};
partition@6b00000 {
label = "PKI";
reg = <0x6b00000 0x200000>;
read-only;
};
caldata: partition@6d00000 {
label = "caldata";
reg = <0x6d00000 0x100000>;
read-only;
};
};
};
&mdio0 {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x04 0x87600000 /* PORT0 PAD MODE CTRL */
0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
0x7c 0x0000007e /* PORT0 STATUS */
0x94 0x0000007e /* PORT6 STATUS */
>;
};
};
&eth0 {
status = "okay";
mtd-mac-address = <&ft 0x0>;
pll-data = <0x56000000 0x00000101 0x00001616>;
phy-handle = <&phy0>;
};
&eth1 {
status = "okay";
mtd-mac-address = <&ft 0x6>;
pll-data = <0x03000101 0x00000101 0x00001616>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&wmac {
status = "okay";
mtd-cal-data = <&caldata 0x1000>;
mtd-mac-address = <&ft 0xc>;
};

View File

@ -72,6 +72,25 @@ define Device/aerohive_hiveap-121
endef
TARGET_DEVICES += aerohive_hiveap-121
define Device/arris_sbr-ac1750
SOC := qca9558
DEVICE_VENDOR := Arris
DEVICE_MODEL := SBR-AC1750
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
KERNEL_SIZE := 4096k
BLOCKSIZE := 128k
IMAGE_SIZE := 32m
PAGESIZE := 2048
KERNEL := kernel-bin | append-dtb | gzip | uImage gzip
KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
IMAGES += kernel1.bin rootfs1.bin
IMAGE/kernel1.bin := append-kernel | check-size $$$$(KERNEL_SIZE)
IMAGE/rootfs1.bin := append-ubi | check-size
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
UBINIZE_OPTS := -E 5
endef
TARGET_DEVICES += arris_sbr-ac1750
define Device/domywifi_dw33d
SOC := qca9558
DEVICE_VENDOR := DomyWifi

View File

@ -34,6 +34,7 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
arris,sbr-ac1750|\
zyxel,nbg6716)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"

View File

@ -9,6 +9,10 @@ board=$(board_name)
case "$FIRMWARE" in
"ath10k/cal-pci-0000:00:00.0.bin")
case $board in
arris,sbr-ac1750)
caldata_extract "caldata" 0x5000 0x844
ath10k_patch_mac $(mtd_get_mac_binary ft 0x12)
;;
domywifi,dw33d|\
domywifi,dw33d-nor)
caldata_extract "art" 0x5000 0x844

View File

@ -3,6 +3,8 @@ CONFIG_CRYPTO_ACOMP2=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_LZO=y
CONFIG_GPIO_WATCHDOG=y
CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_MTD_NAND=y