]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS: BCM47XX: Add support for Netgear R6200 V1
authorEdward Matijević <motolav@gmail.com>
Mon, 17 Jun 2019 05:26:46 +0000 (00:26 -0500)
committerPaul Burton <paul.burton@mips.com>
Fri, 26 Jul 2019 05:10:05 +0000 (22:10 -0700)
The Netgear R6200 v1 uses a BCM4718A1 SOC and a BCM4352/BCM4360 for 5GHz
wireless. This patch adds support for detecting this model board and
registers the 3 buttons.

I have tested that the device can boot kernels 4.14 and 4.19 under
OpenWRT.

There is one issue that the LEDs on the device are controlled by a
74HC164 that uses bit-banging instead of SPI so it isn't accessible to
the kernel without adding a workaround. Without any workaround the
device on boot will flash all LEDs once then the power LED will remain
amber as all other LEDs stay off.

Signed-off-by: Edward Matijevic <motolav@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
[paul.burton@mips.com:
  - Sort bcm47xx_board_list_board_id alphabetically by board type.
  - Fix whitespace.
  - Wrap commit message & drop OpenWRT-based justification for
    bcm47xx_board_list_board_id being mis-sorted.]
Signed-off-by: Paul Burton <paul.burton@mips.com>
arch/mips/bcm47xx/board.c
arch/mips/bcm47xx/buttons.c
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h

index a80910d2738c79a055604f1e823af03fd38ff2a6..35266a70e22a3eeb475d9fbe7b09d346ee996fab 100644 (file)
@@ -160,6 +160,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
        {{BCM47XX_BOARD_LUXUL_XVW_P30_V1, "Luxul XVW-P30 V1"}, "luxul_xvwp30_v1"},
        {{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_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"},
index 67b6a78d670bbeb307c42399ee137e3b094fc281..535d84addcdbd47ad545256b6de9d4abe07cc5ab 100644 (file)
@@ -384,6 +384,13 @@ bcm47xx_buttons_motorola_wr850gv2v3[] __initconst = {
 
 /* Netgear */
 
+static const struct gpio_keys_button
+bcm47xx_buttons_netgear_r6200_v1[] __initconst = {
+       BCM47XX_GPIO_KEY(2, KEY_RFKILL),
+       BCM47XX_GPIO_KEY(3, KEY_RESTART),
+       BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
+};
+
 static const struct gpio_keys_button
 bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
        BCM47XX_GPIO_KEY(4, KEY_RESTART),
@@ -664,6 +671,9 @@ int __init bcm47xx_buttons_register(void)
                err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gv2v3);
                break;
 
+       case BCM47XX_BOARD_NETGEAR_R6200_V1:
+               err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
+               break;
        case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
                err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
                break;
index 0ef8893e07f8e2b7cab6d8233673d6517ff7f92f..f879be3e80998e094da68ccd6facccb300d3171b 100644 (file)
@@ -98,6 +98,7 @@ enum bcm47xx_board {
        BCM47XX_BOARD_MOTOROLA_WR850GP,
        BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
 
+       BCM47XX_BOARD_NETGEAR_R6200_V1,
        BCM47XX_BOARD_NETGEAR_WGR614V8,
        BCM47XX_BOARD_NETGEAR_WGR614V9,
        BCM47XX_BOARD_NETGEAR_WGR614_V10,