Skip to content

Commit

Permalink
qualcommax: ipq60xx: add support for JDCloud RE-CS-07
Browse files Browse the repository at this point in the history
  • Loading branch information
asushugo committed Nov 11, 2024
1 parent 17cbfef commit dd5c39c
Show file tree
Hide file tree
Showing 4 changed files with 252 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
// 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";

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

usb_pwr_pins: usb-pwr-pins {
mux {
pins = "gpio22";
function = "gpio";
bias-pull-down;
output-high;
};
};
};

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

&blsp1_uart6 {
pinctrl-0 = <&btuart_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 {
pinctrl-0 = <&usb_pwr_pins>;
pinctrl-names = "default";
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>;
};
};

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

&edma {
status = "okay";
};

&dp1 {
status = "okay";
phy-handle = <&qca8075_0>;
label = "wan";
};

&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";
};
13 changes: 13 additions & 0 deletions target/linux/qualcommax/image/ipq60xx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ define Device/jdcloud_re-cs-02
endef
TARGET_DEVICES += jdcloud_re-cs-02

define Device/jdcloud_re-cs-07
$(call Device/FitImage)
$(call Device/EmmcImage)
DEVICE_VENDOR := JDCloud
DEVICE_MODEL := RE-CS-07
SOC := ipq6010
BLOCKSIZE := 64k
KERNEL_SIZE := 6144k
DEVICE_DTS_CONFIG := config@cp03-c4
DEVICE_PACKAGES := -kmod-ath11k-ahb -ath11k-firmware-ipq6018
endef
TARGET_DEVICES += jdcloud_re-cs-07

define Device/jdcloud_re-ss-01
$(call Device/FitImage)
$(call Device/EmmcImage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ipq60xx_setup_interfaces()

case "$board" in
cmiot,ax18|\
jdcloud,re-cs-07|\
jdcloud,re-ss-01|\
qihoo,360v6|\
redmi,ax5-*|\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ platform_do_upgrade() {
nand_do_upgrade "$1"
;;
jdcloud,re-cs-02|\
jdcloud,re-cs-07|\
jdcloud,re-ss-01|\
redmi,ax5-jdcloud)
kernelname="0:HLOS"
Expand Down

0 comments on commit dd5c39c

Please sign in to comment.