From 16422510b52af3f14d126923968d34373ef6c7b7 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Wed, 2 Apr 2025 22:01:30 +0800 Subject: [PATCH] qualcommax: ipq60xx: add JDCloud RE-SS-01 support Specifications: SoC: Qualcomm IPQ6000 1.2GHz RAM: NT52CB256MB16DP 512MiB Flash: FORESEE 64GB/128GB eMMC ETH: QCA8075 (3x LAN, 1x WAN) WLAN1: QCN5022 2.4GHz AX 2x2 WLAN2: QCN5052 5GHz AX 2x2 Power: DC 12V 2A Button: Reset, Wps 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/19780 Signed-off-by: Robert Marko --- package/firmware/ipq-wifi/Makefile | 2 + .../arm64/boot/dts/qcom/ipq6000-re-ss-01.dts | 225 ++++++++++++++++++ target/linux/qualcommax/image/ipq60xx.mk | 12 + .../ipq60xx/base-files/etc/board.d/02_network | 7 +- .../etc/hotplug.d/firmware/11-ath11k-caldata | 3 + .../base-files/lib/upgrade/platform.sh | 12 + 6 files changed, 258 insertions(+), 3 deletions(-) create mode 100644 target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-re-ss-01.dts diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index d3d30eb59b6..aa7a7031224 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-ss-01 \ linksys_homewrk \ linksys_mr5500 \ linksys_mr6350 \ @@ -229,6 +230,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-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)) $(eval $(call generate-ipq-wifi-package,linksys_mr6350,Linksys MR6350)) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-re-ss-01.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-re-ss-01.dts new file mode 100644 index 00000000000..a71574cc4f5 --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-re-ss-01.dts @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "ipq6018-512m.dtsi" +#include "ipq6018-ess.dtsi" + +#include +#include +#include + +/ { + model = "JDCloud RE-SS-01"; + compatible = "jdcloud,re-ss-01", "qcom,ipq6018"; + + aliases { + ethernet1 = &dp2; + ethernet2 = &dp3; + ethernet3 = &dp4; + ethernet4 = &dp5; + serial0 = &blsp1_uart3; + + label-mac-device = &dp2; + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_green; + led-upgrade = &led_status_blue; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + wps { + label = "wps"; + linux,code = ; + gpios = <&tlmm 8 GPIO_ACTIVE_LOW>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: red { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>; + }; + + led_status_blue: blue { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>; + }; + + led_status_green: green { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&tlmm { + gpio-reserved-ranges = <20 1>; + + button_pins: button-pins { + mux { + pins = "gpio8", "gpio9"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + 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 { + 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@0 { + compatible = "qcom,qca8075-package"; + #address-cells = <1>; + #size-cells = <0>; + 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>; + }; + + qca8075_4: ethernet-phy@4 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <4>; + }; + }; +}; + +&switch { + status = "okay"; + + switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; + switch_wan_bmp = ; + switch_mac_mode = ; + + qcom,port_phyinfo { + port@2 { + port_id = <2>; + phy_address = <1>; + }; + port@3 { + port_id = <3>; + phy_address = <2>; + }; + port@4 { + port_id = <4>; + phy_address = <3>; + }; + port@5 { + port_id = <5>; + phy_address = <4>; + }; + }; +}; + +&edma { + status = "okay"; +}; + +&dp2 { + status = "okay"; + phy-handle = <&qca8075_1>; + label = "lan1"; +}; + +&dp3 { + status = "okay"; + phy-handle = <&qca8075_2>; + label = "lan2"; +}; + +&dp4 { + status = "okay"; + phy-handle = <&qca8075_3>; + label = "lan3"; +}; + +&dp5 { + status = "okay"; + phy-handle = <&qca8075_4>; + label = "wan"; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "JDC-RE-SS-01"; + qcom,ath11k-fw-memory-mode = <1>; +}; diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index 7e38d384a81..c9e8c650e21 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-ss-01 + $(call Device/FitImage) + DEVICE_VENDOR := JDCloud + DEVICE_MODEL := RE-SS-01 + SOC := ipq6000 + BLOCKSIZE := 64k + KERNEL_SIZE := 6144k + DEVICE_DTS_CONFIG := config@cp03-c2 + DEVICE_PACKAGES := ipq-wifi-jdcloud_re-ss-01 +endef +TARGET_DEVICES += jdcloud_re-ss-01 + define Device/linksys_mr $(call Device/FitImage) DEVICE_VENDOR := Linksys 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 b8b22bcffeb..76f8d21c217 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 @@ -27,12 +27,13 @@ ipq60xx_setup_interfaces() yuncore,fap650) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; - netgear,wax214) - ucidef_set_interfaces_lan_wan "lan" - ;; + jdcloud,re-ss-01|\ qihoo,360v6) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; + netgear,wax214) + ucidef_set_interfaces_lan_wan "lan" + ;; netgear,wax610|\ netgear,wax610y|\ tplink,eap610-outdoor|\ 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 8d323563bf5..40286e34fc3 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,9 @@ case "$FIRMWARE" in ath11k_patch_mac $(macaddr_add $label_mac 2) 1 ath11k_set_macflag ;; + jdcloud,re-ss-01) + caldata_extract_mmc "0:ART" 0x1000 0x10000 + ;; linksys,mr7350|\ linksys,mr7500) caldata_extract "0:art" 0x1000 0x10000 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 edd01271439..e0212d8f876 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,18 @@ platform_do_upgrade() { remove_oem_ubi_volume ubi_rootfs nand_do_upgrade "$1" ;; + 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)" + if [ "$part_num" -eq "1" ]; then + CI_KERNPART="0:HLOS_1" + CI_ROOTPART="rootfs_1" + else + CI_KERNPART="0:HLOS" + CI_ROOTPART="rootfs" + fi + emmc_do_upgrade "$1" + ;; netgear,wax610|\ netgear,wax610y) remove_oem_ubi_volume wifi_fw -- 2.47.3