]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
qualcommax: ipq60xx: add JDCloud RE-CS-02 support
authorChukun Pan <amadeus@jmu.edu.cn>
Tue, 8 Apr 2025 14:19:30 +0000 (22:19 +0800)
committerRobert Marko <robimarko@gmail.com>
Sun, 18 Jan 2026 10:13:54 +0000 (11:13 +0100)
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 <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/19840
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/firmware/ipq-wifi/Makefile
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts [new file with mode: 0644]
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs.dtsi [new file with mode: 0644]
target/linux/qualcommax/image/ipq60xx.mk
target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network
target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh

index aa7a703122452c04a21447fc72aaeb1b8cdef360..f9a8b3e93ed00101d898108a77994ac51628f6b2 100644 (file)
@@ -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 (file)
index 0000000..6a7e3ef
--- /dev/null
@@ -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 = <KEY_RESTART>;
+                       gpios = <&tlmm 56 GPIO_ACTIVE_LOW>;
+               };
+
+               screen {
+                       label = "screen";
+                       linux,code = <BTN_1>;
+                       gpios = <&tlmm 71 GPIO_ACTIVE_LOW>;
+               };
+
+               wps {
+                       label = "wps";
+                       linux,code = <KEY_WPS_BUTTON>;
+                       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 = <ESS_PORT5>;
+       switch_mac_mode = <MAC_MODE_PSGMII>;
+       switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>;
+
+       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 (file)
index 0000000..7ff4326
--- /dev/null
@@ -0,0 +1,139 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ipq6018.dtsi"
+#include "ipq6018-ess.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+       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 = <LED_COLOR_ID_RED>;
+                       function = LED_FUNCTION_STATUS;
+                       gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>;
+               };
+
+               led_status_green: green {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_STATUS;
+                       gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
+               };
+
+               led_status_blue: blue {
+                       color = <LED_COLOR_ID_BLUE>;
+                       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>;
+               };
+       };
+};
index c9e8c650e21ddb1fb81f96b200a37a7542cae767..170b27f898b7165f5d0282767e3d10395c7b1d62 100644 (file)
@@ -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
index 76f8d21c217e1bbac7bc0191e0378c756727d89d..7cce06e3a37ee9dc126ac6e1947bc8528ab6d37e 100644 (file)
@@ -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)
index 40286e34fc3c49f1c73eed4c6688922e5800b228..a8ac052dc488df0ac370aa3f5b21463dfa4fd2cc 100644 (file)
@@ -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)
index e0212d8f876db12abaf0077a5026945b6e779055..844a7373acfb62e5c3ddd8a2052c68d7daae351d 100644 (file)
@@ -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)"