diff --git a/package/boot/uboot-envtools/files/qualcommax_ipq60xx b/package/boot/uboot-envtools/files/qualcommax_ipq60xx index 2c1cbbda1e3..ab3916f51fa 100644 --- a/package/boot/uboot-envtools/files/qualcommax_ipq60xx +++ b/package/boot/uboot-envtools/files/qualcommax_ipq60xx @@ -14,6 +14,7 @@ case "$board" in [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" ;; +qihoo,v6|\ redmi,ax5|\ xiaomi,ax1800|\ netgear,wax214) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 51a65c2d846..f07877e84cc 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -46,10 +46,11 @@ ALLWIFIBOARDS:= \ netgear_wax630 \ prpl_haze \ qnap_301w \ - redmi_ax5 + qihoo_v6 \ + redmi_ax5 \ redmi_ax6 \ wallys_dr40x9 \ - xiaomi_ax1800 + xiaomi_ax1800 \ xiaomi_ax3600 \ xiaomi_ax9000 \ yyets_le1 \ @@ -57,7 +58,7 @@ ALLWIFIBOARDS:= \ zte_mf269 \ zte_mf287 \ zte_mf287plus \ - zyxel_nbg7815 + zyxel_nbg7815 \ ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) @@ -165,6 +166,7 @@ $(eval $(call generate-ipq-wifi-package,netgear_wax620,Netgear WAX620)) $(eval $(call generate-ipq-wifi-package,netgear_wax630,Netgear WAX630)) $(eval $(call generate-ipq-wifi-package,qnap_301w,QNAP 301w)) $(eval $(call generate-ipq-wifi-package,prpl_haze,prpl Haze)) +$(eval $(call generate-ipq-wifi-package,qihoo_v6,Qihoo V6)) $(eval $(call generate-ipq-wifi-package,redmi_ax5,Redmi AX5)) $(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6)) $(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9)) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-v6.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-v6.dts new file mode 100644 index 00000000000..b5f65ca3a09 --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-v6.dts @@ -0,0 +1,283 @@ +// SPDX-License-Identifier: (GPL-2.0+) + +/dts-v1/; + +#include "ipq6018.dtsi" +#include "ipq6018-cp-cpu.dtsi" +#include "ipq6018-ess.dtsi" + +#include +#include + +/ { + model = "Qihoo 360 V6"; + compatible = "qihoo,v6", "qcom,ipq6018-cp03", "qcom,ipq6018"; + qcom,msm-id = <0x192 0x0>; + + aliases { + serial0 = &blsp1_uart3; + led-boot = &led_system_orange; + led-failsafe = &led_system_red; + led-running = &led_system_green; + led-upgrade = &led_system_orange; + + ethernet0 = &dp1; + ethernet1 = &dp2; + ethernet2 = &dp3; + ethernet3 = &dp4; + }; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1 swiotlb=1 coherent_pool=2M"; + }; + + 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"; + + reset { + label = "reset"; + gpios = <&tlmm 68 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&tlmm 19 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&tlmm { + uart_pins: uart_pins { + mux { + pins = "gpio44", "gpio45"; + function = "blsp2_uart"; + drive-strength = <0x08>; + bias-pull-down; + }; + }; + + spi_1_pins: spi_1_pins { + mux { + pins = "gpio38", "gpio39", "gpio40", "gpio41"; + function = "blsp0_spi"; + drive-strength = <0x08>; + bias-pull-down; + }; + }; + + mdio_pins: mdio-pins { + mdc { + pins = "gpio64"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + + mdio { + pins = "gpio65"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + + mux_2 { + pins = "gpio75"; + function = "gpio"; + bias-pull-up; + }; + }; + + leds_pins: leds_pins { + mux { + pins = "gpio71", "gpio72", "gpio73"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; + }; +}; + +&dp1 { + phy-handle = <&qca8075_0>; + status = "okay"; + qcom,id = <1>; +}; + +&dp2 { + phy-handle = <&qca8075_1>; + status = "okay"; + qcom,id = <2>; +}; + +&dp3 { + phy-handle = <&qca8075_2>; + status = "okay"; + qcom,id = <3>; +}; + +&dp4 { + phy-handle = <&qca8075_3>; + status = "okay"; + qcom,id = <4>; +}; + +&mdio { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; + + qca8075_0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; + + qca8075_1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; + + qca8075_2: ethernet-phy@2 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <2>; + }; + + qca8075_3: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + }; +}; + +&switch { + status = "okay"; + + switch_cpu_bmp = <0x1>; /* cpu port bitmap */ + switch_lan_bmp = <0xe>; /* lan port bitmap */ + switch_wan_bmp = <0x10>; /* wan port bitmap */ + switch_inner_bmp = <0xc0>; /*inner port bitmap*/ + switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/ + switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/ + + qcom,port_phyinfo { + port@0 { + port_id = <0x01>; + phy_address = <0x00>; + }; + port@1 { + port_id = <0x02>; + phy_address = <0x01>; + }; + port@2 { + port_id = <0x03>; + phy_address = <0x02>; + }; + port@3 { + port_id = <0x04>; + phy_address = <0x03>; + }; + }; +}; + +&blsp1_uart3 { + pinctrl-0 = <&uart_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&blsp1_spi1 { + pinctrl-0 = <&spi_1_pins>; + pinctrl-names = "default"; + cs-select = <0>; + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + compatible = "n25q128a11"; + linux,modalias = "m25p80", "n25q128a11"; + spi-max-frequency = <50000000>; + use-default-sizes; + }; +}; + +&qpic_nand { + status = "okay"; + + nand@0 { + reg = <0>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + }; +}; + +&wifi { + status = "okay"; + qcom,ath11k-fw-memory-mode = <1>; + qcom,ath11k-calibration-variant = "Qihoo-V6"; + }; + +&edma { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&qusb_phy_0 { + status = "okay"; +}; + +&ssphy_0 { + status = "okay"; +}; + +&qusb_phy_0 { + status = "ok"; +}; + +&usb2 { + status = "okay"; +}; + +&usb3 { + status = "okay"; +}; diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index 62c987a5dcd..4e9281f4ab8 100644 --- a/target/linux/qualcommax/image/ipq60xx.mk +++ b/target/linux/qualcommax/image/ipq60xx.mk @@ -49,3 +49,16 @@ define Device/xiaomi_ax1800 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax1800 endef TARGET_DEVICES += xiaomi_ax1800 + +define Device/qihoo_v6 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Qihoo + DEVICE_MODEL := V6 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_DTS_CONFIG := config@cp03-c1 + SOC := ipq6018 + DEVICE_PACKAGES := ipq-wifi-qihoo_v6 +endef +TARGET_DEVICES += qihoo_v6 diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network index 886e473dcfb..b95c214811f 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network @@ -17,6 +17,9 @@ ipq60xx_setup_interfaces() netgear,wax214) ucidef_set_interfaces_lan_wan "lan" ;; + qihoo,v6) + ucidef_set_interfaces_lan_wan "eth0 eth1 eth2" "eth3" + ;; redmi,ax5|\ xiaomi,ax1800) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata index 5cba22f3e37..904e99c519f 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata @@ -15,6 +15,7 @@ case "$FIRMWARE" in netgear,wax214) caldata_extract "0:art" 0x1000 0x10000 ;; + qihoo,v6|\ redmi,ax5|\ xiaomi,ax1800) caldata_extract "0:art" 0x1000 0x10000 diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh index 1b025377131..733a79d6f3e 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh @@ -10,6 +10,7 @@ platform_check_image() { platform_do_upgrade() { case "$(board_name)" in + qihoo,v6|\ redmi,ax5|\ xiaomi,ax1800|\ netgear,wax214)