031-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. From 160f14312b0b7d35759535b1f60be79247b263c4 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  3. Date: Wed, 1 Apr 2015 18:18:02 +0200
  4. Subject: [PATCH] MIPS: BCM47xx: Devices database update for 4.1 (or 4.2?)
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  9. Cc: linux-mips@linux-mips.org
  10. Cc: Hauke Mehrtens <hauke@hauke-m.de>
  11. Patchwork: https://patchwork.linux-mips.org/patch/9656/
  12. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  13. ---
  14. arch/mips/bcm47xx/board.c | 4 ++++
  15. arch/mips/bcm47xx/buttons.c | 18 ++++++++++++++++++
  16. arch/mips/bcm47xx/leds.c | 10 ++++++++++
  17. arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 4 ++++
  18. 4 files changed, 36 insertions(+)
  19. --- a/arch/mips/bcm47xx/board.c
  20. +++ b/arch/mips/bcm47xx/board.c
  21. @@ -151,9 +151,11 @@ static const
  22. struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
  23. {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
  24. {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
  25. + {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
  26. {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
  27. {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
  28. {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
  29. + {{BCM47XX_BOARD_NETGEAR_WNDR3400_V3, "Netgear WNDR3400 V3"}, "U12H208T00_NETGEAR"},
  30. {{BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, "Netgear WNDR3400 Vcna"}, "U12H155T01_NETGEAR"},
  31. {{BCM47XX_BOARD_NETGEAR_WNDR3700V3, "Netgear WNDR3700 V3"}, "U12H194T00_NETGEAR"},
  32. {{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR"},
  33. @@ -196,6 +198,8 @@ struct bcm47xx_board_type_list2 bcm47xx_
  34. static const
  35. struct bcm47xx_board_type_list2 bcm47xx_board_list_key_value[] __initconst = {
  36. {{BCM47XX_BOARD_ASUS_WL700GE, "Asus WL700"}, "model_no", "WL700"},
  37. + {{BCM47XX_BOARD_LINKSYS_WRT300N_V1, "Linksys WRT300N V1"}, "router_name", "WRT300N"},
  38. + {{BCM47XX_BOARD_LINKSYS_WRT600N_V11, "Linksys WRT600N V1.1"}, "Model_Name", "WRT600N"},
  39. {{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "machine_name", "WRTSL54GS"},
  40. { {0}, NULL},
  41. };
  42. --- a/arch/mips/bcm47xx/buttons.c
  43. +++ b/arch/mips/bcm47xx/buttons.c
  44. @@ -252,6 +252,12 @@ bcm47xx_buttons_linksys_wrt160nv3[] __in
  45. };
  46. static const struct gpio_keys_button
  47. +bcm47xx_buttons_linksys_wrt300n_v1[] __initconst = {
  48. + BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
  49. + BCM47XX_GPIO_KEY(6, KEY_RESTART),
  50. +};
  51. +
  52. +static const struct gpio_keys_button
  53. bcm47xx_buttons_linksys_wrt300nv11[] __initconst = {
  54. BCM47XX_GPIO_KEY(4, KEY_UNKNOWN),
  55. BCM47XX_GPIO_KEY(6, KEY_RESTART),
  56. @@ -327,6 +333,12 @@ bcm47xx_buttons_netgear_wndr3400v1[] __i
  57. };
  58. static const struct gpio_keys_button
  59. +bcm47xx_buttons_netgear_wndr3400_v3[] __initconst = {
  60. + BCM47XX_GPIO_KEY(12, KEY_RESTART),
  61. + BCM47XX_GPIO_KEY(23, KEY_WPS_BUTTON),
  62. +};
  63. +
  64. +static const struct gpio_keys_button
  65. bcm47xx_buttons_netgear_wndr3700v3[] __initconst = {
  66. BCM47XX_GPIO_KEY(2, KEY_RFKILL),
  67. BCM47XX_GPIO_KEY(3, KEY_RESTART),
  68. @@ -516,6 +528,9 @@ int __init bcm47xx_buttons_register(void
  69. case BCM47XX_BOARD_LINKSYS_WRT160NV3:
  70. err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv3);
  71. break;
  72. + case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
  73. + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300n_v1);
  74. + break;
  75. case BCM47XX_BOARD_LINKSYS_WRT300NV11:
  76. err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300nv11);
  77. break;
  78. @@ -557,6 +572,9 @@ int __init bcm47xx_buttons_register(void
  79. case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
  80. err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
  81. break;
  82. + case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
  83. + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400_v3);
  84. + break;
  85. case BCM47XX_BOARD_NETGEAR_WNDR3700V3:
  86. err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3);
  87. break;
  88. --- a/arch/mips/bcm47xx/leds.c
  89. +++ b/arch/mips/bcm47xx/leds.c
  90. @@ -292,6 +292,13 @@ bcm47xx_leds_linksys_wrt160nv3[] __initc
  91. };
  92. static const struct gpio_led
  93. +bcm47xx_leds_linksys_wrt300n_v1[] __initconst = {
  94. + BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
  95. + BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
  96. + BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
  97. +};
  98. +
  99. +static const struct gpio_led
  100. bcm47xx_leds_linksys_wrt300nv11[] __initconst = {
  101. BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
  102. BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
  103. @@ -585,6 +592,9 @@ void __init bcm47xx_leds_register(void)
  104. case BCM47XX_BOARD_LINKSYS_WRT160NV3:
  105. bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3);
  106. break;
  107. + case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
  108. + bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300n_v1);
  109. + break;
  110. case BCM47XX_BOARD_LINKSYS_WRT300NV11:
  111. bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11);
  112. break;
  113. --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  114. +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  115. @@ -67,6 +67,7 @@ enum bcm47xx_board {
  116. BCM47XX_BOARD_LINKSYS_WRT150NV11,
  117. BCM47XX_BOARD_LINKSYS_WRT160NV1,
  118. BCM47XX_BOARD_LINKSYS_WRT160NV3,
  119. + BCM47XX_BOARD_LINKSYS_WRT300N_V1,
  120. BCM47XX_BOARD_LINKSYS_WRT300NV11,
  121. BCM47XX_BOARD_LINKSYS_WRT310NV1,
  122. BCM47XX_BOARD_LINKSYS_WRT310NV2,
  123. @@ -74,6 +75,7 @@ enum bcm47xx_board {
  124. BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
  125. BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
  126. BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708,
  127. + BCM47XX_BOARD_LINKSYS_WRT600N_V11,
  128. BCM47XX_BOARD_LINKSYS_WRT610NV1,
  129. BCM47XX_BOARD_LINKSYS_WRT610NV2,
  130. BCM47XX_BOARD_LINKSYS_WRTSL54GS,
  131. @@ -86,9 +88,11 @@ enum bcm47xx_board {
  132. BCM47XX_BOARD_NETGEAR_WGR614V8,
  133. BCM47XX_BOARD_NETGEAR_WGR614V9,
  134. + BCM47XX_BOARD_NETGEAR_WGR614_V10,
  135. BCM47XX_BOARD_NETGEAR_WNDR3300,
  136. BCM47XX_BOARD_NETGEAR_WNDR3400V1,
  137. BCM47XX_BOARD_NETGEAR_WNDR3400V2,
  138. + BCM47XX_BOARD_NETGEAR_WNDR3400_V3,
  139. BCM47XX_BOARD_NETGEAR_WNDR3400VCNA,
  140. BCM47XX_BOARD_NETGEAR_WNDR3700V3,
  141. BCM47XX_BOARD_NETGEAR_WNDR4000,