* [PATCH] MIPS: BCM47XX: Add support for Netgear R6200 V1
@ 2019-06-17 5:26 Edward Matijević
2019-06-17 20:45 ` Hauke Mehrtens
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Edward Matijević @ 2019-06-17 5:26 UTC (permalink / raw)
To: hauke; +Cc: linux-mips
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.
I placed my change in board.c in that location because in OpenWRT it would be above the R6300 V1 in one of their patches.
Signed-off-by: Edward Matijevic <motolav@gmail.com>
---
arch/mips/bcm47xx/board.c | 1 +
arch/mips/bcm47xx/buttons.c | 10 ++++++++++
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
3 files changed, 12 insertions(+)
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -163,6 +163,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
{{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_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_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
@@ -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;
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
@@ -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,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: Add support for Netgear R6200 V1
2019-06-17 5:26 [PATCH] MIPS: BCM47XX: Add support for Netgear R6200 V1 Edward Matijević
@ 2019-06-17 20:45 ` Hauke Mehrtens
2019-06-19 23:09 ` Paul Burton
2019-07-26 5:15 ` Paul Burton
2 siblings, 0 replies; 4+ messages in thread
From: Hauke Mehrtens @ 2019-06-17 20:45 UTC (permalink / raw)
To: Edward Matijević; +Cc: linux-mips
On 6/17/19 7:26 AM, Edward Matijević wrote:
> 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.
>
> I placed my change in board.c in that location because in OpenWRT it would be above the R6300 V1 in one of their patches.
>
> Signed-off-by: Edward Matijevic <motolav@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
> arch/mips/bcm47xx/board.c | 1 +
> arch/mips/bcm47xx/buttons.c | 10 ++++++++++
> arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
> 3 files changed, 12 insertions(+)
>
> --- a/arch/mips/bcm47xx/board.c
> +++ b/arch/mips/bcm47xx/board.c
> @@ -163,6 +163,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
> {{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_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"},
Why not order this alphabetically?
> {{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
> @@ -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;
> --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
> +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
> @@ -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,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: Add support for Netgear R6200 V1
2019-06-17 5:26 [PATCH] MIPS: BCM47XX: Add support for Netgear R6200 V1 Edward Matijević
2019-06-17 20:45 ` Hauke Mehrtens
@ 2019-06-19 23:09 ` Paul Burton
2019-07-26 5:15 ` Paul Burton
2 siblings, 0 replies; 4+ messages in thread
From: Paul Burton @ 2019-06-19 23:09 UTC (permalink / raw)
To: Edward Matijević; +Cc: hauke, linux-mips
Hi Edward,
On Mon, Jun 17, 2019 at 12:26:46AM -0500, Edward Matijević wrote:
> 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.
>
> I placed my change in board.c in that location because in OpenWRT it would be above the R6300 V1 in one of their patches.
>
> Signed-off-by: Edward Matijevic <motolav@gmail.com>
> ---
> arch/mips/bcm47xx/board.c | 1 +
> arch/mips/bcm47xx/buttons.c | 10 ++++++++++
> arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
> 3 files changed, 12 insertions(+)
Thanks for the patch - unfortunately it doesn't apply cleanly - I
suspect your email client messed it up somehow:
$ wget -O - https://patchwork.kernel.org/patch/10997983/mbox/ | git am
--2019-06-19 16:06:54-- https://patchwork.kernel.org/patch/10997983/mbox/
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving patchwork.kernel.org (patchwork.kernel.org)... 198.145.29.83
Connecting to patchwork.kernel.org (patchwork.kernel.org)|198.145.29.83|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7834 (7.7K) [text/plain]
Saving to: ‘STDOUT’
- 100%[==============================================================>] 7.65K --.-KB/s in 0s
2019-06-19 16:06:54 (156 MB/s) - written to stdout [7834/7834]
Applying: MIPS: BCM47XX: Add support for Netgear R6200 V1
error: corrupt patch at line 10
Patch failed at 0001 MIPS: BCM47XX: Add support for Netgear R6200 V1
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
I do see that in the below tabs have been replaced with spaces, not sure
what else may have been munged.
Could you take a look at your email setup & resubmit?
Thanks,
Paul
> --- a/arch/mips/bcm47xx/board.c
> +++ b/arch/mips/bcm47xx/board.c
> @@ -163,6 +163,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
> {{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_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_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
> @@ -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;
> --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
> +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
> @@ -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,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: Add support for Netgear R6200 V1
2019-06-17 5:26 [PATCH] MIPS: BCM47XX: Add support for Netgear R6200 V1 Edward Matijević
2019-06-17 20:45 ` Hauke Mehrtens
2019-06-19 23:09 ` Paul Burton
@ 2019-07-26 5:15 ` Paul Burton
2 siblings, 0 replies; 4+ messages in thread
From: Paul Burton @ 2019-07-26 5:15 UTC (permalink / raw)
To: Edward Matijević; +Cc: hauke, linux-mips, linux-mips
Hello,
Edward Matijević wrote:
> 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.
>
> I placed my change in board.c in that location because in OpenWRT it would be above the R6300 V1 in one of their patches.
>
> Signed-off-by: Edward Matijevic <motolav@gmail.com>
> Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Applied to mips-next.
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email paul.burton@mips.com to report it. ]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-26 5:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 5:26 [PATCH] MIPS: BCM47XX: Add support for Netgear R6200 V1 Edward Matijević
2019-06-17 20:45 ` Hauke Mehrtens
2019-06-19 23:09 ` Paul Burton
2019-07-26 5:15 ` Paul Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).