[openwrt/openwrt] ipq40xx: add support for Netgear SRR60/SRS60 and RBR50/RBS50

LEDE Commits lede-commits at lists.infradead.org
Sun Oct 31 17:21:54 PDT 2021


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2cb24b3f3cd89692f3c0bd137f3f560ada359bfa

commit 2cb24b3f3cd89692f3c0bd137f3f560ada359bfa
Author: Davide Fioravanti <pantanastyle at gmail.com>
AuthorDate: Wed Sep 2 02:10:16 2020 +0200

    ipq40xx: add support for Netgear SRR60/SRS60 and RBR50/RBS50
    
    The Netgear SRS60 and SRR60 (sold together as SRK60) are two almost
    identical AC3000 routers. The SRR60 has one port labeled as wan while
    the SRS60 not. The RBR50 and RBS50 (sold together as RBK50) have a
    different external shape but they have an USB 2.0 port on the back.
    
    This patch has been tested only on SRS60 and RBR50, but should work
    on SRR60 and RBS50.
    
    Hardware
    --------
    SoC:   Qualcomm IPQ4019 (717 MHz, 4 cores 4 threads)
    RAM:   512MB DDR3
    FLASH: 4GB EMMC
    ETH:
      - 3x 10/100/1000 Mbps Ethernet
      - 1x 10/100/1000 Mbps Ethernet (WAN)
    WIFI:
      - 2.4GHz: 1x IPQ4019 (2x2:2)
      - 5GHz:   1x IPQ4019 (2x2:2)
      - 5GHz:   1x QCA9984 (4x4:4)
      - 6 internal antennas
    BTN:
      - 1x Reset button
      - 1x Sync button
      - 1x ON/OFF button
    LEDS:
      - 8 leds controlled by TLC59208F (they can be switched on/off
        independendently but the color can by changed by GPIOs)
      - 1x Red led (Power)
      - 1x Green led (Power)
    UART:
      - 115200-8-N-1
    
    Everything works correctly.
    
    Installation
    ------------
    These routers have a dual partition system. However this firmware works
    only on boot partition 1 and the OEM web interface will always flash on
    the partition currently not booted.
    
    The following steps will use the SRS60 firmware, but you have to chose
    the right firmware for your router.
    
    There are 2 ways to install Openwrt the first time:
    
    1) Using NMRPflash
     1. Download nmrpflash (https://github.com/jclehner/nmrpflash)
     2. Put the openwrt-ipq40xx-generic-netgear_srs60-squashfs-factory.img
            file in the same folder of the nmrpflash executable
     3. Connect your pc to the router using the port near the power button.
     4. Run "nmrpflash -i XXX -f openwrt-ipq40xx-generic-netgear_srs60-squashfs-factory.img".
            Replace XXX with your network interface (can be identified by
            running "nmrpflash -L")
     5. Power on the router and wait for the flash to complete. After about
            a minute the router should boot directly to Openwrt. If nothing
            happens try to reboot the router. If you have problems flashing
            try to set "10.164.183.253" as your computer IP address
    
    2) Without NMRPflash
    The OEM web interface will always flash on the partition currently not
    booted, so to flash OpenWrt for the first time you have to switch to
    boot partition 2 and then flash the factory image directly from the OEM
    web interface.
    
    To switch on partition 2 you have to enable telnet first:
     1. Go to http://192.168.1.250/debug.htm and check "Enable Telnet".
     2. Connect through telent ("telnet 192.168.1.250") and login using
            admin/password.
    
            To read the current boot_part:
                    artmtd -r boot_part
    
            To write the new boot_part:
                    artmtd -w boot_part 02
    
            Then reboot the router and then check again the current booted
            partition
    
    Now that you are on boot partition 2 you can flash the factory Openwrt
    image directly from the OEM web interface.
    
    Restore OEM Firmware
    --------------------
     1. Download the stock firmware from official netgear support.
     2. Follow the nmrpflash procedure like above, using the official
            Netgear firmware (for example SRS60-V2.2.1.210.img)
    
            nmrpflash -i XXX -f SRS60-V2.2.1.210.img
    
    Notes
    -----
    1) You can check and edit the boot partition in the Uboot shell using
            the UART connection.
            "boot_partition_show" shows the current boot partition
            "boot_partition_set 1" sets the current boot partition to 1
    
    2) Router mac addresses:
    
       LAN XX:XX:XX:XX:XX:69
       WAN XX:XX:XX:XX:XX:6a
       WIFI 2G XX:XX:XX:XX:XX:69
       WIFI 5G XX:XX:XX:XX:XX:6b
       WIFI 5G (2nd) XX:XX:XX:XX:XX:6c
    
       LABEL XX:XX:XX:XX:XX:69
    
    Signed-off-by: Davide Fioravanti <pantanastyle at gmail.com>
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    [added 5.10 changes for 901-arm-boot-add-dts-files.patch, moved
    sysupgrade mmc.sh to here and renamed it, various dtsi changes]
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 .../ipq40xx/base-files/etc/board.d/02_network      |   8 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |  21 ++
 .../ipq40xx/base-files/lib/upgrade/netgear.sh      |  76 +++++
 .../ipq40xx/base-files/lib/upgrade/platform.sh     |   6 +
 .../files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi | 325 +++++++++++++++++++++
 .../files/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts |  30 ++
 .../files/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts |  30 ++
 .../files/arch/arm/boot/dts/qcom-ipq4019-srr60.dts |  12 +
 .../files/arch/arm/boot/dts/qcom-ipq4019-srs60.dts |  12 +
 target/linux/ipq40xx/image/generic.mk              |  58 ++++
 .../patches-5.10/901-arm-boot-add-dts-files.patch  |  12 +-
 .../patches-5.4/901-arm-boot-add-dts-files.patch   |   6 +-
 12 files changed, 591 insertions(+), 5 deletions(-)

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index a675acc8db..50b460e441 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -106,6 +106,14 @@ ipq40xx_setup_interfaces()
 			"0u at eth0" "3:lan:2" "4:lan:1"
 		ucidef_set_interface_wan "eth1"
 		;;
+	netgear,rbr50|\
+	netgear,rbs50|\
+	netgear,srr60|\
+	netgear,srs60)
+		ucidef_add_switch "switch0" \
+			"0u at eth0" "2:lan" "3:lan" "4:lan"
+		ucidef_set_interface_wan "eth1"
+		;;
 	qxwlan,e2600ac-c1 |\
 	qxwlan,e2600ac-c2)
 		ucidef_set_interfaces_lan_wan "eth0" "eth1"
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 87876ad844..505182bb65 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -46,6 +46,13 @@ case "$FIRMWARE" in
 		# OEM assigns 4 sequential MACs
 		ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
 		;;
+	netgear,rbr50|\
+	netgear,rbs50|\
+	netgear,srr60|\
+	netgear,srs60)
+		caldata_extract_mmc "0:ART" 0x9000 0x2f20
+		ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0x12)
+		;;
 	esac
 	;;
 "ath10k/pre-cal-ahb-a000000.wifi.bin")
@@ -150,6 +157,13 @@ case "$FIRMWARE" in
 		caldata_extract "ART" 0x1000 0x2f20
 		ath10k_patch_mac $(mtd_get_mac_binary dnidata 0x0)
 		;;
+	netgear,rbr50|\
+	netgear,rbs50|\
+	netgear,srr60|\
+	netgear,srs60)
+		caldata_extract_mmc "0:ART" 0x1000 0x2f20
+		ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0x0)
+		;;
 	netgear,wac510)
 		caldata_extract "0:ART" 0x1000 0x2f20
 		ath10k_patch_mac $(mtd_get_mac_binary "0:MANUDATA" 0x6)
@@ -264,6 +278,13 @@ case "$FIRMWARE" in
 		caldata_extract "ART" 0x5000 0x2f20
 		ath10k_patch_mac $(mtd_get_mac_binary dnidata 0xc)
 		;;
+	netgear,rbr50|\
+	netgear,rbs50|\
+	netgear,srr60|\
+	netgear,srs60)
+		caldata_extract_mmc "0:ART" 0x5000 0x2f20
+		ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0xc)
+		;;
 	netgear,wac510)
 		caldata_extract "0:ART" 0x5000 0x2f20
 		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:MANUDATA" 0x6) 16)
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/netgear.sh b/target/linux/ipq40xx/base-files/lib/upgrade/netgear.sh
new file mode 100644
index 0000000000..f3fb626d1f
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/netgear.sh
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: GPL-2.0-only
+. /lib/functions.sh
+
+platform_do_upgrade_netgear_orbi_upgrade() {
+	command -v losetup >/dev/null || {
+		logger -s "Upgrade failed: 'losetup' not installed."
+		return 1
+	}
+
+	local tar_file=$1
+	local kernel=$2
+	local rootfs=$3
+
+	[ -z "$kernel" ] && kernel=$(find_mmc_part "kernel")
+	[ -z "$rootfs" ] && rootfs=$(find_mmc_part "rootfs")
+
+	[ -z "$kernel" ] && echo "Upgrade failed: kernel partition not found! Rebooting..." && reboot -f
+	[ -z "$rootfs" ] && echo "Upgrade failed: rootfs partition not found! Rebooting..." && reboot -f
+
+	netgear_orbi_do_flash $tar_file $kernel $rootfs
+
+	echo "sysupgrade successful"
+	umount -a
+	reboot -f
+}
+
+netgear_orbi_do_flash() {
+	local tar_file=$1
+	local kernel=$2
+	local rootfs=$3
+
+	# keep sure its unbound
+	losetup --detach-all || {
+		echo "Failed to detach all loop devices. Skip this try."
+		reboot -f
+	}
+
+	# use the first found directory in the tar archive
+	local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
+	board_dir=${board_dir%/}
+
+	echo "flashing kernel to $kernel"
+	tar xf $tar_file ${board_dir}/kernel -O >$kernel
+
+	echo "flashing rootfs to ${rootfs}"
+	tar xf $tar_file ${board_dir}/root -O >"${rootfs}"
+
+	# a padded rootfs is needed for overlay fs creation
+	local offset=$(tar xf $tar_file ${board_dir}/root -O | wc -c)
+	[ $offset -lt 65536 ] && {
+		echo "Wrong size for rootfs: $offset"
+		sleep 10
+		reboot -f
+	}
+
+	# Mount loop for rootfs_data
+	local loopdev="$(losetup -f)"
+	losetup -o $offset $loopdev $rootfs || {
+		echo "Failed to mount looped rootfs_data."
+		sleep 10
+		reboot -f
+	}
+
+	echo "Format new rootfs_data at position ${offset}."
+	mkfs.ext4 -F -L rootfs_data $loopdev
+	mkdir /tmp/new_root
+	mount -t ext4 $loopdev /tmp/new_root && {
+		echo "Saving config to rootfs_data at position ${offset}."
+		cp -v "$UPGRADE_BACKUP" "/tmp/new_root/$BACKUP_FILE"
+		umount /tmp/new_root
+	}
+
+	# Cleanup
+	losetup -d $loopdev >/dev/null 2>&1
+	sync
+}
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 68027be666..e391976606 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -117,6 +117,12 @@ platform_do_upgrade() {
 		[ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware
 		default_do_upgrade "$1"
 		;;
+	netgear,rbr50 |\
+	netgear,rbs50 |\
+	netgear,srr60 |\
+	netgear,srs60)
+		platform_do_upgrade_netgear_orbi_upgrade "$1"
+		;;
 	openmesh,a42 |\
 	openmesh,a62 |\
 	plasmacloud,pa1200 |\
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi
new file mode 100644
index 0000000000..bdbee7f837
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi
@@ -0,0 +1,325 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+/ {
+	aliases {
+		led-boot = &led_status_white;
+		led-failsafe = &led_status_red;
+		led-running = &led_status_green;
+		led-upgrade = &led_status_blue;
+	};
+
+	soc {
+		rng at 22000 {
+			status = "okay";
+		};
+
+		mdio at 90000 {
+			status = "okay";
+
+			pinctrl-0 = <&mdio_pins>;
+			pinctrl-names = "default";
+		};
+
+		ess-psgmii at 98000 {
+			status = "okay";
+		};
+
+		counter at 4a1000 {
+			compatible = "qcom,qca-gcnt";
+			reg = <0x4a1000 0x4>;
+		};
+
+		tcsr at 1949000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1949000 0x100>;
+			qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
+		};
+
+		tcsr at 194b000 {
+			status = "okay";
+
+			compatible = "qcom,tcsr";
+			reg = <0x194b000 0x100>;
+			qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
+		};
+
+		ess_tcsr at 1953000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1953000 0x1000>;
+			qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
+		};
+
+		tcsr at 1957000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1957000 0x100>;
+			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
+		};
+
+		crypto at 8e3a000 {
+			status = "okay";
+		};
+
+		watchdog at b017000 {
+			status = "okay";
+		};
+
+		ess-switch at c000000 {
+			status = "okay";
+
+			switch_lan_bmp = <0x1c>;
+			switch_wan_bmp = <0x02>;
+		};
+
+		edma at c080000 {
+			status = "okay";
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&tlmm 49 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			label = "green:power";
+			gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+		};
+
+		led-1 {
+			label = "red:power";
+			gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
+			panic-indicator;
+		};
+
+		led_status_green: led-2 {
+			label = "green:status";
+			gpios = <&tlmm 53 GPIO_ACTIVE_HIGH>;
+		};
+
+		led_status_red: led-3 {
+			label = "red:status";
+			gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
+		};
+
+		led_status_blue: led-4 {
+			label = "blue:status";
+			gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>;
+		};
+
+		led_status_white: led-5 {
+			label = "white:status";
+			gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&vqmmc {
+	status = "okay";
+};
+
+&sdhci {
+	status = "okay";
+
+	pinctrl-0 = <&sd_pins>;
+	pinctrl-names = "default";
+	cd-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
+	vqmmc-supply = <&vqmmc>;
+};
+
+&qpic_bam {
+	status = "okay";
+};
+
+&tlmm {
+	mdio_pins: mdio_pinmux {
+		mux_1 {
+			pins = "gpio6";
+			function = "mdio";
+			bias-pull-up;
+		};
+
+		mux_2 {
+			pins = "gpio7";
+			function = "mdc";
+			bias-pull-up;
+		};
+	};
+
+	serial_pins: serial_pinmux {
+		mux {
+			pins = "gpio16", "gpio17";
+			function = "blsp_uart0";
+			bias-disable;
+		};
+	};
+
+	i2c_0_pins: i2c_0_pinmux {
+		pinmux {
+			function = "blsp_i2c0";
+			pins = "gpio58", "gpio59";
+			bias-disable;
+		};
+	};
+
+	sd_pins: sd_pins {
+		pinmux {
+			function = "sdio";
+			pins = "gpio23", "gpio24", "gpio25", "gpio26",
+				"gpio28", "gpio29", "gpio30", "gpio31";
+			drive-strength = <10>;
+		};
+
+		pinmux_sd_clk {
+			function = "sdio";
+			pins = "gpio27";
+			drive-strength = <16>;
+		};
+
+		pinmux_sd7 {
+			function = "sdio";
+			pins = "gpio32";
+			drive-strength = <10>;
+			bias-disable;
+		};
+	};
+};
+
+&blsp_dma {
+	status = "okay";
+};
+
+&blsp1_i2c3 {
+	pinctrl-0 = <&i2c_0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	led-controller at 27 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "ti,tlc59108"; /* really is tlc59208f */
+		reg = <0x27>;
+
+		led0 at 0 {
+			label = "rgb:led0";
+			reg = <0x0>;
+			linux,default-trigger = "default-on";
+		};
+
+		led1 at 1 {
+			label = "rgb:led1";
+			reg = <0x1>;
+			linux,default-trigger = "default-on";
+		};
+
+		led2 at 2 {
+			label = "rgb:led2";
+			reg = <0x2>;
+			linux,default-trigger = "default-on";
+		};
+
+		led3 at 3 {
+			label = "rgb:led3";
+			reg = <0x3>;
+			linux,default-trigger = "default-on";
+		};
+
+		led4 at 4 {
+			label = "rgb:led4";
+			reg = <0x4>;
+			linux,default-trigger = "default-on";
+		};
+
+		led5 at 5 {
+			label = "rgb:led5";
+			reg = <0x5>;
+			linux,default-trigger = "default-on";
+		};
+
+		led6 at 6 {
+			label = "rgb:led6";
+			reg = <0x6>;
+			linux,default-trigger = "default-on";
+		};
+
+		led7 at 7 {
+			label = "rgb:led7";
+			reg = <0x7>;
+			linux,default-trigger = "default-on";
+		};
+	};
+};
+
+&blsp1_uart1 {
+	status = "okay";
+
+	pinctrl-0 = <&serial_pins>;
+	pinctrl-names = "default";
+};
+
+&cryptobam {
+	status = "okay";
+};
+
+&gmac0 {
+	vlan_tag = <1 0x1c>;
+};
+
+&gmac1 {
+	qcom,phy_mdio_addr = <0>;
+	vlan_tag = <2 0x02>;
+};
+
+&pcie0 {
+	status = "okay";
+
+	perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
+	wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
+
+	bridge at 0,0 {
+		reg = <0x00000000 0 0 0 0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+
+		wifi at 1,0 {
+			compatible = "qcom,ath10k";
+			status = "okay";
+			reg = <0x00010000 0 0 0 0>;
+			ieee80211-freq-limit = <5470000 5875000>;
+			qcom,ath10k-calibration-variant = "Netgear-Orbi-Pro-SRK60";
+		};
+	};
+};
+
+&wifi0 {
+	status = "okay";
+
+	qcom,ath10k-calibration-variant = "Netgear-Orbi-Pro-SRK60";
+};
+
+&wifi1 {
+	status = "okay";
+
+	qcom,ath10k-calibration-variant = "Netgear-Orbi-Pro-SRK60";
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts
new file mode 100644
index 0000000000..a803999804
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019-orbi.dtsi"
+
+/ {
+	model = "NETGEAR RBR50";
+	compatible = "netgear,rbr50";
+
+	chosen {
+		bootargs = "root=/dev/mmcblk0p20 blkdevparts=mmcblk0:512K at 17K(0:SBL1)ro,512K(0:BOOTCONFIG)ro,512K(0:QSEE)ro,512K(0:QSEE_ALT)ro,256K(0:CDT)ro,256K(0:CDT_ALT)ro,256K(0:DDRPARAMS)ro,256K(0:APPSBLENV)ro,1M(0:APPSBL)ro,1M(0:APPSBL_ALT)ro,256K(0:ART)ro,256K(ARTMTD)ro,2M(language)ro,256K(config)ro,256K(pot)ro,256K(traffic_meter)ro,256K(pot_bak)ro,256K(traffic_meter.bak)ro,3840K(kernel),31488K(rootfs),35328K at 9233K(firmware),256K(mtdoops)ro,1457651200(reserved)ro,-(unallocated) rootfstype=squas [...]
+	};
+
+	soc {
+		usb2 at 60f8800 {
+			status = "okay";
+		};
+
+		usb3 at 8af8800 {
+			status = "okay";
+		};
+	};
+};
+
+&usb3_hs_phy {
+	status = "okay";
+};
+
+&usb2_hs_phy {
+	status = "okay";
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts
new file mode 100644
index 0000000000..4d0a9132c6
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019-orbi.dtsi"
+
+/ {
+	model = "NETGEAR RBS50";
+	compatible = "netgear,rbs50";
+
+	chosen {
+		bootargs = "root=/dev/mmcblk0p20 blkdevparts=mmcblk0:512K at 17K(0:SBL1)ro,512K(0:BOOTCONFIG)ro,512K(0:QSEE)ro,512K(0:QSEE_ALT)ro,256K(0:CDT)ro,256K(0:CDT_ALT)ro,256K(0:DDRPARAMS)ro,256K(0:APPSBLENV)ro,1M(0:APPSBL)ro,1M(0:APPSBL_ALT)ro,256K(0:ART)ro,256K(ARTMTD)ro,2M(language)ro,256K(config)ro,256K(pot)ro,256K(traffic_meter)ro,256K(pot_bak)ro,256K(traffic_meter.bak)ro,3840K(kernel),31488K(rootfs),35328K at 9233K(firmware),256K(mtdoops)ro,1457651200(reserved)ro,-(unallocated) rootfstype=squas [...]
+	};
+
+	soc {
+		usb2 at 60f8800 {
+			status = "okay";
+		};
+
+		usb3 at 8af8800 {
+			status = "okay";
+		};
+	};
+};
+
+&usb3_hs_phy {
+	status = "okay";
+};
+
+&usb2_hs_phy {
+	status = "okay";
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srr60.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srr60.dts
new file mode 100644
index 0000000000..80bcb2e204
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srr60.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019-orbi.dtsi"
+
+/ {
+	model = "NETGEAR SRR60";
+	compatible = "netgear,srr60";
+
+	chosen {
+		bootargs = "root=/dev/mmcblk0p20 blkdevparts=mmcblk0:512K at 17K(0:SBL1)ro,512K(0:BOOTCONFIG)ro,512K(0:QSEE)ro,512K(0:QSEE_1)ro,256K(0:CDT)ro,256K(0:CDT_1)ro,512K(0:BOOTCONFIG1)ro,256K(0:APPSBLENV)ro,1M(0:APPSBL)ro,1M(0:APPSBL_1)ro,256K(0:ART)ro,256K(ARTMTD)ro,2M(language)ro,256K(config)ro,256K(pot)ro,256K(traffic_meter)ro,256K(pot_bak)ro,256K(traffic_meter.bak)ro,3840K(kernel),31488K(rootfs),35328K at 9233K(firmware),256K(mtdoops)ro,64K(cert)ro,3840K(kernel-2)ro,31488K(rootfs-2)ro,35328K at 44 [...]
+	};
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srs60.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srs60.dts
new file mode 100644
index 0000000000..65bb7ac397
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srs60.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019-orbi.dtsi"
+
+/ {
+	model = "NETGEAR SRS60";
+	compatible = "netgear,srs60";
+
+	chosen {
+		bootargs = "root=/dev/mmcblk0p20 blkdevparts=mmcblk0:512K at 17K(0:SBL1)ro,512K(0:BOOTCONFIG)ro,512K(0:QSEE)ro,512K(0:QSEE_1)ro,256K(0:CDT)ro,256K(0:CDT_1)ro,512K(0:BOOTCONFIG1)ro,256K(0:APPSBLENV)ro,1M(0:APPSBL)ro,1M(0:APPSBL_1)ro,256K(0:ART)ro,256K(ARTMTD)ro,2M(language)ro,256K(config)ro,256K(pot)ro,256K(traffic_meter)ro,256K(pot_bak)ro,256K(traffic_meter.bak)ro,3840K(kernel),31488K(rootfs),35328K at 9233K(firmware),256K(mtdoops)ro,64K(cert)ro,3840K(kernel-2)ro,31488K(rootfs-2)ro,35328K at 44 [...]
+	};
+};
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index e0cfa07541..dcfe3e027c 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -646,6 +646,64 @@ define Device/netgear_ex6150v2
 endef
 TARGET_DEVICES += netgear_ex6150v2
 
+define Device/netgear_orbi
+	$(call Device/DniImage)
+	SOC := qcom-ipq4019
+	DEVICE_VENDOR := NETGEAR
+	IMAGE/factory.img := append-kernel | pad-offset 128k 64 | \
+		append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
+		append-rootfs | pad-rootfs | netgear-dni
+	IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | \
+		sysupgrade-tar rootfs=$$$$@ | append-metadata
+	DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
+endef
+
+define Device/netgear_rbx50
+	$(call Device/netgear_orbi)
+	NETGEAR_HW_ID := 29765352+0+4000+512+2x2+2x2+4x4
+	KERNEL_SIZE := 3932160
+	ROOTFS_SIZE := 32243712
+	IMAGE_SIZE := 36175872
+endef
+
+define Device/netgear_rbr50
+	$(call Device/netgear_rbx50)
+	DEVICE_MODEL := RBR50
+	DEVICE_VARIANT := v1
+	NETGEAR_BOARD_ID := RBR50
+endef
+TARGET_DEVICES += netgear_rbr50
+
+define Device/netgear_rbs50
+	$(call Device/netgear_rbx50)
+	DEVICE_MODEL := RBS50
+	DEVICE_VARIANT := v1
+	NETGEAR_BOARD_ID := RBS50
+endef
+TARGET_DEVICES += netgear_rbs50
+
+define Device/netgear_srx60
+	$(call Device/netgear_orbi)
+	NETGEAR_HW_ID := 29765352+0+4096+512+2x2+2x2+4x4
+	KERNEL_SIZE := 3932160
+	ROOTFS_SIZE := 32243712
+	IMAGE_SIZE := 36175872
+endef
+
+define Device/netgear_srr60
+	$(call Device/netgear_srx60)
+	DEVICE_MODEL := SRR60
+	NETGEAR_BOARD_ID := SRR60
+endef
+TARGET_DEVICES += netgear_srr60
+
+define Device/netgear_srs60
+	$(call Device/netgear_srx60)
+	DEVICE_MODEL := SRS60
+	NETGEAR_BOARD_ID := SRS60
+endef
+TARGET_DEVICES += netgear_srs60
+
 define Device/netgear_wac510
 	$(call Device/FitImage)
 	$(call Device/UbiFit)
diff --git a/target/linux/ipq40xx/patches-5.10/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.10/901-arm-boot-add-dts-files.patch
index aef58ee50e..471fcd6498 100644
--- a/target/linux/ipq40xx/patches-5.10/901-arm-boot-add-dts-files.patch
+++ b/target/linux/ipq40xx/patches-5.10/901-arm-boot-add-dts-files.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
-@@ -902,11 +902,61 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+@@ -902,11 +902,65 @@ dtb-$(CONFIG_ARCH_QCOM) += \
  	qcom-apq8074-dragonboard.dtb \
  	qcom-apq8084-ifc6540.dtb \
  	qcom-apq8084-mtp.dtb \
@@ -47,18 +47,22 @@ Signed-off-by: John Crispin <john at phrozen.org>
  	qcom-ipq4019-ap.dk07.1-c2.dtb \
 +	qcom-ipq4019-a62.dtb \
 +	qcom-ipq4019-cm520-79f.dtb \
++	qcom-ipq4019-e2600ac-c1.dtb \
++	qcom-ipq4019-e2600ac-c2.dtb \
 +	qcom-ipq4019-ea8300.dtb \
 +	qcom-ipq4019-eap2200.dtb \
 +	qcom-ipq4019-fritzbox-7530.dtb \
 +	qcom-ipq4019-fritzrepeater-1200.dtb \
 +	qcom-ipq4019-fritzrepeater-3000.dtb \
++	qcom-ipq4019-habanero-dvk.dtb \
 +	qcom-ipq4019-map-ac2200.dtb \
 +	qcom-ipq4019-mr8300.dtb \
-+	qcom-ipq4019-e2600ac-c1.dtb \
-+	qcom-ipq4019-e2600ac-c2.dtb \
-+	qcom-ipq4019-habanero-dvk.dtb \
 +	qcom-ipq4019-pa2200.dtb \
++	qcom-ipq4019-rbr50.dtb \
++	qcom-ipq4019-rbs50.dtb \
 +	qcom-ipq4019-rtl30vw.dtb \
++	qcom-ipq4019-srr60.dtb \
++	qcom-ipq4019-srs60.dtb \
 +	qcom-ipq4019-u4019-32m.dtb \
 +	qcom-ipq4019-wpj419.dtb \
 +	qcom-ipq4019-wtr-m2133hp.dtb \
diff --git a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
index 0447fb6012..bb63c1c4fb 100644
--- a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
+++ b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
-@@ -837,11 +837,61 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+@@ -837,11 +837,65 @@ dtb-$(CONFIG_ARCH_QCOM) += \
  	qcom-apq8074-dragonboard.dtb \
  	qcom-apq8084-ifc6540.dtb \
  	qcom-apq8084-mtp.dtb \
@@ -58,7 +58,11 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +	qcom-ipq4019-e2600ac-c2.dtb \
 +	qcom-ipq4019-habanero-dvk.dtb \
 +	qcom-ipq4019-pa2200.dtb \
++	qcom-ipq4019-rbr50.dtb \
++	qcom-ipq4019-rbs50.dtb \
 +	qcom-ipq4019-rtl30vw.dtb \
++	qcom-ipq4019-srr60.dtb \
++	qcom-ipq4019-srs60.dtb \
 +	qcom-ipq4019-u4019-32m.dtb \
 +	qcom-ipq4019-wpj419.dtb \
 +	qcom-ipq4019-wtr-m2133hp.dtb \



More information about the lede-commits mailing list