ipq40xx: improve ASUS RT-AC58U support
This patch does the following: - move WiFi LED setup to DTS - fix LAN/WAN MAC addresses and add label MAC address - wan5G -> wlan5G, power -> led_power - increase flash SPI frequency to 30MHz MAC addresses are stored in Factory partition at: 0x1006: WiFi 2.4GHz, WAN (label_mac) 0x5006: WiFi 5GHz, LAN (label_mac +4) By improving flash speed, `time dd if=/dev/mtdblock8 of=/dev/null bs=2k` is reduced from 7m 10.26s to 5m 9.52s. Using higher frequencies did not improve speed further. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
This commit is contained in:
parent
9b02d32e34
commit
8083969405
4 changed files with 26 additions and 20 deletions
|
@ -15,8 +15,6 @@ alfa-network,ap120c-ac)
|
||||||
ucidef_set_led_netdev "wan" "WAN" "${boardname}:amber:wan" "eth1"
|
ucidef_set_led_netdev "wan" "WAN" "${boardname}:amber:wan" "eth1"
|
||||||
;;
|
;;
|
||||||
asus,rt-ac58u)
|
asus,rt-ac58u)
|
||||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2G" "phy0tpt"
|
|
||||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5G" "phy1tpt"
|
|
||||||
ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1"
|
ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1"
|
||||||
ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e"
|
ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -79,12 +79,16 @@ ipq40xx_setup_interfaces()
|
||||||
ipq40xx_setup_macs()
|
ipq40xx_setup_macs()
|
||||||
{
|
{
|
||||||
local board="$1"
|
local board="$1"
|
||||||
|
local lan_mac=""
|
||||||
|
local wan_mac=""
|
||||||
|
local label_mac=""
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
asus,rt-ac58u)
|
asus,rt-ac58u)
|
||||||
CI_UBIPART=UBI_DEV
|
CI_UBIPART=UBI_DEV
|
||||||
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
|
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
||||||
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
|
||||||
|
label_mac=$wan_mac
|
||||||
;;
|
;;
|
||||||
cilab,meshpoint-one)
|
cilab,meshpoint-one)
|
||||||
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
|
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
led-boot = &power;
|
led-boot = &led_power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &led_power;
|
||||||
led-running = &power;
|
led-running = &led_power;
|
||||||
led-upgrade = &power;
|
led-upgrade = &led_power;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
power: status {
|
led_power: status {
|
||||||
label = "rt-ac58u:blue:status";
|
label = "rt-ac58u:blue:status";
|
||||||
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
|
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
@ -150,11 +150,13 @@
|
||||||
wlan2G {
|
wlan2G {
|
||||||
label = "rt-ac58u:blue:wlan2G";
|
label = "rt-ac58u:blue:wlan2G";
|
||||||
gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
|
gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
};
|
};
|
||||||
|
|
||||||
wan5G {
|
wlan5G {
|
||||||
label = "rt-ac58u:blue:wlan5G";
|
label = "rt-ac58u:blue:wlan5G";
|
||||||
gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
|
gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
};
|
};
|
||||||
|
|
||||||
usb {
|
usb {
|
||||||
|
@ -224,7 +226,7 @@
|
||||||
compatible = "jedec,spi-nor";
|
compatible = "jedec,spi-nor";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
|
linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
|
||||||
spi-max-frequency = <24000000>;
|
spi-max-frequency = <30000000>;
|
||||||
|
|
||||||
partitions {
|
partitions {
|
||||||
compatible = "fixed-partitions";
|
compatible = "fixed-partitions";
|
||||||
|
@ -280,7 +282,7 @@
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "spinand,mt29f";
|
compatible = "spinand,mt29f";
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
spi-max-frequency = <24000000>;
|
spi-max-frequency = <30000000>;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* U-boot looks for "spinand,mt29f" node,
|
* U-boot looks for "spinand,mt29f" node,
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
led-boot = &power;
|
led-boot = &led_power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &led_power;
|
||||||
led-running = &power;
|
led-running = &led_power;
|
||||||
led-upgrade = &power;
|
led-upgrade = &led_power;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
power: status {
|
led_power: status {
|
||||||
label = "rt-ac58u:blue:status";
|
label = "rt-ac58u:blue:status";
|
||||||
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
|
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
@ -144,11 +144,13 @@
|
||||||
wlan2G {
|
wlan2G {
|
||||||
label = "rt-ac58u:blue:wlan2G";
|
label = "rt-ac58u:blue:wlan2G";
|
||||||
gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
|
gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
};
|
};
|
||||||
|
|
||||||
wan5G {
|
wlan5G {
|
||||||
label = "rt-ac58u:blue:wlan5G";
|
label = "rt-ac58u:blue:wlan5G";
|
||||||
gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
|
gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
};
|
};
|
||||||
|
|
||||||
usb {
|
usb {
|
||||||
|
@ -216,7 +218,7 @@
|
||||||
compatible = "jedec,spi-nor";
|
compatible = "jedec,spi-nor";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
|
linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
|
||||||
spi-max-frequency = <24000000>;
|
spi-max-frequency = <30000000>;
|
||||||
|
|
||||||
partitions {
|
partitions {
|
||||||
compatible = "fixed-partitions";
|
compatible = "fixed-partitions";
|
||||||
|
@ -270,7 +272,7 @@
|
||||||
spi-nand@1 {
|
spi-nand@1 {
|
||||||
compatible = "spi-nand";
|
compatible = "spi-nand";
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
spi-max-frequency = <24000000>;
|
spi-max-frequency = <30000000>;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* U-boot looks for "spinand,mt29f" node,
|
* U-boot looks for "spinand,mt29f" node,
|
||||||
|
|
Loading…
Reference in a new issue