From: Chukun Pan Date: Tue, 8 Apr 2025 14:19:30 +0000 (+0800) Subject: qualcommax: ipq60xx: add JDCloud RE-CS-02 support X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53a8e7b2d47ca12a9fbb63e95da45ca59f117f8e;p=thirdparty%2Fopenwrt.git qualcommax: ipq60xx: add JDCloud RE-CS-02 support Specifications: SoC: Qualcomm IPQ6010 1.8GHz RAM: K4A4G165WF-BCTD x2 1GiB Flash: FORESEE 128GB/256GB eMMC ETH: 4x 1Gbps + 1x 2.5Gbps WLAN1: QCN5022 2.4GHz AX 2x2 WLAN2: QCN5052 5.8GHz AX 2x2 WLAN2: QCN9024 5.2GHz AX 4x4 Button: Reset, Screen, Wps Power: DC 12V 3A USB: 1x 3.0 Flash instructions: 1. Download the initramfs image, rename it to initramfs.itb, host it with the tftp server. 2. If the stock firmware version is 4.3.0.r4211 or higher, enter "jdmt018R" to interrupt U-Boot when the following statement appears: "disabled console and autoboot in 2 seconds" 3. Run these commands in U-Boot console: tftpboot initramfs.itb bootm 4. After openwrt boots up, use scp or luci web to upload sysupgrade.bin to upgrade. Signed-off-by: Chukun Pan Link: https://github.com/openwrt/openwrt/pull/19840 Signed-off-by: Robert Marko --- diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index aa7a7031224..f9a8b3e93ed 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -46,6 +46,7 @@ ALLWIFIBOARDS:= \ glinet_gl-b3000 \ ignitenet_ss-w2-ac2600 \ iodata_wn-dax3000gr \ + jdcloud_re-cs-02 \ jdcloud_re-ss-01 \ linksys_homewrk \ linksys_mr5500 \ @@ -230,6 +231,7 @@ $(eval $(call generate-ipq-wifi-package,glinet_gl-axt1800,GL.iNet GL-AXT1800)) $(eval $(call generate-ipq-wifi-package,glinet_gl-b3000,GL.iNet GL-B3000)) $(eval $(call generate-ipq-wifi-package,ignitenet_ss-w2-ac2600,Ignitenet SS-W2-AC2600)) $(eval $(call generate-ipq-wifi-package,iodata_wn-dax3000gr,I-O DATA WN-DAX3000GR)) +$(eval $(call generate-ipq-wifi-package,jdcloud_re-cs-02,JDCloud RE-CS-02)) $(eval $(call generate-ipq-wifi-package,jdcloud_re-ss-01,JDCloud RE-SS-01)) $(eval $(call generate-ipq-wifi-package,linksys_homewrk,Linksys HomeWRK)) $(eval $(call generate-ipq-wifi-package,linksys_mr5500,Linksys MR5500)) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts new file mode 100644 index 00000000000..6a7e3eff3df --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "ipq6010-re-cs.dtsi" + +/ { + model = "JDCloud RE-CS-02"; + compatible = "jdcloud,re-cs-02", "qcom,ipq6018"; + + aliases { + ethernet0 = &dp1; + ethernet1 = &dp2; + ethernet2 = &dp3; + ethernet3 = &dp4; + ethernet4 = &dp5; + + label-mac-device = &dp1; + serial0 = &blsp1_uart3; + serial1 = &blsp1_uart6; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&tlmm 56 GPIO_ACTIVE_LOW>; + }; + + screen { + label = "screen"; + linux,code = ; + gpios = <&tlmm 71 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "wps"; + linux,code = ; + gpios = <&tlmm 72 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&tlmm { + button_pins: button-pins { + mux { + pins = "gpio56", "gpio71", "gpio72"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + btuart_pins: btuart-pins { + mux { + pins = "gpio48", "gpio49"; + function = "blsp5_uart"; + drive-strength = <8>; + bias-pull-up; + }; + }; +}; + +&blsp1_uart6 { + pinctrl-0 = <&btuart_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pcie_phy { + status = "okay"; +}; + +&pcie0 { + perst-gpio = <&tlmm 53 GPIO_ACTIVE_LOW>; + status = "okay"; + + pcie@0 { + wifi@0,0 { + compatible = "pci17cb,1104"; + reg = <0x00010000 0 0 0 0>; + qcom,ath11k-calibration-variant = "JDC-RE-CS-02"; + }; + }; +}; + +&mdio { + qca8081: ethernet-phy@12 { + compatible = "ethernet-phy-id004d.d101"; + reg = <12>; + reset-deassert-us = <10000>; + reset-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>; + }; +}; + +&switch { + status = "okay"; + + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; + switch_wan_bmp = ; + switch_mac_mode = ; + switch_mac_mode1 = ; + + qcom,port_phyinfo { + port@1 { + port_id = <1>; + phy_address = <24>; + }; + port@2 { + port_id = <2>; + phy_address = <25>; + }; + port@3 { + port_id = <3>; + phy_address = <26>; + }; + port@4 { + port_id = <4>; + phy_address = <27>; + }; + port@5 { + port_id = <5>; + phy_address = <12>; + port_mac_sel = "QGMAC_PORT"; + }; + }; +}; + +&edma { + status = "okay"; +}; + +&dp1 { + status = "okay"; + phy-handle = <&qca8075_0>; + label = "lan1"; +}; + +&dp2 { + status = "okay"; + phy-handle = <&qca8075_1>; + label = "lan2"; +}; + +&dp3 { + status = "okay"; + phy-handle = <&qca8075_2>; + label = "lan3"; +}; + +&dp4 { + status = "okay"; + phy-handle = <&qca8075_3>; + label = "lan4"; +}; + +&dp5 { + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&qca8081>; + label = "wan"; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "JDC-RE-CS-02"; +}; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs.dtsi b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs.dtsi new file mode 100644 index 00000000000..7ff432613a5 --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs.dtsi @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ipq6018.dtsi" +#include "ipq6018-ess.dtsi" + +#include +#include +#include + +/ { + aliases { + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_green; + led-upgrade = &led_status_blue; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: red { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>; + }; + + led_status_green: green { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>; + }; + + led_status_blue: blue { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 79 GPIO_ACTIVE_HIGH>; + }; + }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; +}; + +&tlmm { + gpio-reserved-ranges = <20 1>; + + 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; + }; + }; +}; + +&blsp1_uart3 { + pinctrl-0 = <&serial_3_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&qusb_phy_0 { + vdd-supply = <&usb_vbus>; + status = "okay"; +}; + +&rpm { + status = "disabled"; +}; + +&sdhc { + bus-width = <8>; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + non-removable; + status = "okay"; +}; + +&ssphy_0 { + status = "okay"; +}; + +&usb3 { + status = "okay"; +}; + +&mdio { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; + + ethernet-phy-package@24 { + compatible = "qcom,qca8075-package"; + #address-cells = <1>; + #size-cells = <0>; + reg = <24>; + + qca8075_0: ethernet-phy@24 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <24>; + }; + + qca8075_1: ethernet-phy@25 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <25>; + }; + + qca8075_2: ethernet-phy@26 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <26>; + }; + + qca8075_3: ethernet-phy@27 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <27>; + }; + }; +}; diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index c9e8c650e21..170b27f898b 100644 --- a/target/linux/qualcommax/image/ipq60xx.mk +++ b/target/linux/qualcommax/image/ipq60xx.mk @@ -76,6 +76,18 @@ define Device/glinet_gl-axt1800 endef TARGET_DEVICES += glinet_gl-axt1800 +define Device/jdcloud_re-cs-02 + $(call Device/FitImage) + DEVICE_VENDOR := JDCloud + DEVICE_MODEL := RE-CS-02 + SOC := ipq6010 + BLOCKSIZE := 64k + KERNEL_SIZE := 6144k + DEVICE_DTS_CONFIG := config@cp03-c3 + DEVICE_PACKAGES := ath11k-firmware-qcn9074 ipq-wifi-jdcloud_re-cs-02 kmod-ath11k-pci +endef +TARGET_DEVICES += jdcloud_re-cs-02 + define Device/jdcloud_re-ss-01 $(call Device/FitImage) DEVICE_VENDOR := JDCloud 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 76f8d21c217..7cce06e3a37 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 @@ -22,6 +22,7 @@ ipq60xx_setup_interfaces() ucidef_set_interface_lan "lan1 lan2" "dhcp" ;; glinet,gl-ax1800|\ + jdcloud,re-cs-02|\ linksys,mr7350|\ linksys,mr7500|\ yuncore,fap650) diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata index 40286e34fc3..a8ac052dc48 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata @@ -30,6 +30,7 @@ case "$FIRMWARE" in ath11k_patch_mac $(macaddr_add $label_mac 2) 1 ath11k_set_macflag ;; + jdcloud,re-cs-02|\ jdcloud,re-ss-01) caldata_extract_mmc "0:ART" 0x1000 0x10000 ;; @@ -79,6 +80,9 @@ case "$FIRMWARE" in cambiumnetworks,xe3-4) caldata_extract "0:ART" 0x26800 0x20000 ;; + jdcloud,re-cs-02) + caldata_extract_mmc "0:ART" 0x26800 0x20000 + ;; linksys,mr7500) caldata_extract "0:art" 0x26800 0x20000 addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) 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 e0212d8f876..844a7373acf 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh @@ -166,6 +166,7 @@ platform_do_upgrade() { remove_oem_ubi_volume ubi_rootfs nand_do_upgrade "$1" ;; + jdcloud,re-cs-02|\ jdcloud,re-ss-01) local cfgpart=$(find_mmc_part "0:BOOTCONFIG") part_num="$(hexdump -e '1/1 "%01x|"' -n 1 -s 148 -C $cfgpart | cut -f 1 -d "|" | head -n1)"