Skip to content

Commit

Permalink
qualcommax: ipq60xx: add ZN-M2 CMIOT-AX18
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenWrt Builder committed Mar 18, 2024
1 parent 646e803 commit fa2bf6c
Show file tree
Hide file tree
Showing 12 changed files with 421 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq60xx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ case "$board" in
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
;;
cmiot,ax18|\
zn,m2|\
qihoo,v6|\
redmi,ax5|\
xiaomi,ax1800|\
Expand Down
4 changes: 4 additions & 0 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ALLWIFIBOARDS:= \
8devices_mango \
arcadyan_aw1000 \
buffalo_wxr-5950ax12 \
cmiot_ax18 \
cmcc_rm2-6 \
compex_wpq873 \
dynalink_dl-wrx36 \
Expand All @@ -55,6 +56,7 @@ ALLWIFIBOARDS:= \
xiaomi_ax9000 \
yyets_le1 \
yuncore_ax880 \
zn_m2 \
zte_mf269 \
zte_mf287 \
zte_mf287plus \
Expand Down Expand Up @@ -151,6 +153,7 @@ endef
$(eval $(call generate-ipq-wifi-package,8devices_mango,8devices Mango))
$(eval $(call generate-ipq-wifi-package,arcadyan_aw1000,Arcadyan AW1000))
$(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
$(eval $(call generate-ipq-wifi-package,cmiot_ax18,CMIOT AX18))
$(eval $(call generate-ipq-wifi-package,cmcc_rm2-6,CMCC RM2-6))
$(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))
$(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
Expand All @@ -175,6 +178,7 @@ $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
$(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
$(eval $(call generate-ipq-wifi-package,yyets_le1,YYeTs LE1))
$(eval $(call generate-ipq-wifi-package,yuncore_ax880,Yuncore AX880))
$(eval $(call generate-ipq-wifi-package,zn_m2,ZN M2))
$(eval $(call generate-ipq-wifi-package,zte_mf269,ZTE MF269))
$(eval $(call generate-ipq-wifi-package,zte_mf287,ZTE MF287))
$(eval $(call generate-ipq-wifi-package,zte_mf287plus,ZTE MF287Plus))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// SPDX-License-Identifier: (GPL-2.0+)

/dts-v1/;

#include "ipq6018-cmiot.dtsi"

/ {
model = "CMIOT AX18";
compatible = "cmiot,ax18", "qcom,ipq6018";

aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};

leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";

led_power: power {
label = "ax18:blue:power";
gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
};

wan {
label = "ax18:blue:wan";
gpio = <&tlmm 74 GPIO_ACTIVE_HIGH>;
};

wlan2g {
label = "ax18:blue:wlan2g";
gpio = <&tlmm 37 GPIO_ACTIVE_HIGH>;
};

wlan5g {
label = "ax18:blue:wlan5g";
gpio = <&tlmm 35 GPIO_ACTIVE_HIGH>;
};

wps {
label = "ax18:red:wps";
gpio = <&tlmm 69 GPIO_ACTIVE_HIGH>;
};
};
};

&tlmm {
leds_pins: leds_pins {
mux_0 {
pins = "gpio35", "gpio37",
"gpio69", "gpio74";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};

mux_1 {
pins = "gpio73";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
};

&wifi {
qcom,ath11k-calibration-variant = "CMIOT-AX18";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
// SPDX-License-Identifier: (GPL-2.0+)

/dts-v1/;

#include "ipq6018.dtsi"
#include "ipq6018-ess.dtsi"
#include "ipq6018-cp-cpu.dtsi"
#include "ipq6018-cpufreq.dtsi"

#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>

/ {
aliases {
serial0 = &blsp1_uart3;

/* Aliases as required by u-boot to patch MAC addresses */
ethernet0 = &dp1;
ethernet1 = &dp2;
ethernet3 = &dp4;
ethernet4 = &dp5;
};

chosen {
bootargs-append = " root=/dev/ubiblock0_1 swiotlb=1";
};

keys {
compatible = "gpio-keys";

reset {
label = "reset";
gpios = <&tlmm 60 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};

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

&blsp1_uart3 {
pinctrl-0 = <&serial_3_pins>;
pinctrl-names = "default";
status = "okay";
};

&tlmm {
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;
};
};

button_pins: button_pins {
wps_button {
pins = "gpio9";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};

reset_button {
pins = "gpio60";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
};


&dp1 {
status = "okay";
phy-handle = <&qca8075_0>;
};

&dp2 {
status = "okay";
phy-handle = <&qca8075_1>;
};

&dp4 {
status = "okay";
phy-handle = <&qca8075_3>;
};

&dp5 {
status = "okay";
phy-handle = <&qca8075_4>;
};

&edma {
status = "okay";
};

&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_3: ethernet-phy@3 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <3>;
};

qca8075_4: ethernet-phy@4 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <4>;
};
};

&switch {
status = "okay";

switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT4)>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
switch_mac_mode = <MAC_MODE_DISABLED>; /* MAC mode for UNIPHY instance 0 */
switch_mac_mode1 = <MAC_MODE_DISABLED>; /* MAC mode for UNIPHY instance 1 */
switch_mac_mode2 = <MAC_MODE_DISABLED>; /* MAC mode for UNIPHY instance 2 */

qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <0>;
};
port@1 {
port_id = <2>;
phy_address = <1>;
};
port@2 {
port_id = <4>;
phy_address = <3>;
};
port@3 {
port_id = <5>;
phy_address = <4>;
};
};
};

&qpic_bam {
status = "okay";
};

&qpic_nand {
status = "okay";

nand@0 {
reg = <0>;

nand-ecc-strength = <4>;
nand-ecc-step-size = <512>;
nand-bus-width = <8>;
};
};

&prng {
status = "okay";
};

&cryptobam {
status = "okay";
};

&crypto {
status = "okay";
};

&qpic_bam {
status = "okay";
};

&qusb_phy_0 {
status = "okay";
};

&qusb_phy_1 {
status = "okay";
};


&ssphy_0 {
status = "okay";
};

&usb3 {
status = "okay";
};

&usb2 {
status = "okay";
};

&edma {
status = "okay";
};

&wifi {
status = "okay";
qcom,ath11k-fw-memory-mode = <2>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
// Overclock CPU frequency to 1.6GHz
&cpu_opp_table {
opp-1608000000 {
opp-supported-hw = <0x3>;
};
};
Loading

0 comments on commit fa2bf6c

Please sign in to comment.