summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorDan Haab <dhaab@luxul.com>2017-01-23 14:50:38 -0500
committerRalf Baechle <ralf@linux-mips.org>2017-01-24 20:51:12 -0500
commite7093053f7a5ab91241e41df273f0e34552a3a22 (patch)
treef459a279587eb2f7c41c0513e9cab184a0af7ff2 /arch/mips
parentc9d3fdf3372d06690fd5cbc1ac5beabe52927382 (diff)
MIPS: BCM47XX: Add Luxul devices to the database
So far only Luxul XWR-1750 router was supported. This adds a set of other Luxul devices based on BCM47XX. It's a standard support for LEDs and buttons. Signed-off-by: Dan Haab <dhaab@luxul.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Rafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15106/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/bcm47xx/board.c9
-rw-r--r--arch/mips/bcm47xx/buttons.c72
-rw-r--r--arch/mips/bcm47xx/leds.c81
-rw-r--r--arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h9
4 files changed, 171 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
index a88975a55c4d..8cbe60cc51d4 100644
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -149,6 +149,15 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = {
149/* board_id */ 149/* board_id */
150static const 150static const
151struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = { 151struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
152 {{BCM47XX_BOARD_LUXUL_ABR_4400_V1, "Luxul ABR-4400 V1"}, "luxul_abr4400_v1"},
153 {{BCM47XX_BOARD_LUXUL_XAP_310_V1, "Luxul XAP-310 V1"}, "luxul_xap310_v1"},
154 {{BCM47XX_BOARD_LUXUL_XAP_1210_V1, "Luxul XAP-1210 V1"}, "luxul_xap1210_v1"},
155 {{BCM47XX_BOARD_LUXUL_XAP_1230_V1, "Luxul XAP-1230 V1"}, "luxul_xap1230_v1"},
156 {{BCM47XX_BOARD_LUXUL_XAP_1240_V1, "Luxul XAP-1240 V1"}, "luxul_xap1240_v1"},
157 {{BCM47XX_BOARD_LUXUL_XAP_1500_V1, "Luxul XAP-1500 V1"}, "luxul_xap1500_v1"},
158 {{BCM47XX_BOARD_LUXUL_XBR_4400_V1, "Luxul XBR-4400 V1"}, "luxul_xbr4400_v1"},
159 {{BCM47XX_BOARD_LUXUL_XVW_P30_V1, "Luxul XVW-P30 V1"}, "luxul_xvwp30_v1"},
160 {{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
152 {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"}, 161 {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
153 {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"}, 162 {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
154 {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"}, 163 {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c
index 52caa75bfe4e..7d582275908c 100644
--- a/arch/mips/bcm47xx/buttons.c
+++ b/arch/mips/bcm47xx/buttons.c
@@ -302,6 +302,51 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = {
302/* Luxul */ 302/* Luxul */
303 303
304static const struct gpio_keys_button 304static const struct gpio_keys_button
305bcm47xx_buttons_luxul_abr_4400_v1[] = {
306 BCM47XX_GPIO_KEY(14, KEY_RESTART),
307};
308
309static const struct gpio_keys_button
310bcm47xx_buttons_luxul_xap_310_v1[] = {
311 BCM47XX_GPIO_KEY(20, KEY_RESTART),
312};
313
314static const struct gpio_keys_button
315bcm47xx_buttons_luxul_xap_1210_v1[] = {
316 BCM47XX_GPIO_KEY(8, KEY_RESTART),
317};
318
319static const struct gpio_keys_button
320bcm47xx_buttons_luxul_xap_1230_v1[] = {
321 BCM47XX_GPIO_KEY(8, KEY_RESTART),
322};
323
324static const struct gpio_keys_button
325bcm47xx_buttons_luxul_xap_1240_v1[] = {
326 BCM47XX_GPIO_KEY(8, KEY_RESTART),
327};
328
329static const struct gpio_keys_button
330bcm47xx_buttons_luxul_xap_1500_v1[] = {
331 BCM47XX_GPIO_KEY(14, KEY_RESTART),
332};
333
334static const struct gpio_keys_button
335bcm47xx_buttons_luxul_xbr_4400_v1[] = {
336 BCM47XX_GPIO_KEY(14, KEY_RESTART),
337};
338
339static const struct gpio_keys_button
340bcm47xx_buttons_luxul_xvw_p30_v1[] = {
341 BCM47XX_GPIO_KEY(20, KEY_RESTART),
342};
343
344static const struct gpio_keys_button
345bcm47xx_buttons_luxul_xwr_600_v1[] = {
346 BCM47XX_GPIO_KEY(8, KEY_RESTART),
347};
348
349static const struct gpio_keys_button
305bcm47xx_buttons_luxul_xwr_1750_v1[] = { 350bcm47xx_buttons_luxul_xwr_1750_v1[] = {
306 BCM47XX_GPIO_KEY(14, BTN_TASK), 351 BCM47XX_GPIO_KEY(14, BTN_TASK),
307}; 352};
@@ -561,6 +606,33 @@ int __init bcm47xx_buttons_register(void)
561 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs); 606 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
562 break; 607 break;
563 608
609 case BCM47XX_BOARD_LUXUL_ABR_4400_V1:
610 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_abr_4400_v1);
611 break;
612 case BCM47XX_BOARD_LUXUL_XAP_310_V1:
613 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_310_v1);
614 break;
615 case BCM47XX_BOARD_LUXUL_XAP_1210_V1:
616 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1210_v1);
617 break;
618 case BCM47XX_BOARD_LUXUL_XAP_1230_V1:
619 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1230_v1);
620 break;
621 case BCM47XX_BOARD_LUXUL_XAP_1240_V1:
622 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1240_v1);
623 break;
624 case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
625 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1500_v1);
626 break;
627 case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
628 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xbr_4400_v1);
629 break;
630 case BCM47XX_BOARD_LUXUL_XVW_P30_V1:
631 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xvw_p30_v1);
632 break;
633 case BCM47XX_BOARD_LUXUL_XWR_600_V1:
634 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_600_v1);
635 break;
564 case BCM47XX_BOARD_LUXUL_XWR_1750_V1: 636 case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
565 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1); 637 err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1);
566 break; 638 break;
diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
index d20ae63eb3c2..a35f1d5cde9f 100644
--- a/arch/mips/bcm47xx/leds.c
+++ b/arch/mips/bcm47xx/leds.c
@@ -373,6 +373,60 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
373/* Luxul */ 373/* Luxul */
374 374
375static const struct gpio_led 375static const struct gpio_led
376bcm47xx_leds_luxul_abr_4400_v1[] __initconst = {
377 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
378 BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
379};
380
381static const struct gpio_led
382bcm47xx_leds_luxul_xap_310_v1[] __initconst = {
383 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
384};
385
386static const struct gpio_led
387bcm47xx_leds_luxul_xap_1210_v1[] __initconst = {
388 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
389};
390
391static const struct gpio_led
392bcm47xx_leds_luxul_xap_1230_v1[] __initconst = {
393 BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
394 BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
395 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
396};
397
398static const struct gpio_led
399bcm47xx_leds_luxul_xap_1240_v1[] __initconst = {
400 BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
401 BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
402 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
403};
404
405static const struct gpio_led
406bcm47xx_leds_luxul_xap_1500_v1[] __initconst = {
407 BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 1, "timer"),
408};
409
410static const struct gpio_led
411bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = {
412 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
413 BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
414};
415
416static const struct gpio_led
417bcm47xx_leds_luxul_xvw_p30_v1[] __initconst = {
418 BCM47XX_GPIO_LED_TRIGGER(0, "blue", "status", 1, "timer"),
419 BCM47XX_GPIO_LED(1, "green", "link", 1, LEDS_GPIO_DEFSTATE_OFF),
420};
421
422static const struct gpio_led
423bcm47xx_leds_luxul_xwr_600_v1[] __initconst = {
424 BCM47XX_GPIO_LED(3, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
425 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
426 BCM47XX_GPIO_LED(9, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
427};
428
429static const struct gpio_led
376bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = { 430bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
377 BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 431 BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
378 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 432 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
@@ -633,6 +687,33 @@ void __init bcm47xx_leds_register(void)
633 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs); 687 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
634 break; 688 break;
635 689
690 case BCM47XX_BOARD_LUXUL_ABR_4400_V1:
691 bcm47xx_set_pdata(bcm47xx_leds_luxul_abr_4400_v1);
692 break;
693 case BCM47XX_BOARD_LUXUL_XAP_310_V1:
694 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_310_v1);
695 break;
696 case BCM47XX_BOARD_LUXUL_XAP_1210_V1:
697 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1210_v1);
698 break;
699 case BCM47XX_BOARD_LUXUL_XAP_1230_V1:
700 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1230_v1);
701 break;
702 case BCM47XX_BOARD_LUXUL_XAP_1240_V1:
703 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1240_v1);
704 break;
705 case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
706 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1);
707 break;
708 case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
709 bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1);
710 break;
711 case BCM47XX_BOARD_LUXUL_XVW_P30_V1:
712 bcm47xx_set_pdata(bcm47xx_leds_luxul_xvw_p30_v1);
713 break;
714 case BCM47XX_BOARD_LUXUL_XWR_600_V1:
715 bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_600_v1);
716 break;
636 case BCM47XX_BOARD_LUXUL_XWR_1750_V1: 717 case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
637 bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1); 718 bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
638 break; 719 break;
diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
index 2afb84072ad0..ee3d4fe515a0 100644
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
@@ -80,6 +80,15 @@ enum bcm47xx_board {
80 BCM47XX_BOARD_LINKSYS_WRT610NV2, 80 BCM47XX_BOARD_LINKSYS_WRT610NV2,
81 BCM47XX_BOARD_LINKSYS_WRTSL54GS, 81 BCM47XX_BOARD_LINKSYS_WRTSL54GS,
82 82
83 BCM47XX_BOARD_LUXUL_ABR_4400_V1,
84 BCM47XX_BOARD_LUXUL_XAP_310_V1,
85 BCM47XX_BOARD_LUXUL_XAP_1210_V1,
86 BCM47XX_BOARD_LUXUL_XAP_1230_V1,
87 BCM47XX_BOARD_LUXUL_XAP_1240_V1,
88 BCM47XX_BOARD_LUXUL_XAP_1500_V1,
89 BCM47XX_BOARD_LUXUL_XBR_4400_V1,
90 BCM47XX_BOARD_LUXUL_XVW_P30_V1,
91 BCM47XX_BOARD_LUXUL_XWR_600_V1,
83 BCM47XX_BOARD_LUXUL_XWR_1750_V1, 92 BCM47XX_BOARD_LUXUL_XWR_1750_V1,
84 93
85 BCM47XX_BOARD_MICROSOFT_MN700, 94 BCM47XX_BOARD_MICROSOFT_MN700,