031-07-MIPS-BCM47XX-Support-Luxul-XWR-1750-board.patch 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. From 981de3c2f27af27fa4c5c952d122b35ee573ab7a Mon Sep 17 00:00:00 2001
  2. From: Dan Haab <dhaab@luxul.com>
  3. Date: Wed, 22 Apr 2015 13:58:33 -0600
  4. Subject: [PATCH] MIPS: BCM47XX: Support Luxul XWR-1750 board
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Signed-off-by: Dan Haab <dhaab@luxul.com>
  9. Acked-by: Rafał Miłecki <zajec5@gmail.com>
  10. Cc: linux-mips@linux-mips.org
  11. Cc: Hauke Mehrtens <hauke@hauke-m.de>
  12. Cc: Dan Haab <dhaab@luxul.com>
  13. Patchwork: https://patchwork.linux-mips.org/patch/9831/
  14. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  15. ---
  16. arch/mips/bcm47xx/board.c | 1 +
  17. arch/mips/bcm47xx/buttons.c | 11 +++++++++++
  18. arch/mips/bcm47xx/leds.c | 14 ++++++++++++++
  19. arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++
  20. 4 files changed, 28 insertions(+)
  21. --- a/arch/mips/bcm47xx/board.c
  22. +++ b/arch/mips/bcm47xx/board.c
  23. @@ -149,6 +149,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
  24. /* board_id */
  25. static const
  26. struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
  27. + {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
  28. {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
  29. {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
  30. {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
  31. --- a/arch/mips/bcm47xx/buttons.c
  32. +++ b/arch/mips/bcm47xx/buttons.c
  33. @@ -299,6 +299,13 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __in
  34. BCM47XX_GPIO_KEY(6, KEY_RESTART),
  35. };
  36. +/* Luxul */
  37. +
  38. +static const struct gpio_keys_button
  39. +bcm47xx_buttons_luxul_xwr_1750_v1[] = {
  40. + BCM47XX_GPIO_KEY(14, BTN_TASK),
  41. +};
  42. +
  43. /* Microsoft */
  44. static const struct gpio_keys_button
  45. @@ -555,6 +562,10 @@ int __init bcm47xx_buttons_register(void
  46. err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
  47. break;
  48. + case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
  49. + err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1);
  50. + break;
  51. +
  52. case BCM47XX_BOARD_MICROSOFT_MN700:
  53. err = bcm47xx_copy_bdata(bcm47xx_buttons_microsoft_nm700);
  54. break;
  55. --- a/arch/mips/bcm47xx/leds.c
  56. +++ b/arch/mips/bcm47xx/leds.c
  57. @@ -370,6 +370,16 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initc
  58. BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
  59. };
  60. +/* Luxul */
  61. +
  62. +static const struct gpio_led
  63. +bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
  64. + BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
  65. + BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
  66. + BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 0, "timer"),
  67. + BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
  68. +};
  69. +
  70. /* Microsoft */
  71. static const struct gpio_led
  72. @@ -623,6 +633,10 @@ void __init bcm47xx_leds_register(void)
  73. bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
  74. break;
  75. + case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
  76. + bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
  77. + break;
  78. +
  79. case BCM47XX_BOARD_MICROSOFT_MN700:
  80. bcm47xx_set_pdata(bcm47xx_leds_microsoft_nm700);
  81. break;
  82. --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  83. +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  84. @@ -80,6 +80,8 @@ enum bcm47xx_board {
  85. BCM47XX_BOARD_LINKSYS_WRT610NV2,
  86. BCM47XX_BOARD_LINKSYS_WRTSL54GS,
  87. + BCM47XX_BOARD_LUXUL_XWR_1750_V1,
  88. +
  89. BCM47XX_BOARD_MICROSOFT_MN700,
  90. BCM47XX_BOARD_MOTOROLA_WE800G,