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