Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: BCM47XX: Add support for Netgear R6200 V1

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>

authored by

Edward Matijević and committed by
Paul Burton
42374b94 1f66c45d

+12
+1
arch/mips/bcm47xx/board.c
··· 160 160 {{BCM47XX_BOARD_LUXUL_XVW_P30_V1, "Luxul XVW-P30 V1"}, "luxul_xvwp30_v1"}, 161 161 {{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"}, 162 162 {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"}, 163 + {{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"}, 163 164 {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"}, 164 165 {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"}, 165 166 {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
+10
arch/mips/bcm47xx/buttons.c
··· 385 385 /* Netgear */ 386 386 387 387 static const struct gpio_keys_button 388 + bcm47xx_buttons_netgear_r6200_v1[] __initconst = { 389 + BCM47XX_GPIO_KEY(2, KEY_RFKILL), 390 + BCM47XX_GPIO_KEY(3, KEY_RESTART), 391 + BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), 392 + }; 393 + 394 + static const struct gpio_keys_button 388 395 bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { 389 396 BCM47XX_GPIO_KEY(4, KEY_RESTART), 390 397 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON), ··· 671 664 err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gv2v3); 672 665 break; 673 666 667 + case BCM47XX_BOARD_NETGEAR_R6200_V1: 668 + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1); 669 + break; 674 670 case BCM47XX_BOARD_NETGEAR_WNDR3400V1: 675 671 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1); 676 672 break;
+1
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
··· 98 98 BCM47XX_BOARD_MOTOROLA_WR850GP, 99 99 BCM47XX_BOARD_MOTOROLA_WR850GV2V3, 100 100 101 + BCM47XX_BOARD_NETGEAR_R6200_V1, 101 102 BCM47XX_BOARD_NETGEAR_WGR614V8, 102 103 BCM47XX_BOARD_NETGEAR_WGR614V9, 103 104 BCM47XX_BOARD_NETGEAR_WGR614_V10,