Skip to content

Commit

Permalink
QualcommAX: ipq60xx: add support for JD Cloud AX1800 Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaY-shi committed Sep 26, 2024
1 parent e38ac39 commit dce1ff2
Show file tree
Hide file tree
Showing 10 changed files with 462 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq60xx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ netgear,wax214)
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
jdc,ax1800-pro)
mmcpart="$(find_mmc_part 0:APPSBLENV)"
[ -n "$mmcpart" ] && \
ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x20000" "2"
;;
yuncore,fap650)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
Expand Down
2 changes: 2 additions & 0 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ALLWIFIBOARDS:= \
edimax_cax1800 \
glinet_gl-ax1800 \
glinet_gl-axt1800 \
jdc_ax1800-pro \
linksys_mx4200 \
linksys_mx5300 \
linksys_mx8500 \
Expand Down Expand Up @@ -167,6 +168,7 @@ $(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
$(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
$(eval $(call generate-ipq-wifi-package,glinet_gl-ax1800,GL.iNet GL-AX1800))
$(eval $(call generate-ipq-wifi-package,glinet_gl-axt1800,GL.iNet GL-AXT1800))
$(eval $(call generate-ipq-wifi-package,jdc_ax1800-pro,JD Cloud AX1800 Pro))
$(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200))
$(eval $(call generate-ipq-wifi-package,linksys_mx5300,Linksys MX5300))
$(eval $(call generate-ipq-wifi-package,linksys_mx8500,Linksys MX8500))
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
/dts-v1/;
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include "ipq6018.dtsi"
#include "ipq6018-512m.dtsi"
#include "ipq6018-ess.dtsi"


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

/ {
model = "JDCloud AX1800 Pro";
compatible = "jdc,ax1800-pro", "qcom,ipq6018-cp03", "qcom,ipq6018";

aliases {
sdhc1 = &sdhc_1;
serial0 = &blsp1_uart3;
led-boot = &status_red;
led-failsafe = &status_red;
led-running = &status_green;
led-upgrade = &status_green;
ethernet1 = &dp2;
ethernet2 = &dp3;
ethernet3 = &dp4;
ethernet4 = &dp5;
};

chosen {
bootargs = "console=ttyMSM0,115200,n8";
bootargs-append = " rootfstype=squashfs,ext4 coherent_pool=2M";
};

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

wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_KEY>;
debounce-interval = <60>;
};

reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_KEY>;
debounce-interval = <60>;
};
};

leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";

status_blue: status_blue {
label = "blue:status";
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
};

status_red: status_red {
label = "red:status";
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
};

status_green: status_green {
label = "green:status";
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
};
};
};

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

spi_1_pins: spi_1_pins {
mux {
pins = "gpio38","gpio39","gpio40","gpio41";
function = "blsp0_spi";
drive-strength = <0x08>;
bias-pull-down;
};
};

button_pins: button_pins {
mux {
pins = "gpio8", "gpio9";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};

leds_pins: leds_pins {
mux {
pins = "gpio34", "gpio36", "gpio49";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};

mdio_pinmux: mdio_pinmux {
mux_0 {
pins = "gpio64";
function = "mdc";
drive-strength = <0x08>;
bias-pull-up;
};

mux_1 {
pins = "gpio65";
function = "mdio";
drive-strength = <0x08>;
bias-pull-up;
};

mux_2 {
pins = "gpio75";
function = "gpio";
bias-pull-up;
};
};
};


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

&blsp1_spi1 {
pinctrl-0 = <&spi_1_pins>;
pinctrl-names = "default";
cs-select = <0>;
status = "okay";

m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "n25q128a11";
linux,modalias = "m25p80", "n25q128a11";
spi-max-frequency = <50000000>;
use-default-sizes;
};
};

&prng {
status = "okay";
};

&cryptobam {
status = "okay";
};

&crypto {
status = "okay";
};

&qpic_bam {
status = "okay";
};

&qusb_phy_0 {
status = "okay";
};

&qusb_phy_1 {
status = "okay";
};


&ssphy_0 {
status = "okay";
};

&usb3 {
status = "okay";
};

&usb2 {
status = "okay";
};

&edma {
status = "okay";
};

&rpm {
status = "disabled";
};

&mdio {
status = "okay";

pinctrl-0 = <&mdio_pinmux>;
pinctrl-names = "default";
reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;

ethernet_0: ethernet-phy-package@0 {
compatible = "qcom,qca8075-package";
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
qcom,package-mode = "psgmii";

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_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT2>; /* wan port bitmap */
switch_mac_mode = <MAC_MODE_PSGMII>;

qcom,port_phyinfo {
port@1 {
port_id = <2>;
phy_address = <1>;
};

port@2 {
port_id = <3>;
phy_address = <2>;
};

port@3 {
port_id = <4>;
phy_address = <3>;
};

port@4 {
port_id = <5>;
phy_address = <4>;
};
};
};

&qpic_bam {
status = "okay";
};

&wifi {
status = "okay";
qcom,ath11k-calibration-variant = "JDC-AX1800-Pro";
qcom,ath11k-fw-memory-mode = <1>;
};


&dp2 {
phy-handle = <&qca8075_1>;
status = "okay";
};

&dp3 {
phy-handle = <&qca8075_2>;
status = "okay";
};

&dp4 {
phy-handle = <&qca8075_3>;
status = "okay";
};

&dp5 {
phy-handle = <&qca8075_4>;
phy-mode = "psgmii";
status = "okay";
};

&sdhc_1 {
status = "okay";

/delete-property/ mmc-hs400-1_8v;
mmc-hs200-1_8v;
mmc-ddr-1_8v;
};

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

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

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

&CPU3 {
/delete-property/ cpu-supply;
};
Loading

0 comments on commit dce1ff2

Please sign in to comment.