ath79: add CSAC

This commit is contained in:
LGA1150 2019-10-09 09:20:26 +08:00 committed by CN_SZTL
parent 5470cceaed
commit f22581a84b
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 186 additions and 1 deletions

View File

@ -0,0 +1,170 @@
// 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 "qca956x.dtsi"
/ {
model = "XWRT CSAC";
compatible = "xwrt,csac", "qca,qca9563";
aliases {
led-boot = &led_sys;
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
};
chosen {
bootargs = "console=ttyS0,115200n8";
};
leds {
compatible = "gpio-leds";
led_sys: sys {
label = "xwrt:blue:sys";
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "xwrt:blue:wlan2g";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan5g {
label = "xwrt:blue:wlan5g";
gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
lte_modem_enable {
gpio-export,name = "lte_modem_enable";
gpio-export,output = <1>;
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
};
};
};
&uart {
status = "okay";
};
&gpio {
status = "okay";
};
&pcie {
status = "okay";
};
&spi {
num-cs = <1>;
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x40000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0xfa0000>;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};
&usb_phy0 {
status = "okay";
};
&usb0 {
status = "okay";
};
&usb_phy1 {
status = "okay";
};
&usb1 {
status = "okay";
};
&mdio0 {
status = "okay";
phy-mask = <0>;
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "sgmii";
qca,ar8327-initvals = <
0x04 0x00080080 /* PORT0 PAD MODE CTRL */
0x10 0x81000080 /* POWER_ON_STRIP */
0x50 0xcc35cc35 /* LED_CTRL0 */
0x54 0xcb37cb37 /* LED_CTRL1 */
0x58 0x00000000 /* LED_CTRL2 */
0x5c 0x00f3cf00 /* LED_CTRL3 */
0x7c 0x0000007e /* PORT0_STATUS */
>;
};
};
&eth0 {
status = "okay";
mtd-mac-address = <&art 0x0>;
pll-data = <0x03000101 0x00000101 0x00001919>;
phy-mode = "sgmii";
phy-handle = <&phy0>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
};

View File

@ -216,7 +216,8 @@ ath79_setup_interfaces()
iodata,wn-ag300dgr|\
pcs,cr5000|\
sitecom,wlr-7100|\
wd,mynet-n750)
wd,mynet-n750|\
xwrt,csac)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
@ -571,6 +572,10 @@ ath79_setup_macs()
wd,mynet-wifi-rangeextender)
lan_mac=$(nvram get et0macaddr)
;;
xwrt,csac)
wan_mac=$(mtd_get_mac_binary art 0)
lan_mac=$(mtd_get_mac_binary art 6)
;;
zyxel,nbg6616)
label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
;;

View File

@ -263,6 +263,7 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 0x5000 0x2f20
ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary info 0x8) +1)
;;
xwrt,csac|\
yuncore,a782|\
yuncore,xd4200)
ath10kcal_extract "art" 0x5000 0x2f20

View File

@ -1545,6 +1545,15 @@ define Device/xiaomi_mi-router-4q
endef
TARGET_DEVICES += xiaomi_mi-router-4q
define Device/xwrt_csac
SOC := qca9563
DEVICE_VENDOR := XWRT
DEVICE_MODEL := CSAC
IMAGE_SIZE := 16000k
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct kmod-usb2
endef
TARGET_DEVICES += xwrt_csac
define Device/yuncore_a770
SOC := qca9531
DEVICE_VENDOR := YunCore