aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm47xx
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2022-12-27 11:35:42 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2022-12-30 20:03:59 +0100
commit00952fb0caed57aa42cd173f1ece8d399993a136 (patch)
tree3818215a156f94767c6cfe27722b588138cba06c /target/linux/bcm47xx
parentdefd016aefb5135e651ecfbffcfa2d5caf1cba7e (diff)
downloadupstream-00952fb0caed57aa42cd173f1ece8d399993a136.tar.gz
upstream-00952fb0caed57aa42cd173f1ece8d399993a136.tar.bz2
upstream-00952fb0caed57aa42cd173f1ece8d399993a136.zip
bcm47xx: replace "Devices-database-update-patch" with upstream patches
Replace "320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch" with upstream patches: - 320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch - 321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch - 322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch - 323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch - 324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch - 325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'target/linux/bcm47xx')
-rw-r--r--target/linux/bcm47xx/patches-5.10/320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch268
-rw-r--r--target/linux/bcm47xx/patches-5.10/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch89
-rw-r--r--target/linux/bcm47xx/patches-5.10/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch60
-rw-r--r--target/linux/bcm47xx/patches-5.10/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch63
-rw-r--r--target/linux/bcm47xx/patches-5.10/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch109
-rw-r--r--target/linux/bcm47xx/patches-5.10/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch67
-rw-r--r--target/linux/bcm47xx/patches-5.10/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch40
7 files changed, 428 insertions, 268 deletions
diff --git a/target/linux/bcm47xx/patches-5.10/320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch b/target/linux/bcm47xx/patches-5.10/320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch
deleted file mode 100644
index 8126768f72..0000000000
--- a/target/linux/bcm47xx/patches-5.10/320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch
+++ /dev/null
@@ -1,268 +0,0 @@
---- a/arch/mips/bcm47xx/board.c
-+++ b/arch/mips/bcm47xx/board.c
-@@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
- {{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
- {{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
- {{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
-+ {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
- {{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
- {{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
- {{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
-@@ -161,9 +162,12 @@ struct bcm47xx_board_type_list1 bcm47xx_
- {{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
- {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
- {{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"},
-+ {{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
-+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
-+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
-@@ -177,6 +181,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
- {{BCM47XX_BOARD_NETGEAR_WNR1000_V3, "Netgear WNR1000 V3"}, "U12H139T50_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNR2000, "Netgear WNR2000"}, "U12H114T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "U12H136T99_NETGEAR"},
-+ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "U12H172T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNR3500U, "Netgear WNR3500U"}, "U12H136T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNR3500V2, "Netgear WNR3500 V2"}, "U12H127T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNR3500V2VC, "Netgear WNR3500 V2vc"}, "U12H127T70_NETGEAR"},
-@@ -191,6 +196,7 @@ struct bcm47xx_board_type_list3 bcm47xx_
- {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
- {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
- {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
-+ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "0x052b", "3500L", "02"},
- {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
- {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
- {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
---- a/arch/mips/bcm47xx/buttons.c
-+++ b/arch/mips/bcm47xx/buttons.c
-@@ -27,6 +27,12 @@
- /* Asus */
-
- static const struct gpio_keys_button
-+bcm47xx_buttons_asus_rtn10u[] __initconst = {
-+ BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
-+ BCM47XX_GPIO_KEY(21, KEY_RESTART),
-+};
-+
-+static const struct gpio_keys_button
- bcm47xx_buttons_asus_rtn12[] __initconst = {
- BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
- BCM47XX_GPIO_KEY(1, KEY_RESTART),
-@@ -277,6 +283,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
- };
-
- static const struct gpio_keys_button
-+bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
-+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
-+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
-+};
-+
-+static const struct gpio_keys_button
-+bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
-+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
-+ BCM47XX_GPIO_KEY(8, KEY_RESTART),
-+};
-+
-+static const struct gpio_keys_button
- bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
- BCM47XX_GPIO_KEY(5, KEY_WIMAX),
- BCM47XX_GPIO_KEY(6, KEY_RESTART),
-@@ -392,6 +410,17 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini
- };
-
- static const struct gpio_keys_button
-+bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
-+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
-+};
-+
-+static const struct gpio_keys_button
-+bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
-+ BCM47XX_GPIO_KEY(12, KEY_RESTART),
-+ BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
-+};
-+
-+static const struct gpio_keys_button
- bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
- BCM47XX_GPIO_KEY(4, KEY_RESTART),
- BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
-@@ -431,6 +460,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i
- };
-
- static const struct gpio_keys_button
-+bcm47xx_buttons_netgear_wnr3500lv2[] __initconst = {
-+ BCM47XX_GPIO_KEY(4, KEY_RESTART),
-+ BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
-+ BCM47XX_GPIO_KEY(8, KEY_RFKILL),
-+};
-+
-+static const struct gpio_keys_button
- bcm47xx_buttons_netgear_wnr834bv2[] __initconst = {
- BCM47XX_GPIO_KEY(6, KEY_RESTART),
- };
-@@ -478,6 +514,9 @@ int __init bcm47xx_buttons_register(void
- int err;
-
- switch (board) {
-+ case BCM47XX_BOARD_ASUS_RTN10U:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
-+ break;
- case BCM47XX_BOARD_ASUS_RTN12:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
- break;
-@@ -608,6 +647,12 @@ int __init bcm47xx_buttons_register(void
- case BCM47XX_BOARD_LINKSYS_WRT310NV1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
- break;
-+ case BCM47XX_BOARD_LINKSYS_WRT310NV2:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
-+ break;
-+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
-+ break;
- case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
- break;
-@@ -674,6 +719,12 @@ int __init bcm47xx_buttons_register(void
- case BCM47XX_BOARD_NETGEAR_R6200_V1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
- break;
-+ case BCM47XX_BOARD_NETGEAR_R6300_V1:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
-+ break;
-+ case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
-+ break;
- case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
- break;
-@@ -692,6 +743,9 @@ int __init bcm47xx_buttons_register(void
- case BCM47XX_BOARD_NETGEAR_WNR3500L:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
- break;
-+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv2);
-+ break;
- case BCM47XX_BOARD_NETGEAR_WNR834BV2:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
- break;
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -30,6 +30,14 @@
- /* Asus */
-
- static const struct gpio_led
-+bcm47xx_leds_asus_rtn10u[] __initconst = {
-+ BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
-+static const struct gpio_led
- bcm47xx_leds_asus_rtn12[] __initconst = {
- BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
- BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
-@@ -314,6 +322,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
- };
-
- static const struct gpio_led
-+bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
-+ BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
-+static const struct gpio_led
- bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
- BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
- BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-@@ -513,6 +528,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init
- };
-
- static const struct gpio_led
-+bcm47xx_leds_netgear_wnr3500lv2[] __initconst = {
-+ BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
-+static const struct gpio_led
- bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
- BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
- BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
-@@ -556,6 +579,9 @@ void __init bcm47xx_leds_register(void)
- enum bcm47xx_board board = bcm47xx_board_get();
-
- switch (board) {
-+ case BCM47XX_BOARD_ASUS_RTN10U:
-+ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
-+ break;
- case BCM47XX_BOARD_ASUS_RTN12:
- bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
- break;
-@@ -689,6 +715,9 @@ void __init bcm47xx_leds_register(void)
- case BCM47XX_BOARD_LINKSYS_WRT310NV1:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
- break;
-+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
-+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
-+ break;
- case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
- break;
-@@ -770,6 +799,9 @@ void __init bcm47xx_leds_register(void)
- case BCM47XX_BOARD_NETGEAR_WNR3500L:
- bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
- break;
-+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
-+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv2);
-+ break;
- case BCM47XX_BOARD_NETGEAR_WNR834BV2:
- bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
- break;
---- a/arch/mips/bcm47xx/workarounds.c
-+++ b/arch/mips/bcm47xx/workarounds.c
-@@ -22,6 +22,7 @@ void __init bcm47xx_workarounds(void)
-
- switch (board) {
- case BCM47XX_BOARD_NETGEAR_WNR3500L:
-+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
- bcm47xx_workarounds_enable_usb_power(12);
- break;
- case BCM47XX_BOARD_NETGEAR_WNDR3400V2:
---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -72,6 +72,7 @@ enum bcm47xx_board {
- BCM47XX_BOARD_LINKSYS_WRT300NV11,
- BCM47XX_BOARD_LINKSYS_WRT310NV1,
- BCM47XX_BOARD_LINKSYS_WRT310NV2,
-+ BCM47XX_BOARD_LINKSYS_WRT320N_V1,
- BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
- BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
- BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
-@@ -99,9 +100,12 @@ enum bcm47xx_board {
- BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
-
- BCM47XX_BOARD_NETGEAR_R6200_V1,
-+ BCM47XX_BOARD_NETGEAR_R6300_V1,
- BCM47XX_BOARD_NETGEAR_WGR614V8,
- BCM47XX_BOARD_NETGEAR_WGR614V9,
- BCM47XX_BOARD_NETGEAR_WGR614_V10,
-+ BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
-+ BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
- BCM47XX_BOARD_NETGEAR_WNDR3300,
- BCM47XX_BOARD_NETGEAR_WNDR3400V1,
- BCM47XX_BOARD_NETGEAR_WNDR3400V2,
-@@ -114,6 +118,7 @@ enum bcm47xx_board {
- BCM47XX_BOARD_NETGEAR_WNR1000_V3,
- BCM47XX_BOARD_NETGEAR_WNR2000,
- BCM47XX_BOARD_NETGEAR_WNR3500L,
-+ BCM47XX_BOARD_NETGEAR_WNR3500L_V2,
- BCM47XX_BOARD_NETGEAR_WNR3500U,
- BCM47XX_BOARD_NETGEAR_WNR3500V2,
- BCM47XX_BOARD_NETGEAR_WNR3500V2VC,
diff --git a/target/linux/bcm47xx/patches-5.10/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch b/target/linux/bcm47xx/patches-5.10/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch
new file mode 100644
index 0000000000..f34336edd5
--- /dev/null
+++ b/target/linux/bcm47xx/patches-5.10/320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch
@@ -0,0 +1,89 @@
+From 3829e4f10a232964cc728c0479c8097922e5e073 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Thu, 6 Jan 2022 19:51:38 -0800
+Subject: [PATCH] MIPS: BCM47XX: Add board entry for Linksys WRT320N v1
+
+This router is based on a Broadcom BCM4717A1 chipset and supports
+802.11n Wi-Fi. Add a board entry for that router and register LEDs and
+buttons accordingly.
+
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+---
+ arch/mips/bcm47xx/board.c | 1 +
+ arch/mips/bcm47xx/buttons.c | 9 +++++++++
+ arch/mips/bcm47xx/leds.c | 10 ++++++++++
+ arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
+ 4 files changed, 21 insertions(+)
+
+--- a/arch/mips/bcm47xx/board.c
++++ b/arch/mips/bcm47xx/board.c
+@@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
+ {{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
+ {{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
+ {{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
++ {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
+ {{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
+ {{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
+ {{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -277,6 +277,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
+ };
+
+ static const struct gpio_keys_button
++bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
++ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
++ BCM47XX_GPIO_KEY(8, KEY_RESTART),
++};
++
++static const struct gpio_keys_button
+ bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
+ BCM47XX_GPIO_KEY(5, KEY_WIMAX),
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
+@@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void
+ case BCM47XX_BOARD_LINKSYS_WRT310NV1:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
+ break;
++ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
++ break;
+ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
+ break;
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -314,6 +314,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
+ };
+
+ static const struct gpio_led
++bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
++ BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
++ BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
++};
++
++static const struct gpio_led
+ bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
+ BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
+ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
+@@ -689,6 +696,9 @@ void __init bcm47xx_leds_register(void)
+ case BCM47XX_BOARD_LINKSYS_WRT310NV1:
+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
+ break;
++ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
++ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
++ break;
+ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
+ break;
+--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+@@ -72,6 +72,7 @@ enum bcm47xx_board {
+ BCM47XX_BOARD_LINKSYS_WRT300NV11,
+ BCM47XX_BOARD_LINKSYS_WRT310NV1,
+ BCM47XX_BOARD_LINKSYS_WRT310NV2,
++ BCM47XX_BOARD_LINKSYS_WRT320N_V1,
+ BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
+ BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
+ BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
diff --git a/target/linux/bcm47xx/patches-5.10/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch b/target/linux/bcm47xx/patches-5.10/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch
new file mode 100644
index 0000000000..6631e79048
--- /dev/null
+++ b/target/linux/bcm47xx/patches-5.10/321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch
@@ -0,0 +1,60 @@
+From 15e690af5cc3cd8f5d14ee2aa3a093f80196110e Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Thu, 6 Jan 2022 19:51:40 -0800
+Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear R6300 v1
+
+Add support for the Netgear R6300 v1 Wi-Fi router using a Broadcom
+BCM4706 chipset and supporting 802.11n and 802.11ac.
+
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+---
+ arch/mips/bcm47xx/board.c | 1 +
+ arch/mips/bcm47xx/buttons.c | 8 ++++++++
+ arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
+ 3 files changed, 10 insertions(+)
+
+--- a/arch/mips/bcm47xx/board.c
++++ b/arch/mips/bcm47xx/board.c
+@@ -162,6 +162,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
+ {{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
+ {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
+ {{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"},
++ {{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -398,6 +398,11 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini
+ };
+
+ static const struct gpio_keys_button
++bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
++ BCM47XX_GPIO_KEY(6, KEY_RESTART),
++};
++
++static const struct gpio_keys_button
+ bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
+ BCM47XX_GPIO_KEY(4, KEY_RESTART),
+ BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
+@@ -683,6 +688,9 @@ int __init bcm47xx_buttons_register(void
+ case BCM47XX_BOARD_NETGEAR_R6200_V1:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
+ break;
++ case BCM47XX_BOARD_NETGEAR_R6300_V1:
++ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
++ break;
+ case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
+ break;
+--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+@@ -100,6 +100,7 @@ enum bcm47xx_board {
+ BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
+
+ BCM47XX_BOARD_NETGEAR_R6200_V1,
++ BCM47XX_BOARD_NETGEAR_R6300_V1,
+ BCM47XX_BOARD_NETGEAR_WGR614V8,
+ BCM47XX_BOARD_NETGEAR_WGR614V9,
+ BCM47XX_BOARD_NETGEAR_WGR614_V10,
diff --git a/target/linux/bcm47xx/patches-5.10/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch b/target/linux/bcm47xx/patches-5.10/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch
new file mode 100644
index 0000000000..8f66aee192
--- /dev/null
+++ b/target/linux/bcm47xx/patches-5.10/322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch
@@ -0,0 +1,63 @@
+From 4da27b6d550427a0560a15df36de99cb17629216 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Thu, 6 Jan 2022 19:51:41 -0800
+Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2
+
+Add support for the Netgear WN2500 RP v1 and v2 Wi-Fi range extenders
+based on the BCM5357 chipset and supporting 802.11n and 802.11ac.
+
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+---
+ arch/mips/bcm47xx/board.c | 2 ++
+ arch/mips/bcm47xx/buttons.c | 9 +++++++++
+ arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++
+ 3 files changed, 13 insertions(+)
+
+--- a/arch/mips/bcm47xx/board.c
++++ b/arch/mips/bcm47xx/board.c
+@@ -166,6 +166,8 @@ struct bcm47xx_board_type_list1 bcm47xx_
+ {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
++ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
++ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -403,6 +403,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __ini
+ };
+
+ static const struct gpio_keys_button
++bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
++ BCM47XX_GPIO_KEY(12, KEY_RESTART),
++ BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
++};
++
++static const struct gpio_keys_button
+ bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
+ BCM47XX_GPIO_KEY(4, KEY_RESTART),
+ BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
+@@ -691,6 +697,9 @@ int __init bcm47xx_buttons_register(void
+ case BCM47XX_BOARD_NETGEAR_R6300_V1:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
+ break;
++ case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
++ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
++ break;
+ case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
+ break;
+--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+@@ -104,6 +104,8 @@ enum bcm47xx_board {
+ BCM47XX_BOARD_NETGEAR_WGR614V8,
+ BCM47XX_BOARD_NETGEAR_WGR614V9,
+ BCM47XX_BOARD_NETGEAR_WGR614_V10,
++ BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
++ BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
+ BCM47XX_BOARD_NETGEAR_WNDR3300,
+ BCM47XX_BOARD_NETGEAR_WNDR3400V1,
+ BCM47XX_BOARD_NETGEAR_WNDR3400V2,
diff --git a/target/linux/bcm47xx/patches-5.10/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch b/target/linux/bcm47xx/patches-5.10/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch
new file mode 100644
index 0000000000..272a74933b
--- /dev/null
+++ b/target/linux/bcm47xx/patches-5.10/323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch
@@ -0,0 +1,109 @@
+From c022e87162219d67d687df22c977d1c2fc95fb42 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Thu, 14 Jul 2022 14:13:01 -0700
+Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear WNR3500L v2
+
+Add support for the Netgear WNR3500L v2 router based on the BCM47186
+chipset and supporting 802.11n Wi-Fi.
+
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+---
+ arch/mips/bcm47xx/board.c | 2 ++
+ arch/mips/bcm47xx/buttons.c | 10 ++++++++++
+ arch/mips/bcm47xx/leds.c | 11 +++++++++++
+ arch/mips/bcm47xx/workarounds.c | 1 +
+ arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
+ 5 files changed, 25 insertions(+)
+
+--- a/arch/mips/bcm47xx/board.c
++++ b/arch/mips/bcm47xx/board.c
+@@ -181,6 +181,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
+ {{BCM47XX_BOARD_NETGEAR_WNR1000_V3, "Netgear WNR1000 V3"}, "U12H139T50_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WNR2000, "Netgear WNR2000"}, "U12H114T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "U12H136T99_NETGEAR"},
++ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "U12H172T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WNR3500U, "Netgear WNR3500U"}, "U12H136T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WNR3500V2, "Netgear WNR3500 V2"}, "U12H127T00_NETGEAR"},
+ {{BCM47XX_BOARD_NETGEAR_WNR3500V2VC, "Netgear WNR3500 V2vc"}, "U12H127T70_NETGEAR"},
+@@ -195,6 +196,7 @@ struct bcm47xx_board_type_list3 bcm47xx_
+ {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
+ {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
++ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "0x052b", "3500L", "02"},
+ {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
+ {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
+ {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -448,6 +448,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i
+ };
+
+ static const struct gpio_keys_button
++bcm47xx_buttons_netgear_wnr3500lv2[] __initconst = {
++ BCM47XX_GPIO_KEY(4, KEY_RESTART),
++ BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
++ BCM47XX_GPIO_KEY(8, KEY_RFKILL),
++};
++
++static const struct gpio_keys_button
+ bcm47xx_buttons_netgear_wnr834bv2[] __initconst = {
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
+ };
+@@ -718,6 +725,9 @@ int __init bcm47xx_buttons_register(void
+ case BCM47XX_BOARD_NETGEAR_WNR3500L:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
+ break;
++ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
++ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv2);
++ break;
+ case BCM47XX_BOARD_NETGEAR_WNR834BV2:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
+ break;
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -520,6 +520,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init
+ };
+
+ static const struct gpio_led
++bcm47xx_leds_netgear_wnr3500lv2[] __initconst = {
++ BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
++ BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
++};
++
++static const struct gpio_led
+ bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
+ BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
+ BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
+@@ -780,6 +788,9 @@ void __init bcm47xx_leds_register(void)
+ case BCM47XX_BOARD_NETGEAR_WNR3500L:
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
+ break;
++ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
++ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv2);
++ break;
+ case BCM47XX_BOARD_NETGEAR_WNR834BV2:
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
+ break;
+--- a/arch/mips/bcm47xx/workarounds.c
++++ b/arch/mips/bcm47xx/workarounds.c
+@@ -22,6 +22,7 @@ void __init bcm47xx_workarounds(void)
+
+ switch (board) {
+ case BCM47XX_BOARD_NETGEAR_WNR3500L:
++ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
+ bcm47xx_workarounds_enable_usb_power(12);
+ break;
+ case BCM47XX_BOARD_NETGEAR_WNDR3400V2:
+--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+@@ -118,6 +118,7 @@ enum bcm47xx_board {
+ BCM47XX_BOARD_NETGEAR_WNR1000_V3,
+ BCM47XX_BOARD_NETGEAR_WNR2000,
+ BCM47XX_BOARD_NETGEAR_WNR3500L,
++ BCM47XX_BOARD_NETGEAR_WNR3500L_V2,
+ BCM47XX_BOARD_NETGEAR_WNR3500U,
+ BCM47XX_BOARD_NETGEAR_WNR3500V2,
+ BCM47XX_BOARD_NETGEAR_WNR3500V2VC,
diff --git a/target/linux/bcm47xx/patches-5.10/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch b/target/linux/bcm47xx/patches-5.10/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch
new file mode 100644
index 0000000000..23d50ad902
--- /dev/null
+++ b/target/linux/bcm47xx/patches-5.10/324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch
@@ -0,0 +1,67 @@
+From aecf89f2f8e8a604c33085c230a1f04ea325de64 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Thu, 6 Jan 2022 19:51:39 -0800
+Subject: [PATCH] MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U
+
+Add the definitions for the buttons and LEDs used on the Asus RTN-10U
+router.
+
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+---
+ arch/mips/bcm47xx/buttons.c | 9 +++++++++
+ arch/mips/bcm47xx/leds.c | 11 +++++++++++
+ 2 files changed, 20 insertions(+)
+
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -27,6 +27,12 @@
+ /* Asus */
+
+ static const struct gpio_keys_button
++bcm47xx_buttons_asus_rtn10u[] __initconst = {
++ BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
++ BCM47XX_GPIO_KEY(21, KEY_RESTART),
++};
++
++static const struct gpio_keys_button
+ bcm47xx_buttons_asus_rtn12[] __initconst = {
+ BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
+ BCM47XX_GPIO_KEY(1, KEY_RESTART),
+@@ -502,6 +508,9 @@ int __init bcm47xx_buttons_register(void
+ int err;
+
+ switch (board) {
++ case BCM47XX_BOARD_ASUS_RTN10U:
++ err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
++ break;
+ case BCM47XX_BOARD_ASUS_RTN12:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
+ break;
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -30,6 +30,14 @@
+ /* Asus */
+
+ static const struct gpio_led
++bcm47xx_leds_asus_rtn10u[] __initconst = {
++ BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
++ BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
++};
++
++static const struct gpio_led
+ bcm47xx_leds_asus_rtn12[] __initconst = {
+ BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
+ BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
+@@ -571,6 +579,9 @@ void __init bcm47xx_leds_register(void)
+ enum bcm47xx_board board = bcm47xx_board_get();
+
+ switch (board) {
++ case BCM47XX_BOARD_ASUS_RTN10U:
++ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
++ break;
+ case BCM47XX_BOARD_ASUS_RTN12:
+ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
+ break;
diff --git a/target/linux/bcm47xx/patches-5.10/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch b/target/linux/bcm47xx/patches-5.10/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch
new file mode 100644
index 0000000000..0c23e8aaf5
--- /dev/null
+++ b/target/linux/bcm47xx/patches-5.10/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch
@@ -0,0 +1,40 @@
+From eea175eedf3e2f71b9538d21e643e7a1be4923df Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Thu, 6 Jan 2022 19:51:37 -0800
+Subject: [PATCH] MIPS: BCM47XX: Define Linksys WRT310N V2 buttons
+
+Update the buttons registration code to register the two buttons (WPS,
+system rester) using the existing BCM47XX_BOARD_LINKSYS_WRT310NV2 board
+entry.
+
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+---
+ arch/mips/bcm47xx/buttons.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -289,6 +289,12 @@ bcm47xx_buttons_linksys_wrt320n_v1[] __i
+ };
+
+ static const struct gpio_keys_button
++bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
++ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
++ BCM47XX_GPIO_KEY(6, KEY_RESTART),
++};
++
++static const struct gpio_keys_button
+ bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
+ BCM47XX_GPIO_KEY(5, KEY_WIMAX),
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
+@@ -644,6 +650,9 @@ int __init bcm47xx_buttons_register(void
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
+ break;
++ case BCM47XX_BOARD_LINKSYS_WRT310NV2:
++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
++ break;
+ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
+ break;