Kconfig 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. menu "LED Support"
  2. config LED
  3. bool "Enable LED support"
  4. depends on DM
  5. help
  6. Many boards have LEDs which can be used to signal status or alerts.
  7. U-Boot provides a uclass API to implement this feature. LED drivers
  8. can provide access to board-specific LEDs. Use of the device tree
  9. for configuration is encouraged.
  10. config LED_BCM6328
  11. bool "LED Support for BCM6328"
  12. depends on LED && ARCH_BMIPS
  13. help
  14. This option enables support for LEDs connected to the BCM6328
  15. LED HW controller accessed via MMIO registers.
  16. HW blinking is supported and up to 24 LEDs can be controlled.
  17. All LEDs can blink at the same time but the delay is shared, which
  18. means that if one LED is set to blink at 100ms and then a different
  19. LED is set to blink at 200ms, both will blink at 200ms.
  20. config LED_BCM6358
  21. bool "LED Support for BCM6358"
  22. depends on LED && ARCH_BMIPS
  23. help
  24. This option enables support for LEDs connected to the BCM6358
  25. LED HW controller accessed via MMIO registers.
  26. HW has no blinking capabilities and up to 32 LEDs can be controlled.
  27. config LED_BCM6858
  28. bool "LED Support for BCM6858"
  29. depends on LED && ARCH_BCM6858
  30. help
  31. This option enables support for LEDs connected to the BCM6858
  32. HW has blinking capabilities and up to 32 LEDs can be controlled.
  33. config LED_BLINK
  34. bool "Support LED blinking"
  35. depends on LED
  36. help
  37. Some drivers can support automatic blinking of LEDs with a given
  38. period, without needing timers or extra code to handle the timing.
  39. This option enables support for this which adds slightly to the
  40. code size.
  41. config SPL_LED
  42. bool "Enable LED support in SPL"
  43. depends on SPL && SPL_DM
  44. help
  45. The LED subsystem adds a small amount of overhead to the image.
  46. If this is acceptable and you have a need to use LEDs in SPL,
  47. enable this option. You will need to enable device tree in SPL
  48. for this to work.
  49. config LED_GPIO
  50. bool "LED support for GPIO-connected LEDs"
  51. depends on LED && DM_GPIO
  52. help
  53. Enable support for LEDs which are connected to GPIO lines. These
  54. GPIOs may be on the SoC or some other device which provides GPIOs.
  55. The GPIO driver must used driver model. LEDs are configured using
  56. the device tree.
  57. config SPL_LED_GPIO
  58. bool "LED support for GPIO-connected LEDs in SPL"
  59. depends on SPL_LED && DM_GPIO
  60. help
  61. This option is an SPL-variant of the LED_GPIO option.
  62. See the help of LED_GPIO for details.
  63. config LED_STATUS
  64. bool "Enable status LED API"
  65. help
  66. Allows common u-boot commands to use a board's leds to
  67. provide status for activities like booting and downloading files.
  68. if LED_STATUS
  69. # Hidden constants
  70. config LED_STATUS_OFF
  71. int
  72. default 0
  73. config LED_STATUS_BLINKING
  74. int
  75. default 1
  76. config LED_STATUS_ON
  77. int
  78. default 2
  79. # Hidden constants end
  80. config LED_STATUS_GPIO
  81. bool "GPIO status LED implementation"
  82. help
  83. The status LED can be connected to a GPIO pin. In such cases, the
  84. gpio_led driver can be used as a status LED backend implementation.
  85. config LED_STATUS_BOARD_SPECIFIC
  86. bool "Specific board"
  87. default y
  88. help
  89. LED support is only for a specific board.
  90. comment "LEDs parameters"
  91. config LED_STATUS0
  92. bool "Enable status LED 0"
  93. if LED_STATUS0
  94. config LED_STATUS_BIT
  95. int "identification"
  96. help
  97. CONFIG_LED_STATUS_BIT is passed into the __led_* functions to identify
  98. which LED is being acted on. As such, the chosen value must be unique
  99. with respect to the other CONFIG_LED_STATUS_BIT's. Mapping the value
  100. to a physical LED is the responsibility of the __led_* function.
  101. config LED_STATUS_STATE
  102. int "initial state"
  103. range LED_STATUS_OFF LED_STATUS_ON
  104. default LED_STATUS_OFF
  105. help
  106. Should be set one of the following:
  107. 0 - off
  108. 1 - blinking
  109. 2 - on
  110. config LED_STATUS_FREQ
  111. int "blink frequency"
  112. range 2 10
  113. default 2
  114. help
  115. The LED blink period calculated from LED_STATUS_FREQ:
  116. LED_STATUS_PERIOD = CONFIG_SYS_HZ/LED_STATUS_FREQ
  117. Values range: 2 - 10
  118. endif # LED_STATUS0
  119. config LED_STATUS1
  120. bool "Enable status LED 1"
  121. if LED_STATUS1
  122. config LED_STATUS_BIT1
  123. int "identification"
  124. help
  125. CONFIG_LED_STATUS_BIT1 is passed into the __led_* functions to
  126. identify which LED is being acted on. As such, the chosen value must
  127. be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
  128. the value to a physical LED is the responsibility of the __led_*
  129. function.
  130. config LED_STATUS_STATE1
  131. int "initial state"
  132. range LED_STATUS_OFF LED_STATUS_ON
  133. default LED_STATUS_OFF
  134. help
  135. Should be set one of the following:
  136. 0 - off
  137. 1 - blinking
  138. 2 - on
  139. config LED_STATUS_FREQ1
  140. int "blink frequency"
  141. range 2 10
  142. default 2
  143. help
  144. The LED blink period calculated from LED_STATUS_FREQ1:
  145. LED_STATUS_PERIOD1 = CONFIG_SYS_HZ/LED_STATUS_FREQ1
  146. Values range: 2 - 10
  147. endif # LED_STATUS1
  148. config LED_STATUS2
  149. bool "Enable status LED 2"
  150. if LED_STATUS2
  151. config LED_STATUS_BIT2
  152. int "identification"
  153. help
  154. CONFIG_LED_STATUS_BIT2 is passed into the __led_* functions to
  155. identify which LED is being acted on. As such, the chosen value must
  156. be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
  157. the value to a physical LED is the responsibility of the __led_*
  158. function.
  159. config LED_STATUS_STATE2
  160. int "initial state"
  161. range LED_STATUS_OFF LED_STATUS_ON
  162. default LED_STATUS_OFF
  163. help
  164. Should be set one of the following:
  165. 0 - off
  166. 1 - blinking
  167. 2 - on
  168. config LED_STATUS_FREQ2
  169. int "blink frequency"
  170. range 2 10
  171. default 2
  172. help
  173. The LED blink period calculated from LED_STATUS_FREQ2:
  174. LED_STATUS_PERIOD2 = CONFIG_SYS_HZ/LED_STATUS_FREQ2
  175. Values range: 2 - 10
  176. endif # LED_STATUS2
  177. config LED_STATUS3
  178. bool "Enable status LED 3"
  179. if LED_STATUS3
  180. config LED_STATUS_BIT3
  181. int "identification"
  182. help
  183. CONFIG_LED_STATUS_BIT3 is passed into the __led_* functions to
  184. identify which LED is being acted on. As such, the chosen value must
  185. be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
  186. the value to a physical LED is the responsibility of the __led_*
  187. function.
  188. config LED_STATUS_STATE3
  189. int "initial state"
  190. range LED_STATUS_OFF LED_STATUS_ON
  191. default LED_STATUS_OFF
  192. help
  193. Should be set one of the following:
  194. 0 - off
  195. 1 - blinking
  196. 2 - on
  197. config LED_STATUS_FREQ3
  198. int "blink frequency"
  199. range 2 10
  200. default 2
  201. help
  202. The LED blink period calculated from LED_STATUS_FREQ3:
  203. LED_STATUS_PERIOD3 = CONFIG_SYS_HZ/LED_STATUS_FREQ3
  204. Values range: 2 - 10
  205. endif # LED_STATUS3
  206. config LED_STATUS4
  207. bool "Enable status LED 4"
  208. if LED_STATUS4
  209. config LED_STATUS_BIT4
  210. int "identification"
  211. help
  212. CONFIG_LED_STATUS_BIT4 is passed into the __led_* functions to
  213. identify which LED is being acted on. As such, the chosen value must
  214. be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
  215. the value to a physical LED is the responsibility of the __led_*
  216. function.
  217. config LED_STATUS_STATE4
  218. int "initial state"
  219. range LED_STATUS_OFF LED_STATUS_ON
  220. default LED_STATUS_OFF
  221. help
  222. Should be set one of the following:
  223. 0 - off
  224. 1 - blinking
  225. 2 - on
  226. config LED_STATUS_FREQ4
  227. int "blink frequency"
  228. range 2 10
  229. default 2
  230. help
  231. The LED blink period calculated from LED_STATUS_FREQ4:
  232. LED_STATUS_PERIOD4 = CONFIG_SYS_HZ/LED_STATUS_FREQ4
  233. Values range: 2 - 10
  234. endif # LED_STATUS4
  235. config LED_STATUS5
  236. bool "Enable status LED 5"
  237. if LED_STATUS5
  238. config LED_STATUS_BIT5
  239. int "identification"
  240. help
  241. CONFIG_LED_STATUS_BIT5 is passed into the __led_* functions to
  242. identify which LED is being acted on. As such, the chosen value must
  243. be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
  244. the value to a physical LED is the responsibility of the __led_*
  245. function.
  246. config LED_STATUS_STATE5
  247. int "initial state"
  248. range LED_STATUS_OFF LED_STATUS_ON
  249. default LED_STATUS_OFF
  250. help
  251. Should be set one of the following:
  252. 0 - off
  253. 1 - blinking
  254. 2 - on
  255. config LED_STATUS_FREQ5
  256. int "blink frequency"
  257. range 2 10
  258. default 2
  259. help
  260. The LED blink period calculated from LED_STATUS_FREQ5:
  261. LED_STATUS_PERIOD5 = CONFIG_SYS_HZ/LED_STATUS_FREQ5
  262. Values range: 2 - 10
  263. endif # LED_STATUS5
  264. config LED_STATUS_BOOT_ENABLE
  265. bool "Enable BOOT LED"
  266. help
  267. Enable to turn an LED on when the board is booting.
  268. if LED_STATUS_BOOT_ENABLE
  269. config LED_STATUS_BOOT
  270. int "LED to light when the board is booting"
  271. help
  272. Valid enabled LED device number.
  273. endif # LED_STATUS_BOOT_ENABLE
  274. config LED_STATUS_RED_ENABLE
  275. bool "Enable red LED"
  276. help
  277. Enable red status LED.
  278. if LED_STATUS_RED_ENABLE
  279. config LED_STATUS_RED
  280. int "Red LED identification"
  281. help
  282. Valid enabled LED device number.
  283. endif # LED_STATUS_RED_ENABLE
  284. config LED_STATUS_YELLOW_ENABLE
  285. bool "Enable yellow LED"
  286. help
  287. Enable yellow status LED.
  288. if LED_STATUS_YELLOW_ENABLE
  289. config LED_STATUS_YELLOW
  290. int "Yellow LED identification"
  291. help
  292. Valid enabled LED device number.
  293. endif # LED_STATUS_YELLOW_ENABLE
  294. config LED_STATUS_BLUE_ENABLE
  295. bool "Enable blue LED"
  296. help
  297. Enable blue status LED.
  298. if LED_STATUS_BLUE_ENABLE
  299. config LED_STATUS_BLUE
  300. int "Blue LED identification"
  301. help
  302. Valid enabled LED device number.
  303. endif # LED_STATUS_BLUE_ENABLE
  304. config LED_STATUS_GREEN_ENABLE
  305. bool "Enable green LED"
  306. help
  307. Enable green status LED.
  308. if LED_STATUS_GREEN_ENABLE
  309. config LED_STATUS_GREEN
  310. int "Green LED identification"
  311. help
  312. Valid enabled LED device number (0-5).
  313. endif # LED_STATUS_GREEN_ENABLE
  314. config LED_STATUS_CMD
  315. bool "Enable status LED commands"
  316. endif # LED_STATUS
  317. endmenu