Skip to content

Commit 3829e4f

Browse files
ffainellitsbogend
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent eea175e commit 3829e4f

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

arch/mips/bcm47xx/board.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = {
141141
{{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
142142
{{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
143143
{{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
144+
{{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
144145
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
145146
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
146147
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},

arch/mips/bcm47xx/buttons.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,12 @@ bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
282282
BCM47XX_GPIO_KEY(6, KEY_RESTART),
283283
};
284284

285+
static const struct gpio_keys_button
286+
bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
287+
BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
288+
BCM47XX_GPIO_KEY(8, KEY_RESTART),
289+
};
290+
285291
static const struct gpio_keys_button
286292
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
287293
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void)
617623
case BCM47XX_BOARD_LINKSYS_WRT310NV2:
618624
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
619625
break;
626+
case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
627+
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
628+
break;
620629
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
621630
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
622631
break;

arch/mips/bcm47xx/leds.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
313313
BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
314314
};
315315

316+
static const struct gpio_led
317+
bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
318+
BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
319+
BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
320+
BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
321+
};
322+
316323
static const struct gpio_led
317324
bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
318325
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
@@ -689,6 +696,9 @@ void __init bcm47xx_leds_register(void)
689696
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
690697
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
691698
break;
699+
case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
700+
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
701+
break;
692702
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
693703
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
694704
break;

arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ enum bcm47xx_board {
7272
BCM47XX_BOARD_LINKSYS_WRT300NV11,
7373
BCM47XX_BOARD_LINKSYS_WRT310NV1,
7474
BCM47XX_BOARD_LINKSYS_WRT310NV2,
75+
BCM47XX_BOARD_LINKSYS_WRT320N_V1,
7576
BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
7677
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
7778
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,

0 commit comments

Comments
 (0)