ipq40xx: add support for Netgear RBX40
authorThomas Makin <halorocker89@gmail.com>
Tue, 5 Sep 2023 00:00:14 +0000 (20:00 -0400)
committerChristian Marangi <ansuelsmth@gmail.com>
Sat, 16 Sep 2023 10:08:03 +0000 (12:08 +0200)
This adds support for the RBR40 and RBS40 (sold together as RBK40),
two netgear routers identical to SRR60/SRS60 in all but antennae (and
hardware id). See 2cb24b3f3c for details.

Signed-off-by: Thomas Makin <halorocker89@gmail.com>
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts [new file with mode: 0644]
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts [new file with mode: 0644]
target/linux/ipq40xx/image/generic.mk

index 951e0ad0444ba3b6ad8772cf3473177a43a3e55e..614afa8590dace0974077c44b710c61317a434b1 100644 (file)
@@ -88,6 +88,8 @@ ipq40xx_setup_interfaces()
        aruba,ap-303h|\
        buffalo,wtr-m2133hp|\
        ezviz,cs-w3-wd1200g-eup|\
+       netgear,rbr40|\
+       netgear,rbs40|\
        netgear,rbr50|\
        netgear,rbs50|\
        netgear,srr60|\
index e77267bf42dcb7e673669c43285595042619ca84..7b72df86ef42af7bae73451ebcc7dd0375d15481 100644 (file)
@@ -40,6 +40,8 @@ case "$FIRMWARE" in
                # OEM assigns 4 sequential MACs
                ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
                ;;
+       netgear,rbr40|\
+       netgear,rbs40|\
        netgear,rbr50|\
        netgear,rbs50|\
        netgear,srr60|\
@@ -117,6 +119,8 @@ case "$FIRMWARE" in
                ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x0 0x2f20 ) || \
                ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_0" 0x0 0x2f20 )
                ;;
+       netgear,rbr40|\
+       netgear,rbs40|\
        netgear,rbr50|\
        netgear,rbs50|\
        netgear,srr60|\
@@ -211,6 +215,8 @@ case "$FIRMWARE" in
                ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x8000 0x2f20 ) || \
                ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_2" 0x0 0x2f20 )
                ;;
+       netgear,rbr40|\
+       netgear,rbs40|\
        netgear,rbr50|\
        netgear,rbs50|\
        netgear,srr60|\
index 83aac330ca2ddea3fde433eb6f8680cde326747c..d55bb71c8b48732174b0fafa97773e782622dd07 100644 (file)
@@ -191,6 +191,8 @@ platform_do_upgrade() {
        mikrotik,hap-ac3)
                platform_do_upgrade_mikrotik_nand "$1"
                ;;
+       netgear,rbr40|\
+       netgear,rbs40|\
        netgear,rbr50 |\
        netgear,rbs50 |\
        netgear,srr60 |\
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts
new file mode 100644 (file)
index 0000000..26e87b8
--- /dev/null
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019-orbi.dtsi"
+
+/ {
+       model = "NETGEAR RBR40";
+       compatible = "netgear,rbr40";
+
+       chosen {
+               bootargs = "root=/dev/mmcblk0p20 blkdevparts=mmcblk0:512K@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@9233K(firmware),256K(mtdoops)ro,1457651200(reserved)ro,-(unallocated) rootfstype=squashfs,ext4 rootwait";
+       };
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts
new file mode 100644 (file)
index 0000000..2dfa0c9
--- /dev/null
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019-orbi.dtsi"
+
+/ {
+       model = "NETGEAR RBS40";
+       compatible = "netgear,rbs40";
+
+       chosen {
+               bootargs = "root=/dev/mmcblk0p20 blkdevparts=mmcblk0:512K@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@9233K(firmware),256K(mtdoops)ro,1457651200(reserved)ro,-(unallocated) rootfstype=squashfs,ext4 rootwait";
+       };
+};
index 15f48a67b255cbfa399b9e0bc8798d2dbcbc54df..29778156df03565a5a77753f62e10b991c26614f 100644 (file)
@@ -826,6 +826,30 @@ define Device/netgear_orbi
        DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
 endef
 
+define Device/netgear_rbx40
+       $(call Device/netgear_orbi)
+       NETGEAR_HW_ID := 29765515+0+4096+512+2x2+2x2+2x2
+       KERNEL_SIZE := 3932160
+       ROOTFS_SIZE := 32243712
+       IMAGE_SIZE := 36175872
+endef
+
+define Device/netgear_rbr40
+       $(call Device/netgear_rbx40)
+       DEVICE_MODEL := RBR40
+       DEVICE_VARIANT := v1
+       NETGEAR_BOARD_ID := RBR40
+endef
+TARGET_DEVICES += netgear_rbr40
+
+define Device/netgear_rbs40
+       $(call Device/netgear_rbx40)
+       DEVICE_MODEL := RBS40
+       DEVICE_VARIANT := v1
+       NETGEAR_BOARD_ID := RBS40
+endef
+TARGET_DEVICES += netgear_rbs40
+
 define Device/netgear_rbx50
        $(call Device/netgear_orbi)
        NETGEAR_HW_ID := 29765352+0+4000+512+2x2+2x2+4x4