diff --git a/package/boot/uboot-tools/uboot-envtools/files/qualcommax_ipq60xx b/package/boot/uboot-tools/uboot-envtools/files/qualcommax_ipq60xx index aa01e040ea0..ba6d9ff1fa3 100644 --- a/package/boot/uboot-tools/uboot-envtools/files/qualcommax_ipq60xx +++ b/package/boot/uboot-tools/uboot-envtools/files/qualcommax_ipq60xx @@ -21,13 +21,14 @@ cambiumnetworks,xe3-4) ;; glinet,gl-ax1800|\ glinet,gl-axt1800|\ +linksys,mr7350|\ +linksys,mr7500) + ubootenv_add_mtd "u_env" "0x0" "0x40000" "0x20000" + ;; netgear,wax214|\ tplink,eap610-outdoor) ubootenv_add_mtd "0:appsblenv" "0x0" "0x40000" "0x20000" ;; -linksys,mr7350) - ubootenv_add_mtd "u_env" "0x0" "0x40000" "0x20000" - ;; yuncore,fap650) ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x10000" ;; diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index b9009cf5328..107f5ffed20 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -43,6 +43,7 @@ ALLWIFIBOARDS:= \ linksys_homewrk \ linksys_mr5500 \ linksys_mr7350 \ + linksys_mr7500 \ linksys_mx2000 \ linksys_mx4200 \ linksys_mx5300 \ @@ -188,6 +189,7 @@ $(eval $(call generate-ipq-wifi-package,glinet_gl-axt1800,GL.iNet GL-AXT1800)) $(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_mr7500,Linksys MR7500)) $(eval $(call generate-ipq-wifi-package,linksys_mx2000,Linksys MX2000)) $(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200)) $(eval $(call generate-ipq-wifi-package,linksys_mx5300,Linksys MX5300)) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-mr7500.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-mr7500.dts new file mode 100644 index 00000000000..9cfd3a52395 --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-mr7500.dts @@ -0,0 +1,544 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// Copyright 2024 Weikai Kong (priv at pppig236.com) + +/dts-v1/; + +#include "ipq6018-512m.dtsi" +#include "ipq6018-cp-cpu.dtsi" +#include "ipq6018-ess.dtsi" +#include +#include +#include + +/ { + model = "Linksys MR7500"; + compatible = "linksys,mr7500", "qcom,ipq6018"; + + aliases { + serial0 = &blsp1_uart3; + serial1 = &blsp1_uart2; + + led-boot = &led_system_blue; + led-running = &led_system_blue; + led-failsafe = &led_system_red; + led-upgrade = &led_system_green; + + label-mac-device = &dp5_syn; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs-append = " root=/dev/ubiblock0_0"; + }; + + extcon_usb { + pinctrl-0 = <&extcon_usb_pins>; + pinctrl-names = "default"; + id-gpio = <&tlmm 26 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + + gpio_keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + wps { + label = "wps"; + linux,code = ; + gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&tlmm 56 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "pwm-leds"; + + usb { + color = ; + function = LED_FUNCTION_USB; + gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; + pwms = <&pwm 1 650000>; + max-brightness = <255>; + trigger-sources = <&usb3_port1>, <&usb3_port2>; + linux,default-trigger = "usbport"; + }; + + led_system_red: red { + color = ; + function = LED_FUNCTION_INDICATOR; + pwms = <&pwm 2 1250000>; + max-brightness = <255>; + panic-indicator; + }; + + led_system_green: green { + color = ; + function = LED_FUNCTION_INDICATOR; + pwms = <&pwm 3 1250000>; + max-brightness = <255>; + }; + + led_system_blue: blue { + color = ; + function = LED_FUNCTION_POWER; + pwms = <&pwm 0 1250000>; + max-brightness = <255>; + }; + }; + + reg_usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&tlmm 25 GPIO_ACTIVE_LOW>; + }; +}; + +&tlmm { + pwm_pins: pwm_pinmux { + /*LED_B*/ + mux_0 { + pins = "gpio29"; + function = "pwm03"; + drive-strength = <8>; + bias-pull-up; + }; + + /*LED_USB*/ + mux_1 { + pins = "gpio30"; + function = "pwm13"; + drive-strength = <8>; + bias-pull-down; + }; + + /*LED_R*/ + mux_2 { + pins = "gpio31"; + function = "pwm23"; + drive-strength = <8>; + bias-pull-down; + }; + + /*LED_G*/ + mux_3 { + pins = "gpio32"; + function = "pwm33"; + drive-strength = <8>; + bias-pull-down; + }; + }; + + extcon_usb_pins: extcon_usb_pins { + pins = "gpio26"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + button_pins: button_pins { + wps_button { + pins = "gpio37"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + reset_button { + pins = "gpio56"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + mdio_pins: mdio_pinmux { + mux_0 { + pins = "gpio64"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + mux_1 { + pins = "gpio65"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + hsuart_pins: hsuart_pins { + pins = "gpio71", "gpio72", "gpio69", "gpio70"; + function = "blsp1_uart"; + drive-strength = <8>; + bias-disable; + }; + + btcoex_pins: btcoex_pins { + mux_0 { + pins = "gpio51"; + function = "pta1_1"; + drive-strength = <6>; + bias-pull-down; + }; + mux_1 { + pins = "gpio53"; + function = "pta1_0"; + drive-strength = <6>; + bias-pull-down; + }; + mux_2 { + pins = "gpio52"; + function = "pta1_2"; + drive-strength = <6>; + bias-pull-down; + }; + }; +}; + +&pwm { + pinctrl-0 = <&pwm_pins>; + pinctrl-names = "default"; + #pwm-cells = <2>; + status = "okay"; +}; + +&mdio { + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; + status = "okay"; + + ethernet-phy-package { + #address-cells = <1>; + #size-cells = <0>; + compatible = "qcom,qca8075-package"; + reg = <0>; + + qcom,package-mode = "qsgmii"; + + qca8075_0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; + }; + + qca8075_1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; + }; + + qca8075_2: ethernet-phy@2 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <2>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; + }; + + qca8075_3: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; + }; + }; + + aqr114c: ethernet-phy@8 { + reg = <8>; + reset-gpios = <&tlmm 77 GPIO_ACTIVE_HIGH>; + compatible = "ethernet-phy-ieee802.3-c45"; + firmware-name = "marvell/AQR114C.cld"; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_WAN; + default-state = "keep"; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_WAN; + default-state = "keep"; + }; + }; + }; +}; + +&dp1 { + status = "okay"; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "qsgmii"; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; +}; + +&dp2 { + status = "okay"; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "qsgmii"; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; +}; + +&dp3 { + status = "okay"; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "qsgmii"; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; +}; + +&dp4 { + status = "okay"; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "qsgmii"; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; +}; + +&dp5_syn { + status = "okay"; + label = "wan"; + phy-handle = <&aqr114c>; + phy-mode = "usxgmii"; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; +}; + +&edma { + status = "okay"; +}; + +&switch { + status = "okay"; + switch_lan_bmp = <( ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 )>; + switch_wan_bmp = ; + switch_mac_mode = ; + switch_mac_mode1 = ; + + qcom,port_phyinfo { + port@1 { + port_id = <1>; + phy_address = <0>; + }; + port@2 { + port_id = <2>; + phy_address = <1>; + }; + port@3 { + port_id = <3>; + phy_address = <2>; + }; + port@4 { + port_id = <4>; + phy_address = <3>; + }; + port@5 { + port_id = <5>; + phy_address = <8>; + compatible = "ethernet-phy-ieee802.3-c45"; + ethernet-phy-ieee802.3-c45; + }; + }; +}; + +&blsp1_uart3 { + pinctrl-0 = <&serial_3_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&blsp1_uart2 { + pinctrl-0 = <&hsuart_pins &btcoex_pins>; + pinctrl-names = "default"; + dmas = <&blsp_dma 2>, <&blsp_dma 3>; + dma-names = "tx", "rx"; + status = "okay"; + bluetooth { // doesn't work + compatible = "csr,8811"; + enable-gpios = <&tlmm 34 GPIO_ACTIVE_LOW>; + }; +}; + +&qpic_bam { + status = "okay"; +}; + +&qpic_nand { + status = "okay"; + + nand@0 { + reg = <0>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + nand-bus-width = <8>; + + partitions { + compatible = "qcom,smem-part"; + #address-cells = <1>; + #size-cells = <1>; + + partition-0-devinfo { + label = "devinfo"; + read-only; + #address-cells = <1>; + #size-cells = <1>; + + nvmem-layout { + compatible = "ascii-eq-delim-env"; + #address-cells = <1>; + #size-cells = <1>; + + hw_mac_addr: hw_mac_addr { + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + }; + }; + }; + }; +}; + +&ssphy_0 { + status = "okay"; +}; + +&dwc_0 { + #address-cells = <1>; + #size-cells = <0>; + + usb3_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + + usb3_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; +}; + +&qusb_phy_0 { + status = "okay"; + vdd-supply = <®_usb_vbus>; +}; + +&usb3 { + status = "okay"; + vbus-supply = <®_usb_vbus>; +}; + +&pcie_phy { + status = "okay"; +}; + +&pcie0 { + status = "okay"; + bridge@0,0 { + reg = <0x00000000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi@1,0 { + status = "okay"; + /* ath11k has no DT compatible for PCI cards */ + compatible = "pci17cb,1104"; + reg = <0x00010000 0 0 0 0>; + qcom,ath11k-calibration-variant = "Linksys-MR7500"; + }; + }; +}; + +&wifi { + status = "okay"; + qcom,ath11k-calibration-variant = "Linksys-MR7500"; + qcom,ath11k-fw-memory-mode = <1>; +}; diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index 03e49b97f79..41e06c53840 100644 --- a/target/linux/qualcommax/image/ipq60xx.mk +++ b/target/linux/qualcommax/image/ipq60xx.mk @@ -75,6 +75,18 @@ define Device/linksys_mr7350 endef TARGET_DEVICES += linksys_mr7350 +define Device/linksys_mr7500 + $(call Device/linksys_mr) + DEVICE_MODEL := MR7500 + SOC := ipq6018 + NAND_SIZE := 512m + IMAGE_SIZE := 147456k + DEVICE_PACKAGES += ipq-wifi-linksys_mr7500 \ + ath11k-firmware-qcn9074 kmod-ath11k-pci \ + kmod-leds-pwm kmod-phy-aquantia +endef +TARGET_DEVICES += linksys_mr7500 + define Device/netgear_wax214 $(call Device/FitImage) $(call Device/UbiFit) diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds index a9575eb4efc..75735fd5ff4 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds @@ -19,6 +19,18 @@ linksys,mr7350) ucidef_set_led_netdev "wan-port-link" "WAN-PORT-LINK" "90000.mdio-1:04:green:wan" "wan" "link_10 link_100 link_1000" ucidef_set_led_netdev "wan-port-traffic" "WAN-PORT-TRAFFIC" "90000.mdio-1:04:orange:wan" "wan" "tx rx link_10 link_100 link_1000" ;; +linksys,mr7500) + ucidef_set_led_netdev "lan1-port-link" "LAN1-PORT-LINK" "90000.mdio-1:00:green:lan" "lan1" "link_10 link_100 link_1000" + ucidef_set_led_netdev "lan1-port-traffic" "LAN1-PORT-TRAFFIC" "90000.mdio-1:00:orange:lan" "lan1" "tx rx link_10 link_100 link_1000" + ucidef_set_led_netdev "lan2-port-link" "LAN2-PORT-LINK" "90000.mdio-1:01:green:lan" "lan2" "link_10 link_100 link_1000" + ucidef_set_led_netdev "lan2-port-traffic" "LAN2-PORT-TRAFFIC" "90000.mdio-1:01:orange:lan" "lan2" "tx rx link_10 link_100 link_1000" + ucidef_set_led_netdev "lan3-port-link" "LAN3-PORT-LINK" "90000.mdio-1:02:green:lan" "lan3" "link_10 link_100 link_1000" + ucidef_set_led_netdev "lan3-port-traffic" "LAN3-PORT-TRAFFIC" "90000.mdio-1:02:orange:lan" "lan3" "tx rx link_10 link_100 link_1000" + ucidef_set_led_netdev "lan4-port-link" "LAN4-PORT-LINK" "90000.mdio-1:03:green:lan" "lan4" "link_10 link_100 link_1000" + ucidef_set_led_netdev "lan4-port-traffic" "LAN4-PORT-TRAFFIC" "90000.mdio-1:03:orange:lan" "lan4" "tx rx link_10 link_100 link_1000" + ucidef_set_led_netdev "wan-port-link" "WAN-PORT-LINK" "90000.mdio-1:08:green:lan" "wan" "link_10 link_100 link_1000 link_2500 link_5000" + ucidef_set_led_netdev "wan-port-traffic" "WAN-PORT-TRAFFIC" "90000.mdio-1:08:orange:wan" "wan" "tx rx link_10 link_100 link_1000 link_2500 link_5000" + ;; yuncore,fap650) ucidef_set_led_netdev "wlan5ghz" "WLAN 5GHz LED" "blue:wlan-5ghz" "wlan0" "tx rx" ucidef_set_led_netdev "wlan2ghz" "WLAN 2.4GHz LED" "green:wlan-2ghz" "wlan1" "tx rx" diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network index 3fa86a37f15..e45bc32fb47 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network @@ -20,6 +20,7 @@ ipq60xx_setup_interfaces() ;; glinet,gl-ax1800|\ linksys,mr7350|\ + linksys,mr7500|\ yuncore,fap650) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata index 061d2ad2ea3..0d240cd4f7a 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata @@ -23,12 +23,14 @@ case "$FIRMWARE" in ath11k_patch_mac $(macaddr_add $label_mac 2) 1 ath11k_set_macflag ;; - linksys,mr7350) + linksys,mr7350|\ + linksys,mr7500) caldata_extract "0:art" 0x1000 0x10000 addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) ath11k_patch_mac $(macaddr_add $addr 2) 0 ath11k_patch_mac $(macaddr_add $addr 1) 1 ath11k_set_macflag + ath11k_remove_regdomain ;; netgear,wax214) caldata_extract "0:art" 0x1000 0x10000 @@ -57,6 +59,13 @@ case "$FIRMWARE" in cambiumnetworks,xe3-4) caldata_extract "0:ART" 0x26800 0x20000 ;; + linksys,mr7500) + caldata_extract "0:art" 0x26800 0x20000 + addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) + ath11k_patch_mac $(macaddr_add $addr 3) 0 + ath11k_set_macflag + ath11k_remove_regdomain + ;; esac ;; *) diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount b/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount index fbe245d988b..d2039eb0549 100755 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount @@ -4,7 +4,8 @@ START=99 boot() { case $(board_name) in - linksys,mr7350) + linksys,mr7350|\ + linksys,mr7500) mtd resetbc s_env || true ;; yuncore,fap650) diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh index b9b0ed1ed7f..59e5ef7ca2f 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh @@ -116,7 +116,8 @@ platform_do_upgrade() { qihoo,360v6) nand_do_upgrade "$1" ;; - linksys,mr7350) + linksys,mr7350|\ + linksys,mr7500) boot_part="$(fw_printenv -n boot_part)" if [ "$boot_part" -eq "1" ]; then fw_setenv boot_part 2