diff --git a/target/linux/ipq60xx/base-files/etc/board.d/02_network b/target/linux/ipq60xx/base-files/etc/board.d/02_network index dccb818a7..6d7dda955 100644 --- a/target/linux/ipq60xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq60xx/base-files/etc/board.d/02_network @@ -26,8 +26,26 @@ setup_network() 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 setup_network +setup_macs board_config_flush exit 0 diff --git a/target/linux/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata index deef9ddb0..b6a19f272 100644 --- a/target/linux/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ b/target/linux/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata @@ -26,11 +26,31 @@ ath11k_generate_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 "ath11k/IPQ6018/hw1.0/cal-ahb-c000000.wifi.bin") case "$board" in cmiot,ax18|\ - linksys,mr|\ + linksys,mr7350|\ + qihoo,v6|\ zn,m2) caldata_extract "0:art" 0x1000 0x10000 ;; @@ -48,6 +68,7 @@ ath11k-macs) case "$board" in cmiot,ax18|\ linksys,mr7350|\ + qihoo,v6|\ zn,m2) ath11k_generate_macs ;; diff --git a/target/linux/ipq60xx/files/arch/arm64/boot/dts/qcom/ipq6018-v6.dts b/target/linux/ipq60xx/files/arch/arm64/boot/dts/qcom/ipq6018-v6.dts index 7829aad02..36e45dc08 100644 --- a/target/linux/ipq60xx/files/arch/arm64/boot/dts/qcom/ipq6018-v6.dts +++ b/target/linux/ipq60xx/files/arch/arm64/boot/dts/qcom/ipq6018-v6.dts @@ -15,16 +15,37 @@ aliases { serial0 = &blsp1_uart3; -// led-boot = &led_power; -// led-failsafe = &led_power; -// led-running = &led_power; -// led-upgrade = &led_power; + led-boot = &led_system_orange; + led-failsafe = &led_system_red; + led-running = &led_system_green; + led-upgrade = &led_system_orange; }; chosen { 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 { compatible = "gpio-keys"; @@ -35,7 +56,7 @@ }; wps { - label = "reset"; + label = "wps"; gpios = <&tlmm 19 GPIO_ACTIVE_LOW>; linux,code = ; }; @@ -65,6 +86,16 @@ bias-pull-up; }; }; + + leds_pins: leds_pins { + mux { + pins = "gpio71", "gpio72", "gpio73"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; + }; + }; &soc { @@ -205,4 +236,10 @@ status = "okay"; }; +&qusb_phy_0 { + status = "ok"; +}; +&usb3 { + status = "ok"; +};