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 Apr 29, 2024
1 parent f453eb5 commit 6701625
Show file tree
Hide file tree
Showing 11 changed files with 1,585 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 @@ -21,6 +21,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 @@ -37,6 +37,7 @@ ALLWIFIBOARDS:= \
edimax_cax1800 \
glinet_gl-ax1800 \
glinet_gl-axt1800 \
jdc_ax1800-pro \
linksys_mx4200 \
linksys_mx5300 \
netgear_lbr20 \
Expand Down Expand Up @@ -159,6 +160,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,netgear_lbr20,Netgear LBR20))
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
/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 swiotlb=1 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 34 GPIO_ACTIVE_HIGH>;
};

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

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

&tlmm {
compatible = "qcom,ipq6000-pinctrl";

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 74 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 */

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;
};
23 changes: 23 additions & 0 deletions target/linux/qualcommax/image/ipq60xx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ define Device/8devices_mango-dvk
endef
TARGET_DEVICES += 8devices_mango-dvk

define Device/EmmcImage
IMAGES += factory.bin sysupgrade.bin
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | sysupgrade-tar rootfs=$$$$@ | append-metadata
endef

define Device/glinet_gl-ax1800
$(call Device/FitImage)
$(call Device/UbiFit)
Expand Down Expand Up @@ -39,6 +45,23 @@ define Device/glinet_gl-axt1800
endef
TARGET_DEVICES += glinet_gl-axt1800

define Device/jdc_ax1800-pro
$(call Device/FitImage)
DEVICE_VENDOR := JD Cloud
DEVICE_MODEL := JDC AX1800 Pro
DEVICE_DTS_CONFIG := config@cp03-c2
DEVICE_DTS := ipq6018-jdc-ax1800-pro
SOC := ipq6018
DEVICE_PACKAGES := ipq-wifi-jdc_ax1800-pro kmod-fs-ext4 mkf2fs f2fsck kmod-fs-f2fs
BLOCKSIZE := 64k
KERNEL_SIZE := 6144k
IMAGES += kernel.bin rootfs.bin factory.bin
IMAGE/kernel.bin := append-kernel
IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to $$(BLOCKSIZE)
IMAGE/factory.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | append-metadata
endef
TARGET_DEVICES += jdc_ax1800-pro

define Device/netgear_wax214
$(call Device/FitImage)
$(call Device/UbiFit)
Expand Down
Loading

0 comments on commit 6701625

Please sign in to comment.