Skip to content

Commit

Permalink
ipq60xx: jdcloud re-cs-07 (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
breeze303 committed Nov 1, 2024
1 parent 299e4c9 commit 157f38f
Show file tree
Hide file tree
Showing 5 changed files with 310 additions and 0 deletions.
1 change: 1 addition & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq60xx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ netgear,wax214)
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
jdcloud,re-cs-07|\
redmi,ax5-jdcloud|\
jdcloud,ax1800-pro|\
jdcloud,ax6600)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,292 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;

#include "ipq6018.dtsi"
#include "ipq6018-ess.dtsi"
#include "ipq6018-nss.dtsi"

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

/ {
model = "JDCloud RE-CS-07";
compatible = "jdcloud,re-cs-07", "qcom,ipq6018";

aliases {
serial0 = &blsp1_uart3;
serial1 = &blsp1_uart6;
led-boot = &led_status_green;
led-failsafe = &led_status_red;
led-running = &led_status_blue;
led-upgrade = &led_status_red;

ethernet0 = "/soc/dp1";
ethernet1 = "/soc/dp2";
ethernet2 = "/soc/dp3";
ethernet3 = "/soc/dp4";
ethernet4 = "/soc/dp5";
};

chosen {
stdout-path = "serial0:115200n8";
};

keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";

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

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

leds {
compatible = "gpio-leds";

led_status_red: red {
label = "red:status";
gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>;
};

led_status_blue: blue {
label = "blue:status";
gpios = <&tlmm 79 GPIO_ACTIVE_HIGH>;
};

led_status_green: green {
label = "green:status";
gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
};
};
};

&tlmm {
gpio-reserved-ranges = <20 1>;

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;
};
};

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 {
joylink_button {
pins = "gpio72";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};

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

screen_button {
pins = "gpio71";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
};

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

&blsp1_uart6 {
pinctrl-0 = <&btuart_pins>;
pinctrl-names = "default";
status = "okay";
};

&pcie_phy {
status = "okay";
};

&qusb_phy_0 {
status = "okay";
};

&rpm {
status = "disabled";
};

&sdhc_1 {
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>;

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>;
};

qca8081: ethernet-phy@12 {
compatible = "ethernet-phy-id004d.d101";
reg = <12>;
reset-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
};
};

&switch {
status = "okay";

switch_cpu_bmp = <0x1>; /* cpu port bitmap */
switch_lan_bmp = <0x1e>; /* lan port bitmap */
switch_wan_bmp = <0x20>; /* wan port bitmap */
switch_inner_bmp = <0xc0>; /*inner port bitmap*/
switch_mac_mode = <0x0>; /* mac mode for uniphy 0*/
switch_mac_mode1 = <0xf>; /* mac mode for uniphy 1*/
switch_mac_mode2 = <0xff>; /* mac mode for uniphy 2*/

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-handle = <&qca8081>;
label = "wan";
};

&CPU0 {
/delete-property/ cpu-supply;
};

&CPU1 {
/delete-property/ cpu-supply;
};

&CPU2 {
/delete-property/ cpu-supply;
};

&CPU3 {
/delete-property/ cpu-supply;
};
15 changes: 15 additions & 0 deletions target/linux/qualcommax/image/ipq60xx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ define Device/jdcloud_ax6600
endef
TARGET_DEVICES += jdcloud_ax6600

define Device/jdcloud_re-cs-07
$(call Device/FitImage)
$(call Device/EmmcImage)
DEVICE_VENDOR := JDCloud
DEVICE_MODEL := ER1
DEVICE_DTS_CONFIG := config@cp03-c3
DEVICE_DTS := ipq6010-re-cs-07
SOC := ipq6018
DEVICE_PACKAGES := kmod-fs-ext4 mkf2fs f2fsck kmod-fs-f2fs
BLOCKSIZE := 64k
KERNEL_SIZE := 6144k
IMAGE/factory.bin := append-kernel | pad-to $${KERNEL_SIZE} | append-rootfs | append-metadata
endef
TARGET_DEVICES += jdcloud_re-cs-07

define Device/cambiumnetworks_xe3-4
$(call Device/FitImage)
$(call Device/UbiFit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ipq60xx_setup_interfaces()
jdcloud,ax1800-pro)
ucidef_set_interfaces_lan_wan "eth0 eth1 eth2" "eth3"
;;
jdcloud,re-cs-07|\
cmiot,ax18|\
zn,m2|\
qihoo,v6|\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ platform_do_upgrade() {
fw_setenv bootcount 0
nand_do_upgrade "$1"
;;
jdcloud,re-cs-07|\
redmi,ax5-jdcloud|\
jdcloud,ax1800-pro|\
jdcloud,ax6600)
Expand Down

0 comments on commit 157f38f

Please sign in to comment.