blob: 9837960198d3503fdfb1d23a28203f1a97c819e2 [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
Álvaro Fernández Rojasc7c859c2017-05-07 20:10:24 +020012config LED_BCM6328
13 bool "LED Support for BCM6328"
14 depends on LED && ARCH_BMIPS
15 help
16 This option enables support for LEDs connected to the BCM6328
17 LED HW controller accessed via MMIO registers.
18 HW blinking is supported and up to 24 LEDs can be controlled.
19 All LEDs can blink at the same time but the delay is shared, which
20 means that if one LED is set to blink at 100ms and then a different
21 LED is set to blink at 200ms, both will blink at 200ms.
22
Álvaro Fernández Rojas9bcd3552017-05-07 20:11:30 +020023config LED_BCM6358
24 bool "LED Support for BCM6358"
25 depends on LED && ARCH_BMIPS
26 help
27 This option enables support for LEDs connected to the BCM6358
28 LED HW controller accessed via MMIO registers.
29 HW has no blinking capabilities and up to 32 LEDs can be controlled.
30
Philippe Reynes162a2132022-02-17 17:17:04 +010031config LED_BCM6753
32 bool "LED Support for BCM6753"
William Zhang38921822022-08-22 11:49:08 -070033 depends on LED && BCM6855
Philippe Reynes162a2132022-02-17 17:17:04 +010034 help
35 This option enables support for LEDs connected to the BCM6753
36 HW has blinking and fading capabilities and up to 32 LEDs can be controlled.
37
Philippe Reynes9d5fb9c2019-03-22 17:02:01 +010038config LED_BCM6858
39 bool "LED Support for BCM6858"
William Zhang6b45fa62022-08-22 11:39:45 -070040 depends on LED && (BCM6856 || BCM6858 || BCM63158)
Philippe Reynes9d5fb9c2019-03-22 17:02:01 +010041 help
42 This option enables support for LEDs connected to the BCM6858
43 HW has blinking capabilities and up to 32 LEDs can be controlled.
44
Jway Linc1612002020-06-30 21:08:06 -070045config LED_CORTINA
46 bool "LED Support for Cortina Access CAxxxx SoCs"
47 depends on LED && (CORTINA_PLATFORM)
48 help
49 This option enables support for LEDs connected to the Cortina
50 Access CAxxxx SOCs.
51
Doug Zobel72b5a882023-11-17 12:38:11 +010052config LED_LP5562
53 bool "LED Support for LP5562"
54 depends on LED && DM_I2C
55 help
56 This option enables support for LEDs connected to the TI LP5562
57 4 channel I2C LED controller. Driver fully supports blink on the
58 B/G/R LEDs. White LED can blink, but re-uses the period from blue.
59
Ivan Vozvakhov78a18f62022-03-12 13:03:14 +030060config LED_PWM
61 bool "LED PWM"
62 depends on LED && DM_PWM
63 help
64 Enable support for LEDs connected to PWM.
65 Linux compatible ofdata.
Jway Linc1612002020-06-30 21:08:06 -070066
Simon Glass3bd0c462017-04-10 11:34:57 -060067config LED_BLINK
68 bool "Support LED blinking"
69 depends on LED
70 help
71 Some drivers can support automatic blinking of LEDs with a given
72 period, without needing timers or extra code to handle the timing.
73 This option enables support for this which adds slightly to the
74 code size.
75
Masahiro Yamada645dbd62015-08-12 07:31:50 +090076config SPL_LED
Simon Glasscce3aed2015-06-23 15:38:45 -060077 bool "Enable LED support in SPL"
Tom Rini0a83cc22022-06-10 23:03:09 -040078 depends on SPL_DM
Simon Glasscce3aed2015-06-23 15:38:45 -060079 help
80 The LED subsystem adds a small amount of overhead to the image.
81 If this is acceptable and you have a need to use LEDs in SPL,
82 enable this option. You will need to enable device tree in SPL
83 for this to work.
Simon Glass92670672017-04-10 11:34:52 -060084
Simon Glass5a9390b2015-06-23 15:38:46 -060085config LED_GPIO
86 bool "LED support for GPIO-connected LEDs"
87 depends on LED && DM_GPIO
88 help
89 Enable support for LEDs which are connected to GPIO lines. These
90 GPIOs may be on the SoC or some other device which provides GPIOs.
91 The GPIO driver must used driver model. LEDs are configured using
92 the device tree.
Masahiro Yamadacc85b7b2015-07-26 02:46:26 +090093
Simon Glass965f4da2015-08-30 16:55:14 -060094config SPL_LED_GPIO
95 bool "LED support for GPIO-connected LEDs in SPL"
Tom Rini0a83cc22022-06-10 23:03:09 -040096 depends on SPL_LED && SPL_DM_GPIO
Simon Glass965f4da2015-08-30 16:55:14 -060097 help
98 This option is an SPL-variant of the LED_GPIO option.
99 See the help of LED_GPIO for details.
100
Uri Mashiach3dc6f652017-01-19 10:51:05 +0200101config LED_STATUS
102 bool "Enable status LED API"
103 help
104 Allows common u-boot commands to use a board's leds to
105 provide status for activities like booting and downloading files.
106
107if LED_STATUS
108
109# Hidden constants
110
111config LED_STATUS_OFF
112 int
113 default 0
114
115config LED_STATUS_BLINKING
116 int
117 default 1
118
119config LED_STATUS_ON
120 int
121 default 2
122
123# Hidden constants end
124
125config LED_STATUS_GPIO
126 bool "GPIO status LED implementation"
127 help
128 The status LED can be connected to a GPIO pin. In such cases, the
129 gpio_led driver can be used as a status LED backend implementation.
130
131config LED_STATUS_BOARD_SPECIFIC
132 bool "Specific board"
133 default y
134 help
135 LED support is only for a specific board.
136
137comment "LEDs parameters"
138
139config LED_STATUS0
140 bool "Enable status LED 0"
141
142if LED_STATUS0
143
144config LED_STATUS_BIT
145 int "identification"
146 help
147 CONFIG_LED_STATUS_BIT is passed into the __led_* functions to identify
148 which LED is being acted on. As such, the chosen value must be unique
149 with respect to the other CONFIG_LED_STATUS_BIT's. Mapping the value
150 to a physical LED is the responsibility of the __led_* function.
151
152config LED_STATUS_STATE
153 int "initial state"
154 range LED_STATUS_OFF LED_STATUS_ON
155 default LED_STATUS_OFF
156 help
157 Should be set one of the following:
158 0 - off
159 1 - blinking
160 2 - on
161
162config LED_STATUS_FREQ
163 int "blink frequency"
164 range 2 10
165 default 2
166 help
167 The LED blink period calculated from LED_STATUS_FREQ:
168 LED_STATUS_PERIOD = CONFIG_SYS_HZ/LED_STATUS_FREQ
169 Values range: 2 - 10
170
171endif # LED_STATUS0
172
173config LED_STATUS1
174 bool "Enable status LED 1"
175
176if LED_STATUS1
177
178config LED_STATUS_BIT1
179 int "identification"
180 help
181 CONFIG_LED_STATUS_BIT1 is passed into the __led_* functions to
182 identify which LED is being acted on. As such, the chosen value must
183 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
184 the value to a physical LED is the responsibility of the __led_*
185 function.
186
187config LED_STATUS_STATE1
188 int "initial state"
189 range LED_STATUS_OFF LED_STATUS_ON
190 default LED_STATUS_OFF
191 help
192 Should be set one of the following:
193 0 - off
194 1 - blinking
195 2 - on
196
197config LED_STATUS_FREQ1
198 int "blink frequency"
199 range 2 10
200 default 2
201 help
202 The LED blink period calculated from LED_STATUS_FREQ1:
203 LED_STATUS_PERIOD1 = CONFIG_SYS_HZ/LED_STATUS_FREQ1
204 Values range: 2 - 10
205
206endif # LED_STATUS1
207
208config LED_STATUS2
209 bool "Enable status LED 2"
210
211if LED_STATUS2
212
213config LED_STATUS_BIT2
214 int "identification"
215 help
216 CONFIG_LED_STATUS_BIT2 is passed into the __led_* functions to
217 identify which LED is being acted on. As such, the chosen value must
218 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
219 the value to a physical LED is the responsibility of the __led_*
220 function.
221
222config LED_STATUS_STATE2
223 int "initial state"
224 range LED_STATUS_OFF LED_STATUS_ON
225 default LED_STATUS_OFF
226 help
227 Should be set one of the following:
228 0 - off
229 1 - blinking
230 2 - on
231
232config LED_STATUS_FREQ2
233 int "blink frequency"
234 range 2 10
235 default 2
236 help
237 The LED blink period calculated from LED_STATUS_FREQ2:
238 LED_STATUS_PERIOD2 = CONFIG_SYS_HZ/LED_STATUS_FREQ2
239 Values range: 2 - 10
240
241endif # LED_STATUS2
242
243config LED_STATUS3
244 bool "Enable status LED 3"
245
246if LED_STATUS3
247
248config LED_STATUS_BIT3
249 int "identification"
250 help
251 CONFIG_LED_STATUS_BIT3 is passed into the __led_* functions to
252 identify which LED is being acted on. As such, the chosen value must
253 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
254 the value to a physical LED is the responsibility of the __led_*
255 function.
256
257config LED_STATUS_STATE3
258 int "initial state"
259 range LED_STATUS_OFF LED_STATUS_ON
260 default LED_STATUS_OFF
261 help
262 Should be set one of the following:
263 0 - off
264 1 - blinking
265 2 - on
266
267config LED_STATUS_FREQ3
268 int "blink frequency"
269 range 2 10
270 default 2
271 help
272 The LED blink period calculated from LED_STATUS_FREQ3:
273 LED_STATUS_PERIOD3 = CONFIG_SYS_HZ/LED_STATUS_FREQ3
274 Values range: 2 - 10
275
276endif # LED_STATUS3
277
278config LED_STATUS4
279 bool "Enable status LED 4"
280
281if LED_STATUS4
282
283config LED_STATUS_BIT4
284 int "identification"
285 help
286 CONFIG_LED_STATUS_BIT4 is passed into the __led_* functions to
287 identify which LED is being acted on. As such, the chosen value must
288 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
289 the value to a physical LED is the responsibility of the __led_*
290 function.
291
292config LED_STATUS_STATE4
293 int "initial state"
294 range LED_STATUS_OFF LED_STATUS_ON
295 default LED_STATUS_OFF
296 help
297 Should be set one of the following:
298 0 - off
299 1 - blinking
300 2 - on
301
302config LED_STATUS_FREQ4
303 int "blink frequency"
304 range 2 10
305 default 2
306 help
307 The LED blink period calculated from LED_STATUS_FREQ4:
308 LED_STATUS_PERIOD4 = CONFIG_SYS_HZ/LED_STATUS_FREQ4
309 Values range: 2 - 10
310
311endif # LED_STATUS4
312
313config LED_STATUS5
314 bool "Enable status LED 5"
315
316if LED_STATUS5
317
318config LED_STATUS_BIT5
319 int "identification"
320 help
321 CONFIG_LED_STATUS_BIT5 is passed into the __led_* functions to
322 identify which LED is being acted on. As such, the chosen value must
323 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
324 the value to a physical LED is the responsibility of the __led_*
325 function.
326
327config LED_STATUS_STATE5
328 int "initial state"
329 range LED_STATUS_OFF LED_STATUS_ON
330 default LED_STATUS_OFF
331 help
332 Should be set one of the following:
333 0 - off
334 1 - blinking
335 2 - on
336
337config LED_STATUS_FREQ5
338 int "blink frequency"
339 range 2 10
340 default 2
341 help
342 The LED blink period calculated from LED_STATUS_FREQ5:
343 LED_STATUS_PERIOD5 = CONFIG_SYS_HZ/LED_STATUS_FREQ5
344 Values range: 2 - 10
345
346endif # LED_STATUS5
347
348config LED_STATUS_BOOT_ENABLE
349 bool "Enable BOOT LED"
350 help
351 Enable to turn an LED on when the board is booting.
352
353if LED_STATUS_BOOT_ENABLE
354
355config LED_STATUS_BOOT
356 int "LED to light when the board is booting"
357 help
358 Valid enabled LED device number.
359
360endif # LED_STATUS_BOOT_ENABLE
361
362config LED_STATUS_RED_ENABLE
363 bool "Enable red LED"
364 help
365 Enable red status LED.
366
367if LED_STATUS_RED_ENABLE
368
369config LED_STATUS_RED
370 int "Red LED identification"
371 help
372 Valid enabled LED device number.
373
374endif # LED_STATUS_RED_ENABLE
375
376config LED_STATUS_YELLOW_ENABLE
377 bool "Enable yellow LED"
378 help
379 Enable yellow status LED.
380
381if LED_STATUS_YELLOW_ENABLE
382
383config LED_STATUS_YELLOW
384 int "Yellow LED identification"
385 help
386 Valid enabled LED device number.
387
388endif # LED_STATUS_YELLOW_ENABLE
389
390config LED_STATUS_BLUE_ENABLE
391 bool "Enable blue LED"
392 help
393 Enable blue status LED.
394
395if LED_STATUS_BLUE_ENABLE
396
397config LED_STATUS_BLUE
398 int "Blue LED identification"
399 help
400 Valid enabled LED device number.
401
402endif # LED_STATUS_BLUE_ENABLE
403
404config LED_STATUS_GREEN_ENABLE
405 bool "Enable green LED"
406 help
407 Enable green status LED.
408
409if LED_STATUS_GREEN_ENABLE
410
411config LED_STATUS_GREEN
412 int "Green LED identification"
413 help
414 Valid enabled LED device number (0-5).
415
416endif # LED_STATUS_GREEN_ENABLE
417
418config LED_STATUS_CMD
419 bool "Enable status LED commands"
420
421endif # LED_STATUS
422
Masahiro Yamadacc85b7b2015-07-26 02:46:26 +0900423endmenu