6975bce95232086909b162e431c571e669918df1
[openwrt/staging/ansuel.git] /
1 From 4da27b6d550427a0560a15df36de99cb17629216 Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <f.fainelli@gmail.com>
3 Date: Thu, 6 Jan 2022 19:51:41 -0800
4 Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2
5
6 Add support for the Netgear WN2500 RP v1 and v2 Wi-Fi range extenders
7 based on the BCM5357 chipset and supporting 802.11n and 802.11ac.
8
9 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
10 Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
11 ---
12 arch/mips/bcm47xx/board.c | 2 ++
13 arch/mips/bcm47xx/buttons.c | 9 +++++++++
14 arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++
15 3 files changed, 13 insertions(+)
16
17 --- a/arch/mips/bcm47xx/board.c
18 +++ b/arch/mips/bcm47xx/board.c
19 @@ -166,6 +166,8 @@ struct bcm47xx_board_type_list1 bcm47xx_
20 {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
21 {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
22 {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
23 + {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
24 + {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
25 {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
26 {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
27 {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
28 --- a/arch/mips/bcm47xx/buttons.c
29 +++ b/arch/mips/bcm47xx/buttons.c
30 @@ -415,6 +415,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __ini
31 };
32
33 static const struct gpio_keys_button
34 +bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
35 + BCM47XX_GPIO_KEY(12, KEY_RESTART),
36 + BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
37 +};
38 +
39 +static const struct gpio_keys_button
40 bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
41 BCM47XX_GPIO_KEY(4, KEY_RESTART),
42 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
43 @@ -709,6 +715,9 @@ int __init bcm47xx_buttons_register(void
44 case BCM47XX_BOARD_NETGEAR_R6300_V1:
45 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
46 break;
47 + case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
48 + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
49 + break;
50 case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
51 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
52 break;
53 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
54 +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
55 @@ -104,6 +104,8 @@ enum bcm47xx_board {
56 BCM47XX_BOARD_NETGEAR_WGR614V8,
57 BCM47XX_BOARD_NETGEAR_WGR614V9,
58 BCM47XX_BOARD_NETGEAR_WGR614_V10,
59 + BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
60 + BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
61 BCM47XX_BOARD_NETGEAR_WNDR3300,
62 BCM47XX_BOARD_NETGEAR_WNDR3400V1,
63 BCM47XX_BOARD_NETGEAR_WNDR3400V2,