mirror of
https://github.com/coolsnowwolf/lede
synced 2025-01-09 09:37:33 +08:00
add ASUS RT-ACRH17 wireless support
This commit is contained in:
parent
079e30f1df
commit
d196cfe831
@ -18,6 +18,7 @@ menu "Target Images"
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq806x
|
||||
default TARGET_INITRAMFS_COMPRESSION_NONE
|
||||
depends on TARGET_ROOTFS_INITRAMFS
|
||||
help
|
||||
|
@ -35,7 +35,16 @@ nbg6817)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5g" "phy0tpt"
|
||||
ucidef_set_led_netdev "wan" "WAN" "$board:white:internet" "eth1"
|
||||
;;
|
||||
rt-acrh17 |\
|
||||
rt-acrh17)
|
||||
ucidef_set_led_default "status" "STATUS" "${board}:blue:status" "1"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${board}:blue:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${board}:blue:wlan5g" "phy1tpt"
|
||||
ucidef_set_led_switch "wan" "WAN(blue)" "${board}:blue:wan" "switch0" "0x20"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "${board}:blue:lan1" "switch0" "0x02"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "${board}:blue:lan2" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "${board}:blue:lan3" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "${board}:blue:lan4" "switch0" "0x10"
|
||||
;;
|
||||
rt-ac58u)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:blue:wlan2G" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:blue:wlan5G" "phy1tpt"
|
||||
|
@ -53,7 +53,15 @@ nbg6817)
|
||||
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
|
||||
ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 1)"
|
||||
;;
|
||||
rt-acrh17 |\
|
||||
rt-acrh17)
|
||||
CI_UBIPART=UBI_DEV
|
||||
lan_mac_addr=$(mtd_get_mac_binary_ubi Factory 4102)
|
||||
wan_mac_addr=$(mtd_get_mac_binary_ubi Factory 36870)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0t@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
ucidef_set_interface_macaddr "lan" "$lan_mac_addr"
|
||||
ucidef_set_interface_macaddr "wan" "$wan_mac_addr"
|
||||
;;
|
||||
rt-ac58u)
|
||||
CI_UBIPART=UBI_DEV
|
||||
wan_mac_addr=$(mtd_get_mac_binary_ubi Factory 20486)
|
||||
|
@ -62,7 +62,11 @@ board=$(board_name)
|
||||
case "$FIRMWARE" in
|
||||
"ath10k/pre-cal-ahb-a000000.wifi.bin")
|
||||
case "$board" in
|
||||
rt-acrh17 |\
|
||||
rt-acrh17)
|
||||
CI_UBIPART=UBI_DEV
|
||||
. /lib/upgrade/nand.sh
|
||||
ath10kcal_ubi_extract "Factory" 4096 12064
|
||||
;;
|
||||
rt-ac58u)
|
||||
. /lib/upgrade/nand.sh
|
||||
|
||||
@ -76,7 +80,6 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
"ath10k/pre-cal-ahb-a800000.wifi.bin")
|
||||
case "$board" in
|
||||
rt-acrh17 |\
|
||||
rt-ac58u)
|
||||
. /lib/upgrade/nand.sh
|
||||
|
||||
@ -91,6 +94,11 @@ case "$FIRMWARE" in
|
||||
|
||||
"ath10k/pre-cal-pci-0000:01:00.0.bin")
|
||||
case $board in
|
||||
rt-acrh17)
|
||||
CI_UBIPART=UBI_DEV
|
||||
. /lib/upgrade/nand.sh
|
||||
ath10kcal_ubi_extract "Factory" 36864 12064
|
||||
;;
|
||||
c2600)
|
||||
ath10kcal_extract "radio" 4096 12064
|
||||
# ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 8) -1)
|
||||
|
@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2014-2015 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE-Project.org
|
||||
#
|
||||
|
||||
preinit_set_mac_address() {
|
||||
local mac
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
case $(board_name) in
|
||||
rt-acrh17)
|
||||
CI_UBIPART=UBI_DEV
|
||||
mac=$(mtd_get_mac_binary_ubi Factory 4102)
|
||||
ifconfig eth0 hw ether $mac 2>/dev/null
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_set_mac_address
|
@ -8,7 +8,17 @@ platform_check_image() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
rt-acrh17 |\
|
||||
rt-acrh17)
|
||||
CI_UBIPART="UBI_DEV"
|
||||
CI_KERNPART="linux"
|
||||
|
||||
local ubidev=$(nand_find_ubi $CI_UBIPART)
|
||||
local jffs2=$(nand_find_volume $ubidev jffs2)
|
||||
local linux2=$(nand_find_volume $ubidev linux2)
|
||||
[ -n "$jffs2" ] && ubirmvol /dev/$ubidev --name=jffs2
|
||||
[ -n "$linux2" ] && ubirmvol /dev/$ubidev --name=linux2
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
rt-ac58u)
|
||||
CI_UBIPART="UBI_DEV"
|
||||
local ubidev=$(nand_find_ubi $CI_UBIPART)
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qcom-ipq4019-ap.dk01.1.dtsi"
|
||||
#include "qcom-ipq4019-ap.dk04.1.dtsi"
|
||||
#include "qcom-ipq4019-bus.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
@ -48,6 +48,91 @@
|
||||
};
|
||||
|
||||
soc {
|
||||
spi_0: spi@78b5000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcie0: qcom,pcie@80000 {
|
||||
compatible = "qcom,msm_pcie";
|
||||
cell-index = <0>;
|
||||
qcom,ctrl-amt = <1>;
|
||||
|
||||
reg = <0x80000 0x2000>,
|
||||
<0x99000 0x800>,
|
||||
<0x40000000 0xf1d>,
|
||||
<0x40000f20 0xa8>,
|
||||
<0x40100000 0x1000>,
|
||||
<0x40200000 0x100000>,
|
||||
<0x40300000 0xd00000>;
|
||||
reg-names = "parf", "phy", "dm_core", "elbi",
|
||||
"conf", "io", "bars";
|
||||
|
||||
#address-cells = <0>;
|
||||
interrupt-parent = <&pcie0>;
|
||||
interrupts = <0 1 2 3 4 5 6 7 8 9 10 11 12>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0xffffffff>;
|
||||
interrupt-map = <0 &intc 0 141 0
|
||||
1 &intc 0 142 0
|
||||
2 &intc 0 143 0
|
||||
3 &intc 0 144 0
|
||||
4 &intc 0 145 0
|
||||
5 &intc 0 146 0
|
||||
6 &intc 0 147 0
|
||||
7 &intc 0 148 0
|
||||
8 &intc 0 149 0
|
||||
9 &intc 0 150 0
|
||||
10 &intc 0 151 0
|
||||
11 &intc 0 152 0 >;
|
||||
|
||||
interrupt-names = "int_msi", "int_a", "int_b", "int_c", "int_d",
|
||||
"int_pls_pme", "int_pme_legacy", "int_pls_err",
|
||||
"int_aer_legacy", "int_pls_link_up",
|
||||
"int_pls_link_down", "int_bridge_flush_n","int_wake";
|
||||
|
||||
qcom,ep-latency = <10>;
|
||||
|
||||
clocks = <&gcc GCC_PCIE_AHB_CLK>,
|
||||
<&gcc GCC_PCIE_AXI_M_CLK>,
|
||||
<&gcc GCC_PCIE_AXI_S_CLK>;
|
||||
|
||||
clock-names = "pcie_0_cfg_ahb_clk",
|
||||
"pcie_0_mstr_axi_clk",
|
||||
"pcie_0_slv_axi_clk";
|
||||
|
||||
max-clock-frequency-hz = <0>, <0>, <0>;
|
||||
|
||||
resets = <&gcc PCIE_AXI_M_ARES>,
|
||||
<&gcc PCIE_AXI_S_ARES>,
|
||||
<&gcc PCIE_PIPE_ARES>,
|
||||
<&gcc PCIE_AXI_M_VMIDMT_ARES>,
|
||||
<&gcc PCIE_AXI_S_XPU_ARES>,
|
||||
<&gcc PCIE_PARF_XPU_ARES>,
|
||||
<&gcc PCIE_PHY_ARES>,
|
||||
<&gcc PCIE_AXI_M_STICKY_ARES>,
|
||||
<&gcc PCIE_PIPE_STICKY_ARES>,
|
||||
<&gcc PCIE_PWR_ARES>,
|
||||
<&gcc PCIE_AHB_ARES>,
|
||||
<&gcc PCIE_PHY_AHB_ARES>;
|
||||
|
||||
reset-names = "pcie_rst_axi_m_ares",
|
||||
"pcie_rst_axi_s_ares",
|
||||
"pcie_rst_pipe_ares",
|
||||
"pcie_rst_axi_m_vmidmt_ares",
|
||||
"pcie_rst_axi_s_xpu_ares",
|
||||
"pcie_rst_parf_xpu_ares",
|
||||
"pcie_rst_phy_ares",
|
||||
"pcie_rst_axi_m_sticky_ares",
|
||||
"pcie_rst_pipe_sticky_ares",
|
||||
"pcie_rst_pwr_ares",
|
||||
"pcie_rst_ahb_res",
|
||||
"pcie_rst_phy_ahb_ares";
|
||||
|
||||
status = "ok";
|
||||
perst-gpio = <&tlmm 38 0>;
|
||||
wake-gpio = <&tlmm 50 0>;
|
||||
clkreq-gpio = <&tlmm 39 0>;
|
||||
};
|
||||
|
||||
tcsr@194b000 {
|
||||
/* select hostmode */
|
||||
@ -63,7 +148,6 @@
|
||||
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
|
||||
};
|
||||
|
||||
|
||||
tcsr@1949000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1949000 0x100>;
|
||||
@ -76,11 +160,6 @@
|
||||
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
|
||||
};
|
||||
|
||||
counter@4a1000 {
|
||||
compatible = "qcom,qca-gcnt";
|
||||
reg = <0x4a1000 0x4>;
|
||||
};
|
||||
|
||||
mdio@90000 {
|
||||
status = "okay";
|
||||
};
|
||||
@ -97,20 +176,20 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
wifi@a000000 {
|
||||
status = "okay";
|
||||
wifi0: wifi@a000000 {
|
||||
status = "ok";
|
||||
core-id = <0x0>;
|
||||
qca,msi_addr = <0x0b006040>;
|
||||
qca,msi_base = <0x40>;
|
||||
wifi_led_num = <2>; /* Wifi 2G */
|
||||
wifi_led_source = <0>; /* source id 0 */
|
||||
qcom,mtd-name = "0:ART";
|
||||
qcom,cal-offset = <0x1000>;
|
||||
qcom,cal-len = <12064>;
|
||||
};
|
||||
|
||||
wifi@a800000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
cryptobam: dma@8e04000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
crypto@8e3a000 {
|
||||
status = "okay";
|
||||
wifi1: wifi@a800000 {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@ -119,13 +198,13 @@
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
|
||||
gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
|
||||
gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
@ -135,137 +214,78 @@
|
||||
|
||||
power: status {
|
||||
label = "rt-acrh17:blue:status";
|
||||
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan {
|
||||
lan1 {
|
||||
label = "rt-acrh17:blue:lan1";
|
||||
gpios = <&tlmm 45 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
lan2 {
|
||||
label = "rt-acrh17:blue:lan2";
|
||||
gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
lan3 {
|
||||
label = "rt-acrh17:blue:lan3";
|
||||
gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
lan4 {
|
||||
label = "rt-acrh17:blue:lan4";
|
||||
gpios = <&tlmm 49 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan_blue {
|
||||
label = "rt-acrh17:blue:wan";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&tlmm 61 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan2G {
|
||||
label = "rt-acrh17:blue:wlan2G";
|
||||
gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
|
||||
wan_red {
|
||||
label = "rt-acrh17:red:wan";
|
||||
gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan5G {
|
||||
label = "rt-acrh17:blue:wlan5G";
|
||||
gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
|
||||
wlan2g {
|
||||
label = "rt-acrh17:blue:wlan2g";
|
||||
gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb {
|
||||
label = "rt-acrh17:blue:usb";
|
||||
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
lan {
|
||||
label = "rt-acrh17:blue:lan";
|
||||
gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
|
||||
wlan5g {
|
||||
label = "rt-acrh17:blue:wlan5g";
|
||||
gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi_0_pins {
|
||||
pinmux_cs {
|
||||
function = "gpio";
|
||||
pins = "gpio54", "gpio59";
|
||||
&nand_pins {
|
||||
pullups {
|
||||
pins = "gpio53", "gpio58",
|
||||
"gpio59";
|
||||
function = "qpic";
|
||||
bias-pull-up;
|
||||
};
|
||||
pinconf_cs {
|
||||
pins = "gpio54", "gpio59";
|
||||
drive-strength = <2>;
|
||||
|
||||
pulldowns {
|
||||
pins = "gpio55", "gpio56",
|
||||
"gpio57", "gpio60",
|
||||
"gpio62", "gpio63", "gpio64",
|
||||
"gpio65", "gpio66", "gpio67",
|
||||
"gpio69";
|
||||
function = "qpic";
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0_pins {
|
||||
pinmux {
|
||||
function = "blsp_i2c0";
|
||||
pins = "gpio10";
|
||||
};
|
||||
pinconf {
|
||||
pins = "gpio10";
|
||||
drive-strength = <16>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&spi_0 { /* BLSP1 QUP1 */
|
||||
status = "ok";
|
||||
cs-gpios = <&tlmm 54 0>,
|
||||
<&tlmm 59 0>;
|
||||
|
||||
mx25l25635e@0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
m25p80@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
/*
|
||||
* U-boot looks for "n25q128a11" node,
|
||||
* if we don't have it, it will spit out the following warning:
|
||||
* "ipq: fdt fixup unable to find compatible node".
|
||||
*/
|
||||
compatible = "mx25l1606e", "n25q128a11", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition0@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x00000000 0x00040000>;
|
||||
read-only;
|
||||
};
|
||||
partition1@40000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x00040000 0x00020000>;
|
||||
read-only;
|
||||
};
|
||||
partition2@60000 {
|
||||
label = "QSEE";
|
||||
reg = <0x00060000 0x00060000>;
|
||||
read-only;
|
||||
};
|
||||
partition3@c0000 {
|
||||
label = "CDT";
|
||||
reg = <0x000c0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
partition4@d0000 {
|
||||
label = "DDRPARAMS";
|
||||
reg = <0x000d0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
partition5@e0000 {
|
||||
label = "APPSBLENV"; /* uboot env*/
|
||||
reg = <0x000e0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
partition5@f0000 {
|
||||
label = "APPSBL"; /* uboot */
|
||||
reg = <0x000f0000 0x00080000>;
|
||||
read-only;
|
||||
};
|
||||
partition5@170000 {
|
||||
label = "ART";
|
||||
reg = <0x00170000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
/* 0x00180000 - 0x00200000 unused */
|
||||
};
|
||||
};
|
||||
|
||||
mt29f@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "spinand,mt29f", "w25n01gv";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition0@0 {
|
||||
label = "ubi";
|
||||
reg = <0x00000000 0x08000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -267,7 +267,7 @@ define Device/RT-ACRH17
|
||||
IMAGES = sysupgrade.tar flash-factory.trx
|
||||
IMAGE/flash-factory.trx := copy-file $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) | uImage none
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-phy-qcom-ipq4019 ipq-wifi-rt-ac58u ath10k-firmware-qca9984
|
||||
DEVICE_PACKAGES := kmod-usb-phy-qcom-ipq4019 ath10k-firmware-qca4019 ath10k-firmware-qca9984
|
||||
endef
|
||||
|
||||
define Device/NBG6817
|
||||
|
Loading…
Reference in New Issue
Block a user