150-alice_gate2_leds.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
  2. +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
  3. @@ -573,6 +573,93 @@ static struct board_info __initdata boar
  4. .has_ohci0 = 1,
  5. .has_ehci0 = 1,
  6. +
  7. + .leds = {
  8. + /*Each led on alice gate is bi-color */
  9. + {
  10. + .name = "power:red",
  11. + .gpio = 5,
  12. + .active_low = 1,
  13. + },
  14. + {
  15. + .name = "power:green",
  16. + .gpio = 4,
  17. + .active_low = 1,
  18. + .default_trigger = "default-on",
  19. + },
  20. + {
  21. + .name = "service:red",
  22. + .gpio = 7,
  23. + .active_low = 1,
  24. + },
  25. + {
  26. + .name = "service:green",
  27. + .gpio = 6,
  28. + .active_low = 1,
  29. + },
  30. + {
  31. + .name = "adsl:red",
  32. + .gpio = 9,
  33. + .active_low = 1,
  34. + },
  35. + {
  36. + .name = "adsl:green",
  37. + .gpio = 10,
  38. + .active_low = 1,
  39. + },
  40. + {
  41. + .name = "wifi:red",
  42. + .gpio = 23,
  43. + .active_low = 1,
  44. + },
  45. + {
  46. + .name = "wifi:green",
  47. + .gpio = 22,
  48. + .active_low = 1,
  49. + },
  50. + {
  51. + .name = "internet:red",
  52. + .gpio = 25,
  53. + .active_low = 1,
  54. + },
  55. + {
  56. + .name = "internet:green",
  57. + .gpio = 24,
  58. + .active_low = 1,
  59. + },
  60. + {
  61. + .name = "usr1:red",
  62. + .gpio = 27,
  63. + .active_low = 1,
  64. + },
  65. + {
  66. + .name = "usr1:green",
  67. + .gpio = 26,
  68. + .active_low = 1,
  69. + },
  70. + {
  71. + .name = "usr2:red",
  72. + .gpio = 30,
  73. + .active_low = 1,
  74. + },
  75. + {
  76. + .name = "usr2:green",
  77. + .gpio = 29,
  78. + .active_low = 1,
  79. + },
  80. + },
  81. +
  82. + .buttons = {
  83. + {
  84. + .desc = "sw2",
  85. + .gpio = 37,
  86. + .active_low = 1,
  87. + .type = EV_KEY,
  88. + .code = KEY_RESTART,
  89. + .threshold = 3,
  90. + },
  91. + },
  92. + /* sw1 is connected to gpio34*/
  93. };
  94. static struct board_info __initdata board_DWVS0 = {
  95. --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  96. +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  97. @@ -54,7 +54,7 @@ struct board_info {
  98. struct bcm63xx_dsp_platform_data dsp;
  99. /* GPIO LEDs */
  100. - struct gpio_led leds[5];
  101. + struct gpio_led leds[14];
  102. /* Buttons */
  103. struct gpio_button buttons[2];