Skip to content

Commit

Permalink
qualcommax: ipq60xx: add 360v6
Browse files Browse the repository at this point in the history
qualcommax: ipq60xx: add 360v6
  • Loading branch information
OpenWrt Builder committed Mar 18, 2024
1 parent aa79059 commit 646e803
Show file tree
Hide file tree
Showing 7 changed files with 307 additions and 3 deletions.
1 change: 1 addition & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq60xx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,19 @@ 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 \
yuncore_ax880 \
zte_mf269 \
zte_mf287 \
zte_mf287plus \
zyxel_nbg7815
zyxel_nbg7815 \

ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))

Expand Down Expand Up @@ -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))
Expand Down
283 changes: 283 additions & 0 deletions target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-v6.dts
Original file line number Diff line number Diff line change
@@ -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 <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>

/ {
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 = <KEY_RESTART>;
};

wps {
label = "wps";
gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};

&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";
};
13 changes: 13 additions & 0 deletions target/linux/qualcommax/image/ipq60xx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ platform_check_image() {

platform_do_upgrade() {
case "$(board_name)" in
qihoo,v6|\
redmi,ax5|\
xiaomi,ax1800|\
netgear,wax214)
Expand Down

0 comments on commit 646e803

Please sign in to comment.