Skip to content

Commit

Permalink
qualcommax: ipq50xx: add support for Linksys MR5500
Browse files Browse the repository at this point in the history
Flash instructions are the same as for MX2000 and MX5500.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
  • Loading branch information
georgemoussalem committed Feb 11, 2025
1 parent e637b8a commit 15650d9
Show file tree
Hide file tree
Showing 8 changed files with 317 additions and 0 deletions.
1 change: 1 addition & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq50xx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ touch /etc/config/ubootenv
board=$(board_name)

case "$board" in
linksys,mr5500|\
linksys,mx2000|\
linksys,mx5500|\
linksys,spnmx56)
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 @@ -38,6 +38,7 @@ ALLWIFIBOARDS:= \
edgecore_eap102 \
edimax_cax1800 \
linksys_homewrk \
linksys_mr5500 \
linksys_mr7350 \
linksys_mx2000 \
linksys_mx4200 \
Expand Down Expand Up @@ -177,6 +178,7 @@ $(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
$(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,linksys_homewrk,Linksys HomeWRK))
$(eval $(call generate-ipq-wifi-package,linksys_mr5500,Linksys MR5500))
$(eval $(call generate-ipq-wifi-package,linksys_mr7350,Linksys MR7350))
$(eval $(call generate-ipq-wifi-package,linksys_mx2000,Linksys MX2000))
$(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,297 @@
/dts-v1/;

#include "ipq5018.dtsi"
#include "ipq5018-mx-base.dtsi"

/ {
model = "Linksys MR5500";
compatible = "linksys,mr5500", "qcom,ipq5018";

gpio-leds {
compatible = "gpio-leds";

usb {
label="led:usb";
gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
};
};

regulator_fixed_5p0: regulator-s0500 {
compatible = "regulator-fixed";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <500000>;
regulator-boot-on;
regulator-always-on;
regulator-name = "fixed_5p0";
};
};

/*
* ===============================================================
* _______________________ _______________________
* | IPQ5018 | | QCA8337 |
* | +------+ +--------+ | | +--------+ +------+ |
* | | MAC0 |---| GE Phy | | | | Phy0 |---| MAC1 | |
* | +------+ +--------+ | | +--------+ +------+ |
* | +------+ +--------+ | | +--------+ +------+ |
* | | MAC1 |---| Uniphy |-+-SGMII-+-| SerDes |---| MAC6 | |
* | +------+ +--------+ | | +--------+ +------+ |
* |_______________________| |_______________________|
*
* ===============================================================
*/

&switch {
status = "okay";

switch_mac_mode = <MAC_MODE_SGMII_CHANNEL0>;

qcom,port_phyinfo {
// MAC0 -> GE Phy -> QCA8337 Phy4
port@0 {
port_id = <1>;
mdiobus = <&mdio0>;
phy_address = <7>;
// status = "disabled";
};

// MAC1 ---SGMII---> QCA8337 SerDes
port@1 {
port_id = <2>;
forced-speed = <1000>;
forced-duplex = <1>;
};
};
};

// MAC1 ---SGMII---> QCA8337 SerDes
&dp2 {
status = "okay";

phy-mode = "sgmii";

nvmem-cells = <&hw_mac_addr 0>;
nvmem-cell-names = "mac-address";

fixed-link {
speed = <1000>;
full-duplex;
};
};

&mdio0 {
status = "okay";
};

// IPQ5018 GE Phy -> QCA8337 PHY4
&ge_phy {
status = "okay";
};

&mdio1 {
status = "okay";

pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
reset-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;

// QCA8337 Phy0 -> LAN1
qca8337_0: ethernet-phy@0 {
reg = <0>;
};

// QCA8337 Phy1 -> LAN2
qca8337_1: ethernet-phy@1 {
reg = <1>;
};

// QCA8337 Phy2 -> LAN3
qca8337_2: ethernet-phy@2 {
reg = <2>;
};

// QCA8337 Phy3 -> LAN4
qca8337_3: ethernet-phy@3 {
reg = <3>;
};

// QCA8337 Phy4 -> WAN
qca8337_4: ethernet-phy@4 {
reg = <4>;
};

switch1: ethernet-switch@17 {
compatible = "qca,qca8337";
reg = <17>;
#address-cells = <1>;
#size-cells = <0>;

ports {
#address-cells = <1>;
#size-cells = <0>;

port@1 {
reg = <1>;
label = "lan1";
phy-handle = <&qca8337_0>;
};

port@2 {
reg = <2>;
label = "lan2";
phy-handle = <&qca8337_1>;
};

port@3 {
reg = <3>;
label = "lan3";
phy-handle = <&qca8337_2>;
};

port@4 {
reg = <4>;
label = "lan4";
phy-handle = <&qca8337_3>;
};

port@5 {
reg = <5>;
label = "wan";
phy-handle = <&qca8337_4>;
};

port@6 {
reg = <6>;
label = "cpu";
phy-mode = "sgmii";
ethernet = <&dp2>;
qca,sgmii-enable-pll;

fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};
};

&tlmm {
usbled_pins: usbled-state {
pins = "gpio19";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};

&usbphy0 {
status = "okay";

/*vdd-supply = <&regulator_fixed_5p0>;*/
};

&usbphy1 {
status = "okay";

/*vdd-supply = <&regulator_fixed_5p0>;*/
};

&usb {
status = "okay";

/*vbus-supply = <&regulator_fixed_5p0>;*/
};

&usb_dwc {
dr_mode = "host";
};

&pcie0_phy {
status = "okay";
};

&pcie0 {
status = "okay";

perst-gpios = <&tlmm 15 GPIO_ACTIVE_LOW>;

bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;

wifi@1,0 {
status = "okay";

/* QCN9074: ath11k lacks DT compatible for PCI cards */
compatible = "pci17cb,1104";
reg = <0x00010000 0 0 0 0>;

qcom,ath11k-calibration-variant = "Linksys-MR5500";
};
};
};

&q6v5_wcss {
status = "okay";

memory-region = <&q6_mem_regions>;
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
"ath11k/IPQ5018/hw1.0/m3_fw.mdt";

// IPQ5018
q6_wcss_pd1: pd-1 {
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";

resets =
<&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_BCR>,
<&gcc GCC_CE_BCR>;
reset-names =
"wcss_aon_reset",
"wcss_reset",
"ce_reset";

clocks =
<&gcc GCC_WCSS_AHB_S_CLK>,
<&gcc GCC_WCSS_ACMT_CLK>,
<&gcc GCC_WCSS_AXI_M_CLK>;
clock-names =
"gcc_wcss_ahb_s_clk",
"gcc_wcss_acmt_clk",
"gcc_wcss_axi_m_clk";

interrupts-extended =
<&wcss_smp2p_in 8 0>,
<&wcss_smp2p_in 9 0>,
<&wcss_smp2p_in 12 0>,
<&wcss_smp2p_in 11 0>;
interrupt-names =
"fatal",
"ready",
"spawn-ack",
"stop-ack";

qcom,smem-states =
<&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
<&wcss_smp2p_out 10>;
qcom,smem-state-names =
"shutdown",
"stop",
"spawn";
status = "okay";
};
};

&wifi0 {
// IPQ5018
qcom,rproc = <&q6_wcss_pd1>;
qcom,ath11k-calibration-variant = "Linksys-MR5500";
qcom,ath11k-fw-memory-mode = <2>;
qcom,bdf-addr = <0x4c400000>;

status = "okay";
};
10 changes: 10 additions & 0 deletions target/linux/qualcommax/image/ipq50xx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ define Device/linksys_ipq50xx_mx_base
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=$$$$(DEVICE_MODEL)
endef

define Device/linksys_mr5500
$(call Device/linksys_ipq50xx_mx_base)
DEVICE_MODEL := MR5500
DEVICE_DTS_CONFIG := config@mp03.1
DEVICE_PACKAGES := kmod-ath11k-pci \
ath11k-firmware-qcn9704 \
ipq-wifi-linksys_mr5500
endef
TARGET_DEVICES += linksys_mr5500

define Device/linksys_mx2000
$(call Device/linksys_ipq50xx_mx_base)
DEVICE_MODEL := MX2000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ ipq50xx_setup_interfaces()
{
local board="$1"
case $board in
linksys,mr5500)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
;;
linksys,mx2000|\
linksys,mx5500|\
linksys,spnmx56)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ board=$(board_name)
case "$FIRMWARE" in
"ath11k/IPQ5018/hw1.0/cal-ahb-c000000.wifi.bin")
case "$board" in
linksys,mr5500|\
linksys,mx2000|\
linksys,mx5500|\
linksys,spnmx56)
Expand All @@ -33,6 +34,7 @@ case "$FIRMWARE" in
;;
"ath11k/QCN9074/hw1.0/cal-pci-0001:01:00.0.bin")
case "$board" in
linksys,mr5500|\
linksys,mx5500|\
linksys,spnmx56)
caldata_extract "0:ART" 0x26800 0x20000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ START=99

boot() {
case $(board_name) in
linksys,mr5500|\
linksys,mx2000|\
linksys,mx5500|\
linksys,spnmx56)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ platform_check_image() {

platform_do_upgrade() {
case "$(board_name)" in
linksys,mr5500|\
linksys,mx2000|\
linksys,mx5500|\
linksys,spnmx56)
Expand Down

0 comments on commit 15650d9

Please sign in to comment.