Kconfig 9.0 KB

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