320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. --- a/arch/mips/bcm47xx/board.c
  2. +++ b/arch/mips/bcm47xx/board.c
  3. @@ -140,6 +140,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
  4. {{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
  5. {{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
  6. {{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
  7. + {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
  8. {{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
  9. {{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
  10. {{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
  11. @@ -150,9 +151,12 @@ struct bcm47xx_board_type_list2 bcm47xx_
  12. static const
  13. struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
  14. {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
  15. + {{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
  16. {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
  17. {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
  18. {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
  19. + {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
  20. + {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
  21. {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
  22. {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
  23. {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
  24. @@ -162,6 +166,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
  25. {{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR"},
  26. {{BCM47XX_BOARD_NETGEAR_WNDR4500V1, "Netgear WNDR4500 V1"}, "U12H189T00_NETGEAR"},
  27. {{BCM47XX_BOARD_NETGEAR_WNDR4500V2, "Netgear WNDR4500 V2"}, "U12H224T00_NETGEAR"},
  28. + {{BCM47XX_BOARD_NETGEAR_WNR1000_V3, "Netgear WNR1000 V3"}, "U12H139T50_NETGEAR"},
  29. {{BCM47XX_BOARD_NETGEAR_WNR2000, "Netgear WNR2000"}, "U12H114T00_NETGEAR"},
  30. {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "U12H136T99_NETGEAR"},
  31. {{BCM47XX_BOARD_NETGEAR_WNR3500U, "Netgear WNR3500U"}, "U12H136T00_NETGEAR"},
  32. --- a/arch/mips/bcm47xx/buttons.c
  33. +++ b/arch/mips/bcm47xx/buttons.c
  34. @@ -20,6 +20,12 @@
  35. /* Asus */
  36. static const struct gpio_keys_button
  37. +bcm47xx_buttons_asus_rtn10u[] __initconst = {
  38. + BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
  39. + BCM47XX_GPIO_KEY(21, KEY_RESTART),
  40. +};
  41. +
  42. +static const struct gpio_keys_button
  43. bcm47xx_buttons_asus_rtn12[] __initconst = {
  44. BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
  45. BCM47XX_GPIO_KEY(1, KEY_RESTART),
  46. @@ -270,6 +276,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
  47. };
  48. static const struct gpio_keys_button
  49. +bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
  50. + BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
  51. + BCM47XX_GPIO_KEY(6, KEY_RESTART),
  52. +};
  53. +
  54. +static const struct gpio_keys_button
  55. +bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
  56. + BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
  57. + BCM47XX_GPIO_KEY(8, KEY_RESTART),
  58. +};
  59. +
  60. +static const struct gpio_keys_button
  61. bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
  62. BCM47XX_GPIO_KEY(5, KEY_WIMAX),
  63. BCM47XX_GPIO_KEY(6, KEY_RESTART),
  64. @@ -333,6 +351,17 @@ bcm47xx_buttons_motorola_wr850gv2v3[] __
  65. /* Netgear */
  66. static const struct gpio_keys_button
  67. +bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
  68. + BCM47XX_GPIO_KEY(6, KEY_RESTART),
  69. +};
  70. +
  71. +static const struct gpio_keys_button
  72. +bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
  73. + BCM47XX_GPIO_KEY(12, KEY_RESTART),
  74. + BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
  75. +};
  76. +
  77. +static const struct gpio_keys_button
  78. bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
  79. BCM47XX_GPIO_KEY(4, KEY_RESTART),
  80. BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
  81. @@ -360,6 +389,11 @@ bcm47xx_buttons_netgear_wndr4500v1[] __i
  82. };
  83. static const struct gpio_keys_button
  84. +bcm47xx_buttons_netgear_wnr1000_v3[] __initconst = {
  85. + BCM47XX_GPIO_KEY(3, KEY_RESTART),
  86. +};
  87. +
  88. +static const struct gpio_keys_button
  89. bcm47xx_buttons_netgear_wnr3500lv1[] __initconst = {
  90. BCM47XX_GPIO_KEY(4, KEY_RESTART),
  91. BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
  92. @@ -413,6 +447,9 @@ int __init bcm47xx_buttons_register(void
  93. int err;
  94. switch (board) {
  95. + case BCM47XX_BOARD_ASUS_RTN10U:
  96. + err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
  97. + break;
  98. case BCM47XX_BOARD_ASUS_RTN12:
  99. err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
  100. break;
  101. @@ -543,6 +580,12 @@ int __init bcm47xx_buttons_register(void
  102. case BCM47XX_BOARD_LINKSYS_WRT310NV1:
  103. err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
  104. break;
  105. + case BCM47XX_BOARD_LINKSYS_WRT310NV2:
  106. + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
  107. + break;
  108. + case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
  109. + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
  110. + break;
  111. case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
  112. err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
  113. break;
  114. @@ -579,6 +622,12 @@ int __init bcm47xx_buttons_register(void
  115. err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gv2v3);
  116. break;
  117. + case BCM47XX_BOARD_NETGEAR_R6300_V1:
  118. + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
  119. + break;
  120. + case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
  121. + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
  122. + break;
  123. case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
  124. err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
  125. break;
  126. @@ -591,6 +640,9 @@ int __init bcm47xx_buttons_register(void
  127. case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
  128. err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1);
  129. break;
  130. + case BCM47XX_BOARD_NETGEAR_WNR1000_V3:
  131. + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr1000_v3);
  132. + break;
  133. case BCM47XX_BOARD_NETGEAR_WNR3500L:
  134. err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
  135. break;
  136. --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  137. +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  138. @@ -71,6 +71,7 @@ enum bcm47xx_board {
  139. BCM47XX_BOARD_LINKSYS_WRT300NV11,
  140. BCM47XX_BOARD_LINKSYS_WRT310NV1,
  141. BCM47XX_BOARD_LINKSYS_WRT310NV2,
  142. + BCM47XX_BOARD_LINKSYS_WRT320N_V1,
  143. BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
  144. BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
  145. BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
  146. @@ -88,9 +89,12 @@ enum bcm47xx_board {
  147. BCM47XX_BOARD_MOTOROLA_WR850GP,
  148. BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
  149. + BCM47XX_BOARD_NETGEAR_R6300_V1,
  150. BCM47XX_BOARD_NETGEAR_WGR614V8,
  151. BCM47XX_BOARD_NETGEAR_WGR614V9,
  152. BCM47XX_BOARD_NETGEAR_WGR614_V10,
  153. + BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
  154. + BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
  155. BCM47XX_BOARD_NETGEAR_WNDR3300,
  156. BCM47XX_BOARD_NETGEAR_WNDR3400V1,
  157. BCM47XX_BOARD_NETGEAR_WNDR3400V2,
  158. @@ -100,6 +104,7 @@ enum bcm47xx_board {
  159. BCM47XX_BOARD_NETGEAR_WNDR4000,
  160. BCM47XX_BOARD_NETGEAR_WNDR4500V1,
  161. BCM47XX_BOARD_NETGEAR_WNDR4500V2,
  162. + BCM47XX_BOARD_NETGEAR_WNR1000_V3,
  163. BCM47XX_BOARD_NETGEAR_WNR2000,
  164. BCM47XX_BOARD_NETGEAR_WNR3500L,
  165. BCM47XX_BOARD_NETGEAR_WNR3500U,
  166. --- a/arch/mips/bcm47xx/leds.c
  167. +++ b/arch/mips/bcm47xx/leds.c
  168. @@ -29,6 +29,14 @@
  169. /* Asus */
  170. static const struct gpio_led
  171. +bcm47xx_leds_asus_rtn10u[] __initconst = {
  172. + BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
  173. + BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
  174. + BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
  175. + BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
  176. +};
  177. +
  178. +static const struct gpio_led
  179. bcm47xx_leds_asus_rtn12[] __initconst = {
  180. BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
  181. BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
  182. @@ -313,6 +321,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
  183. };
  184. static const struct gpio_led
  185. +bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
  186. + BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
  187. + BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
  188. + BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
  189. +};
  190. +
  191. +static const struct gpio_led
  192. bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
  193. BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
  194. BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
  195. @@ -478,6 +493,9 @@ void __init bcm47xx_leds_register(void)
  196. enum bcm47xx_board board = bcm47xx_board_get();
  197. switch (board) {
  198. + case BCM47XX_BOARD_ASUS_RTN10U:
  199. + bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
  200. + break;
  201. case BCM47XX_BOARD_ASUS_RTN12:
  202. bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
  203. break;
  204. @@ -611,6 +629,9 @@ void __init bcm47xx_leds_register(void)
  205. case BCM47XX_BOARD_LINKSYS_WRT310NV1:
  206. bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
  207. break;
  208. + case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
  209. + bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
  210. + break;
  211. case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
  212. bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
  213. break;