Skip to content

Commit 025dbeb

Browse files
aiamadeusrobimarko
authored andcommitted
qualcommax: ipq60xx: add Qihoo 360V6 support
Specifications: SoC: Qualcomm IPQ6000 1.5GHz RAM: NTCC256M16ER-EK 512MiB Flash: W29N01HZSINA 128MiB ETH: QCA8075 (3x LAN, 1x WAN) WLAN1: 2.4GHz 802.11b/g/n/ax 2x2 WLAN2: 5GHz 802.11a/n/ac/ax 2x2 Power: DC 12V 1.5A Button: Reset, Wps USB: 1x 2.0 Flash instructions: 1. Download the initramfs image, rename it to initramfs.itb, host it with the tftp server. 2. Interrupt U-Boot and run these commands: tftpboot initramfs.itb bootm 3. After openwrt boots up, use scp or luci web to upload sysupgrade.bin to upgrade. Signed-off-by: Chukun Pan <[email protected]> Link: openwrt/openwrt#15940 Signed-off-by: Robert Marko <[email protected]>
1 parent 7e18e27 commit 025dbeb

File tree

6 files changed

+267
-1
lines changed

6 files changed

+267
-1
lines changed

package/firmware/ipq-wifi/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ ALLWIFIBOARDS:= \
4949
netgear_wax620 \
5050
netgear_wax630 \
5151
prpl_haze \
52+
qihoo_360v6 \
5253
qnap_301w \
5354
redmi_ax6 \
5455
skspruce_wia3300-20 \
@@ -175,6 +176,7 @@ $(eval $(call generate-ipq-wifi-package,netgear_wax214,Netgear WAX214))
175176
$(eval $(call generate-ipq-wifi-package,netgear_wax218,Netgear WAX218))
176177
$(eval $(call generate-ipq-wifi-package,netgear_wax620,Netgear WAX620))
177178
$(eval $(call generate-ipq-wifi-package,netgear_wax630,Netgear WAX630))
179+
$(eval $(call generate-ipq-wifi-package,qihoo_360v6,Qihoo 360V6))
178180
$(eval $(call generate-ipq-wifi-package,qnap_301w,QNAP 301w))
179181
$(eval $(call generate-ipq-wifi-package,prpl_haze,prpl Haze))
180182
$(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2+
3+
/dts-v1/;
4+
5+
#include "ipq6018-512m.dtsi"
6+
#include "ipq6018-ess.dtsi"
7+
#include "ipq6018-cp-cpu.dtsi"
8+
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include <dt-bindings/input/input.h>
11+
#include <dt-bindings/leds/common.h>
12+
13+
/ {
14+
model = "Qihoo 360V6";
15+
compatible = "qihoo,360v6", "qcom,ipq6018";
16+
17+
aliases {
18+
serial0 = &blsp1_uart3;
19+
led-boot = &led_status_red;
20+
led-failsafe = &led_status_red;
21+
led-running = &led_status_green;
22+
led-upgrade = &led_status_orange;
23+
};
24+
25+
chosen {
26+
stdout-path = "serial0:115200n8";
27+
bootargs-append = " root=/dev/ubiblock0_1";
28+
};
29+
30+
keys {
31+
compatible = "gpio-keys";
32+
33+
wps {
34+
label = "wps";
35+
linux,code = <KEY_WPS_BUTTON>;
36+
gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
37+
};
38+
39+
reset {
40+
label = "reset";
41+
linux,code = <KEY_RESTART>;
42+
gpios = <&tlmm 68 GPIO_ACTIVE_LOW>;
43+
};
44+
};
45+
46+
leds {
47+
compatible = "gpio-leds";
48+
49+
led_status_red: red {
50+
color = <LED_COLOR_ID_RED>;
51+
function = LED_FUNCTION_STATUS;
52+
gpios = <&tlmm 71 GPIO_ACTIVE_HIGH>;
53+
};
54+
55+
led_status_orange: orange {
56+
color = <LED_COLOR_ID_ORANGE>;
57+
function = LED_FUNCTION_STATUS;
58+
gpios = <&tlmm 72 GPIO_ACTIVE_HIGH>;
59+
};
60+
61+
led_status_green: green {
62+
color = <LED_COLOR_ID_GREEN>;
63+
function = LED_FUNCTION_STATUS;
64+
gpios = <&tlmm 73 GPIO_ACTIVE_HIGH>;
65+
};
66+
};
67+
};
68+
69+
&tlmm {
70+
mdio_pins: mdio-pins {
71+
mdc {
72+
pins = "gpio64";
73+
function = "mdc";
74+
drive-strength = <8>;
75+
bias-pull-up;
76+
};
77+
78+
mdio {
79+
pins = "gpio65";
80+
function = "mdio";
81+
drive-strength = <8>;
82+
bias-pull-up;
83+
};
84+
};
85+
};
86+
87+
&blsp1_uart3 {
88+
pinctrl-0 = <&serial_3_pins>;
89+
pinctrl-names = "default";
90+
status = "okay";
91+
};
92+
93+
&qpic_bam {
94+
status = "okay";
95+
};
96+
97+
&qpic_nand {
98+
status = "okay";
99+
100+
nand@0 {
101+
reg = <0>;
102+
nand-ecc-strength = <4>;
103+
nand-ecc-step-size = <512>;
104+
nand-bus-width = <8>;
105+
106+
partitions {
107+
compatible = "qcom,smem-part";
108+
};
109+
};
110+
};
111+
112+
&qusb_phy_0 {
113+
status = "okay";
114+
};
115+
116+
&ssphy_0 {
117+
status = "okay";
118+
};
119+
120+
&usb3 {
121+
status = "okay";
122+
};
123+
124+
&mdio {
125+
status = "okay";
126+
127+
pinctrl-0 = <&mdio_pins>;
128+
pinctrl-names = "default";
129+
reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
130+
131+
ethernet-phy-package@0 {
132+
compatible = "qcom,qca8075-package";
133+
#address-cells = <1>;
134+
#size-cells = <0>;
135+
reg = <0>;
136+
137+
qca8075_0: ethernet-phy@0 {
138+
compatible = "ethernet-phy-ieee802.3-c22";
139+
reg = <0>;
140+
};
141+
142+
qca8075_1: ethernet-phy@1 {
143+
compatible = "ethernet-phy-ieee802.3-c22";
144+
reg = <1>;
145+
};
146+
147+
qca8075_2: ethernet-phy@2 {
148+
compatible = "ethernet-phy-ieee802.3-c22";
149+
reg = <2>;
150+
};
151+
152+
qca8075_3: ethernet-phy@3 {
153+
compatible = "ethernet-phy-ieee802.3-c22";
154+
reg = <3>;
155+
};
156+
};
157+
};
158+
159+
&switch {
160+
status = "okay";
161+
162+
switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3)>;
163+
switch_wan_bmp = <ESS_PORT4>;
164+
switch_mac_mode = <MAC_MODE_PSGMII>;
165+
166+
qcom,port_phyinfo {
167+
port@1 {
168+
port_id = <1>;
169+
phy_address = <0>;
170+
};
171+
port@2 {
172+
port_id = <2>;
173+
phy_address = <1>;
174+
};
175+
port@3 {
176+
port_id = <3>;
177+
phy_address = <2>;
178+
};
179+
port@4 {
180+
port_id = <4>;
181+
phy_address = <3>;
182+
};
183+
};
184+
};
185+
186+
&edma {
187+
status = "okay";
188+
};
189+
190+
&dp1 {
191+
status = "okay";
192+
phy-handle = <&qca8075_0>;
193+
label = "lan1";
194+
};
195+
196+
&dp2 {
197+
status = "okay";
198+
phy-handle = <&qca8075_1>;
199+
label = "lan2";
200+
};
201+
202+
&dp3 {
203+
status = "okay";
204+
phy-handle = <&qca8075_2>;
205+
label = "lan3";
206+
};
207+
208+
&dp4 {
209+
status = "okay";
210+
phy-handle = <&qca8075_3>;
211+
label = "wan";
212+
};
213+
214+
&wifi {
215+
status = "okay";
216+
217+
qcom,ath11k-fw-memory-mode = <1>;
218+
qcom,ath11k-calibration-variant = "Qihoo-360V6";
219+
};

target/linux/qualcommax/image/ipq60xx.mk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ define Device/netgear_wax214
3737
endef
3838
TARGET_DEVICES += netgear_wax214
3939

40+
define Device/qihoo_360v6
41+
$(call Device/FitImage)
42+
$(call Device/UbiFit)
43+
DEVICE_VENDOR := Qihoo
44+
DEVICE_MODEL := 360V6
45+
BLOCKSIZE := 128k
46+
PAGESIZE := 2048
47+
SOC := ipq6000
48+
DEVICE_DTS_CONFIG := config@cp03-c1
49+
DEVICE_PACKAGES := ipq-wifi-qihoo_360v6
50+
endef
51+
TARGET_DEVICES += qihoo_360v6
52+
4053
define Device/yuncore_fap650
4154
$(call Device/FitImage)
4255
$(call Device/UbiFit)

target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ ipq60xx_setup_interfaces()
2020
netgear,wax214)
2121
ucidef_set_interfaces_lan_wan "lan"
2222
;;
23+
qihoo,360v6)
24+
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
25+
;;
2326
yuncore,fap650)
2427
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
2528
;;
@@ -29,9 +32,30 @@ ipq60xx_setup_interfaces()
2932
esac
3033
}
3134

35+
ipq60xx_setup_macs()
36+
{
37+
local board="$1"
38+
local lan_mac=""
39+
local wan_mac=""
40+
local label_mac=""
41+
42+
case "$board" in
43+
qihoo,360v6)
44+
lan_mac=$(mtd_get_mac_ascii factory lanMac)
45+
wan_mac=$(macaddr_add "$lan_mac" 1)
46+
label_mac=$lan_mac
47+
;;
48+
esac
49+
50+
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
51+
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
52+
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
53+
}
54+
3255
board_config_update
3356
board=$(board_name)
3457
ipq60xx_setup_interfaces $board
58+
ipq60xx_setup_macs $board
3559
board_config_flush
3660

3761
exit 0

target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ case "$FIRMWARE" in
1818
netgear,wax214)
1919
caldata_extract "0:art" 0x1000 0x10000
2020
;;
21+
qihoo,360v6)
22+
caldata_extract "0:art" 0x1000 0x10000
23+
label_mac=$(mtd_get_mac_ascii factory lanMac)
24+
ath11k_patch_mac $(macaddr_add $label_mac 3) 0
25+
ath11k_patch_mac $(macaddr_add $label_mac 2) 1
26+
ath11k_set_macflag
27+
;;
2128
yuncore,fap650)
2229
caldata_extract "0:art" 0x1000 0x20000
2330
;;

target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ platform_do_upgrade() {
3737
fw_setenv bootcount 0
3838
nand_do_upgrade "$1"
3939
;;
40-
netgear,wax214)
40+
netgear,wax214|\
41+
qihoo,360v6)
4142
nand_do_upgrade "$1"
4243
;;
4344
yuncore,fap650)

0 commit comments

Comments
 (0)