diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index f7cfe3b36ba10f..18dcb5c3d89498 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -152,6 +152,7 @@ $(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,cmcc_rm2-6,CMCC RM2-6)) +$(eval $(call generate-ipq-wifi-package,cmiot_ax18,CMIOT AX18)) $(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873)) $(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36)) $(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102)) diff --git a/package/firmware/ipq-wifi/src/board-cmiot_ax18.ipq6018 b/package/firmware/ipq-wifi/src/board-cmiot_ax18.ipq6018 new file mode 100644 index 00000000000000..5436c2c3f5ba9a Binary files /dev/null and b/package/firmware/ipq-wifi/src/board-cmiot_ax18.ipq6018 differ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-ax18.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-ax18.dts new file mode 100644 index 00000000000000..f42754f4f348c2 --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-ax18.dts @@ -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"; +}; \ No newline at end of file diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-cmiot.dtsi b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-cmiot.dtsi new file mode 100644 index 00000000000000..5bb65bb5be20b2 --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-cmiot.dtsi @@ -0,0 +1,245 @@ +// SPDX-License-Identifier: (GPL-2.0+) + +/dts-v1/; + +#include "ipq6018.dtsi" +#include "ipq6018-ess.dtsi" +#include "ipq6018-256m.dtsi" + + +#include +#include + +/ { + aliases { + serial0 = &blsp1_uart3; + + /* Aliases as required by u-boot to patch MAC addresses */ + ethernet0 = &dp1; + ethernet1 = &dp2; + ethernet2 = &dp3; + ethernet3 = &dp4; + }; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1 swiotlb=1"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 60 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&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 { + phy-handle = <&phy_0>; + status = "okay"; +}; + +&dp2 { + phy-handle = <&phy_1>; + status = "okay"; +}; + +&dp3 { + phy-handle = <&phy_2>; + status = "okay"; +}; + +&dp4 { + phy-handle = <&phy_3>; + status = "okay"; +}; + +&edma { + status = "okay"; +}; + +&mdio { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; + + ethernet_0: ethernet-phy-package@0 { + compatible = "qcom,qca8075-package"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + qcom,package-mode = "psgmii"; + + phy_0: ethernet-phy@0 { + reg = <4>; + }; + + phy_1: ethernet-phy@1 { + reg = <0>; + }; + + phy_2: ethernet-phy@2 { + reg = <1>; + }; + + phy_3: ethernet-phy@3 { + reg = <3>; + }; + }; +}; + +&switch { + status = "okay"; + + qcom,port_phyinfo { + port@0 { + port_id = <0x01>; + phy_address = <0x00>; + }; + port@1 { + port_id = <0x02>; + phy_address = <0x01>; + }; + port@2 { + port_id = <0x04>; + phy_address = <0x03>; + }; + port@3 { + port_id = <0x05>; + phy_address = <0x04>; + }; + }; +}; + +&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"; +}; + +&rpm { + status = "disabled"; +}; + +&wifi { + status = "okay"; + qcom,ath11k-fw-memory-mode = <2>; + }; + + +&CPU0 { + /delete-property/ cpu-supply; +}; + +&CPU1 { + /delete-property/ cpu-supply; +}; + +&CPU2 { + /delete-property/ cpu-supply; +}; + +&CPU3 { + /delete-property/ cpu-supply; +}; \ No newline at end of file diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index 7e4e420c745273..47db86bdb82c6c 100644 --- a/target/linux/qualcommax/image/ipq60xx.mk +++ b/target/linux/qualcommax/image/ipq60xx.mk @@ -17,6 +17,19 @@ define Device/EmmcImage IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | sysupgrade-tar rootfs=$$$$@ | append-metadata endef +define Device/cmiot_ax18 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := CMIOT + DEVICE_MODEL := AX18 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_DTS_CONFIG := config@cp03-c1 + SOC := ipq6018 + DEVICE_PACKAGES := ipq-wifi-cmiot_ax18 kmod-fs-ext4 mkf2fs f2fsck kmod-fs-f2fs +endef +TARGET_DEVICES += cmiot_ax18 + define Device/glinet_gl-ax1800 $(call Device/FitImage) $(call Device/UbiFit) diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds index c1d025a34eed3b..a557d4901cc3f9 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds @@ -6,6 +6,11 @@ board_config_update board=$(board_name) case "$board" in + cmiot,ax18) + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0" + ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "wlan1" + ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "wlan0" + ;; jdc,ax1800-pro) ucidef_set_led_netdev "wan" "WAN" "net_blue" "eth3" ;; 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 95b4f44bcb4128..a1f6e23e098402 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 @@ -14,6 +14,9 @@ ipq60xx_setup_interfaces() 8devices,mango-dvk) ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" ;; + cmiot,ax18) + ucidef_set_interfaces_lan_wan "eth1 eth2 eth3" "eth0" + ;; glinet,gl-ax1800) ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4" "eth0" ;; 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 b9ac4be98269f0..3d5058cc7a1b53 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 @@ -12,6 +12,7 @@ case "$FIRMWARE" in 8devices,mango-dvk) caldata_extract "0:ART" 0x1000 0x20000 ;; + cmiot,ax18|\ glinet,gl-ax1800|\ glinet,gl-axt1800|\ netgear,wax214) 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 8526a664cbf90b..7d1c201828924c 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 + cmiot,ax18|\ glinet,gl-ax1800|\ glinet,gl-axt1800|\ netgear,wax214)