blob: 59b007a7ef5108a1d4845ef11a0a887c378e93ed [file] [log] [blame]
Masahiro Yamadacc85b7b2015-07-26 02:46:26 +09001menu "LED Support"
2
Simon Glasscce3aed2015-06-23 15:38:45 -06003config LED
4 bool "Enable LED support"
5 depends on DM
6 help
7 Many boards have LEDs which can be used to signal status or alerts.
8 U-Boot provides a uclass API to implement this feature. LED drivers
9 can provide access to board-specific LEDs. Use of the device tree
10 for configuration is encouraged.
11
Christian Marangiea7387e2024-10-01 14:24:36 +020012config LED_BOOT
13 bool "Enable LED boot support"
14 help
15 Enable LED boot support.
16
17 LED boot is a specific LED assigned to signal boot operation status.
18 Defined in Device Tree /options/u-boot node. Refer here for the supported
19 options [1].
20
21 [1] dtschema/schemas/options/u-boot.yaml
22
Álvaro Fernández Rojasc7c859c2017-05-07 20:10:24 +020023config LED_BCM6328
24 bool "LED Support for BCM6328"
25 depends on LED && ARCH_BMIPS
26 help
27 This option enables support for LEDs connected to the BCM6328
28 LED HW controller accessed via MMIO registers.
29 HW blinking is supported and up to 24 LEDs can be controlled.
30 All LEDs can blink at the same time but the delay is shared, which
31 means that if one LED is set to blink at 100ms and then a different
32 LED is set to blink at 200ms, both will blink at 200ms.
33
Álvaro Fernández Rojas9bcd3552017-05-07 20:11:30 +020034config LED_BCM6358
35 bool "LED Support for BCM6358"
36 depends on LED && ARCH_BMIPS
37 help
38 This option enables support for LEDs connected to the BCM6358
39 LED HW controller accessed via MMIO registers.
40 HW has no blinking capabilities and up to 32 LEDs can be controlled.
41
Philippe Reynes162a2132022-02-17 17:17:04 +010042config LED_BCM6753
43 bool "LED Support for BCM6753"
William Zhang38921822022-08-22 11:49:08 -070044 depends on LED && BCM6855
Philippe Reynes162a2132022-02-17 17:17:04 +010045 help
46 This option enables support for LEDs connected to the BCM6753
47 HW has blinking and fading capabilities and up to 32 LEDs can be controlled.
48
Philippe Reynes9d5fb9c2019-03-22 17:02:01 +010049config LED_BCM6858
50 bool "LED Support for BCM6858"
William Zhang6b45fa62022-08-22 11:39:45 -070051 depends on LED && (BCM6856 || BCM6858 || BCM63158)
Philippe Reynes9d5fb9c2019-03-22 17:02:01 +010052 help
53 This option enables support for LEDs connected to the BCM6858
54 HW has blinking capabilities and up to 32 LEDs can be controlled.
55
Jway Linc1612002020-06-30 21:08:06 -070056config LED_CORTINA
57 bool "LED Support for Cortina Access CAxxxx SoCs"
58 depends on LED && (CORTINA_PLATFORM)
59 help
60 This option enables support for LEDs connected to the Cortina
61 Access CAxxxx SOCs.
62
Doug Zobel72b5a882023-11-17 12:38:11 +010063config LED_LP5562
64 bool "LED Support for LP5562"
65 depends on LED && DM_I2C
66 help
67 This option enables support for LEDs connected to the TI LP5562
68 4 channel I2C LED controller. Driver fully supports blink on the
69 B/G/R LEDs. White LED can blink, but re-uses the period from blue.
70
Ivan Vozvakhov78a18f62022-03-12 13:03:14 +030071config LED_PWM
72 bool "LED PWM"
73 depends on LED && DM_PWM
74 help
75 Enable support for LEDs connected to PWM.
76 Linux compatible ofdata.
Jway Linc1612002020-06-30 21:08:06 -070077
Simon Glass3bd0c462017-04-10 11:34:57 -060078config LED_BLINK
Michael Polyntsov353deb92024-07-19 13:12:12 +040079 bool "Support hardware LED blinking"
Simon Glass3bd0c462017-04-10 11:34:57 -060080 depends on LED
81 help
82 Some drivers can support automatic blinking of LEDs with a given
83 period, without needing timers or extra code to handle the timing.
84 This option enables support for this which adds slightly to the
85 code size.
86
Michael Polyntsov353deb92024-07-19 13:12:12 +040087config LED_SW_BLINK
88 bool "Support software LED blinking"
89 depends on LED
90 select CYCLIC
91 help
92 Turns on led blinking implemented in the software, useful when
93 the hardware doesn't support led blinking. Half of the period
94 led will be ON and the rest time it will be OFF. Standard
95 led commands can be used to configure blinking. Does nothing
96 if driver supports hardware blinking.
97 WARNING: Blinking may be inaccurate during execution of time
98 consuming commands (ex. flash reading). Also it completely
99 stops during OS booting.
100
Masahiro Yamada645dbd62015-08-12 07:31:50 +0900101config SPL_LED
Simon Glasscce3aed2015-06-23 15:38:45 -0600102 bool "Enable LED support in SPL"
Tom Rini0a83cc22022-06-10 23:03:09 -0400103 depends on SPL_DM
Simon Glasscce3aed2015-06-23 15:38:45 -0600104 help
105 The LED subsystem adds a small amount of overhead to the image.
106 If this is acceptable and you have a need to use LEDs in SPL,
107 enable this option. You will need to enable device tree in SPL
108 for this to work.
Simon Glass92670672017-04-10 11:34:52 -0600109
Simon Glass5a9390b2015-06-23 15:38:46 -0600110config LED_GPIO
111 bool "LED support for GPIO-connected LEDs"
112 depends on LED && DM_GPIO
113 help
114 Enable support for LEDs which are connected to GPIO lines. These
115 GPIOs may be on the SoC or some other device which provides GPIOs.
116 The GPIO driver must used driver model. LEDs are configured using
117 the device tree.
Masahiro Yamadacc85b7b2015-07-26 02:46:26 +0900118
Simon Glass965f4da2015-08-30 16:55:14 -0600119config SPL_LED_GPIO
120 bool "LED support for GPIO-connected LEDs in SPL"
Tom Rini0a83cc22022-06-10 23:03:09 -0400121 depends on SPL_LED && SPL_DM_GPIO
Simon Glass965f4da2015-08-30 16:55:14 -0600122 help
123 This option is an SPL-variant of the LED_GPIO option.
124 See the help of LED_GPIO for details.
125
Uri Mashiach3dc6f652017-01-19 10:51:05 +0200126config LED_STATUS
127 bool "Enable status LED API"
128 help
129 Allows common u-boot commands to use a board's leds to
130 provide status for activities like booting and downloading files.
131
132if LED_STATUS
133
134# Hidden constants
135
136config LED_STATUS_OFF
137 int
138 default 0
139
140config LED_STATUS_BLINKING
141 int
142 default 1
143
144config LED_STATUS_ON
145 int
146 default 2
147
148# Hidden constants end
149
150config LED_STATUS_GPIO
151 bool "GPIO status LED implementation"
152 help
153 The status LED can be connected to a GPIO pin. In such cases, the
154 gpio_led driver can be used as a status LED backend implementation.
155
156config LED_STATUS_BOARD_SPECIFIC
157 bool "Specific board"
158 default y
159 help
160 LED support is only for a specific board.
161
162comment "LEDs parameters"
163
164config LED_STATUS0
165 bool "Enable status LED 0"
166
167if LED_STATUS0
168
169config LED_STATUS_BIT
170 int "identification"
171 help
172 CONFIG_LED_STATUS_BIT is passed into the __led_* functions to identify
173 which LED is being acted on. As such, the chosen value must be unique
174 with respect to the other CONFIG_LED_STATUS_BIT's. Mapping the value
175 to a physical LED is the responsibility of the __led_* function.
176
177config LED_STATUS_STATE
178 int "initial state"
179 range LED_STATUS_OFF LED_STATUS_ON
180 default LED_STATUS_OFF
181 help
182 Should be set one of the following:
183 0 - off
184 1 - blinking
185 2 - on
186
187config LED_STATUS_FREQ
188 int "blink frequency"
189 range 2 10
190 default 2
191 help
192 The LED blink period calculated from LED_STATUS_FREQ:
193 LED_STATUS_PERIOD = CONFIG_SYS_HZ/LED_STATUS_FREQ
194 Values range: 2 - 10
195
196endif # LED_STATUS0
197
198config LED_STATUS1
199 bool "Enable status LED 1"
200
201if LED_STATUS1
202
203config LED_STATUS_BIT1
204 int "identification"
205 help
206 CONFIG_LED_STATUS_BIT1 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
212config LED_STATUS_STATE1
213 int "initial state"
214 range LED_STATUS_OFF LED_STATUS_ON
215 default LED_STATUS_OFF
216 help
217 Should be set one of the following:
218 0 - off
219 1 - blinking
220 2 - on
221
222config LED_STATUS_FREQ1
223 int "blink frequency"
224 range 2 10
225 default 2
226 help
227 The LED blink period calculated from LED_STATUS_FREQ1:
228 LED_STATUS_PERIOD1 = CONFIG_SYS_HZ/LED_STATUS_FREQ1
229 Values range: 2 - 10
230
231endif # LED_STATUS1
232
233config LED_STATUS2
234 bool "Enable status LED 2"
235
236if LED_STATUS2
237
238config LED_STATUS_BIT2
239 int "identification"
240 help
241 CONFIG_LED_STATUS_BIT2 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
247config LED_STATUS_STATE2
248 int "initial state"
249 range LED_STATUS_OFF LED_STATUS_ON
250 default LED_STATUS_OFF
251 help
252 Should be set one of the following:
253 0 - off
254 1 - blinking
255 2 - on
256
257config LED_STATUS_FREQ2
258 int "blink frequency"
259 range 2 10
260 default 2
261 help
262 The LED blink period calculated from LED_STATUS_FREQ2:
263 LED_STATUS_PERIOD2 = CONFIG_SYS_HZ/LED_STATUS_FREQ2
264 Values range: 2 - 10
265
266endif # LED_STATUS2
267
268config LED_STATUS3
269 bool "Enable status LED 3"
270
271if LED_STATUS3
272
273config LED_STATUS_BIT3
274 int "identification"
275 help
276 CONFIG_LED_STATUS_BIT3 is passed into the __led_* functions to
277 identify which LED is being acted on. As such, the chosen value must
278 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
279 the value to a physical LED is the responsibility of the __led_*
280 function.
281
282config LED_STATUS_STATE3
283 int "initial state"
284 range LED_STATUS_OFF LED_STATUS_ON
285 default LED_STATUS_OFF
286 help
287 Should be set one of the following:
288 0 - off
289 1 - blinking
290 2 - on
291
292config LED_STATUS_FREQ3
293 int "blink frequency"
294 range 2 10
295 default 2
296 help
297 The LED blink period calculated from LED_STATUS_FREQ3:
298 LED_STATUS_PERIOD3 = CONFIG_SYS_HZ/LED_STATUS_FREQ3
299 Values range: 2 - 10
300
301endif # LED_STATUS3
302
303config LED_STATUS4
304 bool "Enable status LED 4"
305
306if LED_STATUS4
307
308config LED_STATUS_BIT4
309 int "identification"
310 help
311 CONFIG_LED_STATUS_BIT4 is passed into the __led_* functions to
312 identify which LED is being acted on. As such, the chosen value must
313 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
314 the value to a physical LED is the responsibility of the __led_*
315 function.
316
317config LED_STATUS_STATE4
318 int "initial state"
319 range LED_STATUS_OFF LED_STATUS_ON
320 default LED_STATUS_OFF
321 help
322 Should be set one of the following:
323 0 - off
324 1 - blinking
325 2 - on
326
327config LED_STATUS_FREQ4
328 int "blink frequency"
329 range 2 10
330 default 2
331 help
332 The LED blink period calculated from LED_STATUS_FREQ4:
333 LED_STATUS_PERIOD4 = CONFIG_SYS_HZ/LED_STATUS_FREQ4
334 Values range: 2 - 10
335
336endif # LED_STATUS4
337
338config LED_STATUS5
339 bool "Enable status LED 5"
340
341if LED_STATUS5
342
343config LED_STATUS_BIT5
344 int "identification"
345 help
346 CONFIG_LED_STATUS_BIT5 is passed into the __led_* functions to
347 identify which LED is being acted on. As such, the chosen value must
348 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
349 the value to a physical LED is the responsibility of the __led_*
350 function.
351
352config LED_STATUS_STATE5
353 int "initial state"
354 range LED_STATUS_OFF LED_STATUS_ON
355 default LED_STATUS_OFF
356 help
357 Should be set one of the following:
358 0 - off
359 1 - blinking
360 2 - on
361
362config LED_STATUS_FREQ5
363 int "blink frequency"
364 range 2 10
365 default 2
366 help
367 The LED blink period calculated from LED_STATUS_FREQ5:
368 LED_STATUS_PERIOD5 = CONFIG_SYS_HZ/LED_STATUS_FREQ5
369 Values range: 2 - 10
370
371endif # LED_STATUS5
372
373config LED_STATUS_BOOT_ENABLE
374 bool "Enable BOOT LED"
375 help
376 Enable to turn an LED on when the board is booting.
377
378if LED_STATUS_BOOT_ENABLE
379
380config LED_STATUS_BOOT
381 int "LED to light when the board is booting"
382 help
383 Valid enabled LED device number.
384
385endif # LED_STATUS_BOOT_ENABLE
386
387config LED_STATUS_RED_ENABLE
388 bool "Enable red LED"
389 help
390 Enable red status LED.
391
392if LED_STATUS_RED_ENABLE
393
394config LED_STATUS_RED
395 int "Red LED identification"
396 help
397 Valid enabled LED device number.
398
399endif # LED_STATUS_RED_ENABLE
400
401config LED_STATUS_YELLOW_ENABLE
402 bool "Enable yellow LED"
403 help
404 Enable yellow status LED.
405
406if LED_STATUS_YELLOW_ENABLE
407
408config LED_STATUS_YELLOW
409 int "Yellow LED identification"
410 help
411 Valid enabled LED device number.
412
413endif # LED_STATUS_YELLOW_ENABLE
414
415config LED_STATUS_BLUE_ENABLE
416 bool "Enable blue LED"
417 help
418 Enable blue status LED.
419
420if LED_STATUS_BLUE_ENABLE
421
422config LED_STATUS_BLUE
423 int "Blue LED identification"
424 help
425 Valid enabled LED device number.
426
427endif # LED_STATUS_BLUE_ENABLE
428
429config LED_STATUS_GREEN_ENABLE
430 bool "Enable green LED"
431 help
432 Enable green status LED.
433
434if LED_STATUS_GREEN_ENABLE
435
436config LED_STATUS_GREEN
437 int "Green LED identification"
438 help
439 Valid enabled LED device number (0-5).
440
441endif # LED_STATUS_GREEN_ENABLE
442
443config LED_STATUS_CMD
444 bool "Enable status LED commands"
445
446endif # LED_STATUS
447
Masahiro Yamadacc85b7b2015-07-26 02:46:26 +0900448endmenu