mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
ipq60xx: add Qihoo 360v6 wireless support
This commit is contained in:
parent
524dfad990
commit
6533370814
@ -26,8 +26,26 @@ setup_network()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup_macs()
|
||||||
|
{
|
||||||
|
case $(board_name) in
|
||||||
|
linksys,mr7350)
|
||||||
|
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||||
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||||
|
;;
|
||||||
|
qihoo,v6)
|
||||||
|
lan_mac=$(mtd_get_mac_ascii factory lanMac)
|
||||||
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||||
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
||||||
|
}
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
setup_network
|
setup_network
|
||||||
|
setup_macs
|
||||||
board_config_flush
|
board_config_flush
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -26,11 +26,31 @@ ath11k_generate_macs() {
|
|||||||
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
|
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ath11kcal_die() {
|
||||||
|
echo "ath11cal: " "$*"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
ath11kcal_extract() {
|
||||||
|
local part=$1
|
||||||
|
local offset=$2
|
||||||
|
local count=$3
|
||||||
|
local mtd
|
||||||
|
|
||||||
|
mtd=$(find_mtd_chardev $part)
|
||||||
|
[ -n "$mtd" ] || \
|
||||||
|
ath11kcal_die "no mtd device found for partition $part"
|
||||||
|
|
||||||
|
dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
|
||||||
|
ath11kcal_die "failed to extract calibration data from $mtd"
|
||||||
|
}
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
"ath11k/IPQ6018/hw1.0/cal-ahb-c000000.wifi.bin")
|
"ath11k/IPQ6018/hw1.0/cal-ahb-c000000.wifi.bin")
|
||||||
case "$board" in
|
case "$board" in
|
||||||
cmiot,ax18|\
|
cmiot,ax18|\
|
||||||
linksys,mr|\
|
linksys,mr7350|\
|
||||||
|
qihoo,v6|\
|
||||||
zn,m2)
|
zn,m2)
|
||||||
caldata_extract "0:art" 0x1000 0x10000
|
caldata_extract "0:art" 0x1000 0x10000
|
||||||
;;
|
;;
|
||||||
@ -48,6 +68,7 @@ ath11k-macs)
|
|||||||
case "$board" in
|
case "$board" in
|
||||||
cmiot,ax18|\
|
cmiot,ax18|\
|
||||||
linksys,mr7350|\
|
linksys,mr7350|\
|
||||||
|
qihoo,v6|\
|
||||||
zn,m2)
|
zn,m2)
|
||||||
ath11k_generate_macs
|
ath11k_generate_macs
|
||||||
;;
|
;;
|
||||||
|
@ -15,16 +15,37 @@
|
|||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
serial0 = &blsp1_uart3;
|
serial0 = &blsp1_uart3;
|
||||||
// led-boot = &led_power;
|
led-boot = &led_system_orange;
|
||||||
// led-failsafe = &led_power;
|
led-failsafe = &led_system_red;
|
||||||
// led-running = &led_power;
|
led-running = &led_system_green;
|
||||||
// led-upgrade = &led_power;
|
led-upgrade = &led_system_orange;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
stdout-path = "serial0:115200n8";
|
stdout-path = "serial0:115200n8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
pinctrl-0 = <&leds_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
led_system_red: system-red {
|
||||||
|
label = "v6:red:status";
|
||||||
|
gpios = <&tlmm 71 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_system_orange: system-orange {
|
||||||
|
label = "v6:orange:status";
|
||||||
|
gpios = <&tlmm 72 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_system_green: system-green {
|
||||||
|
label = "v6:green:status";
|
||||||
|
gpios = <&tlmm 73 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
keys {
|
keys {
|
||||||
compatible = "gpio-keys";
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
@ -35,7 +56,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
wps {
|
wps {
|
||||||
label = "reset";
|
label = "wps";
|
||||||
gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
|
gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <KEY_WPS_BUTTON>;
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
};
|
};
|
||||||
@ -65,6 +86,16 @@
|
|||||||
bias-pull-up;
|
bias-pull-up;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
leds_pins: leds_pins {
|
||||||
|
mux {
|
||||||
|
pins = "gpio71", "gpio72", "gpio73";
|
||||||
|
function = "gpio";
|
||||||
|
drive-strength = <8>;
|
||||||
|
bias-pull-down;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&soc {
|
&soc {
|
||||||
@ -205,4 +236,10 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&qusb_phy_0 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb3 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user