blob: 430d0760ba5bd85e5d372f54d1d1d60ddef356fd [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"
33 depends on LED && ARCH_BCM6753
34 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"
Philippe Reynes3907a502020-01-07 20:14:14 +010040 depends on LED && (ARCH_BCM68360 || ARCH_BCM6858 || ARCH_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
52
Simon Glass3bd0c462017-04-10 11:34:57 -060053config LED_BLINK
54 bool "Support LED blinking"
55 depends on LED
56 help
57 Some drivers can support automatic blinking of LEDs with a given
58 period, without needing timers or extra code to handle the timing.
59 This option enables support for this which adds slightly to the
60 code size.
61
Masahiro Yamada645dbd62015-08-12 07:31:50 +090062config SPL_LED
Simon Glasscce3aed2015-06-23 15:38:45 -060063 bool "Enable LED support in SPL"
Simon Glass965f4da2015-08-30 16:55:14 -060064 depends on SPL && SPL_DM
Simon Glasscce3aed2015-06-23 15:38:45 -060065 help
66 The LED subsystem adds a small amount of overhead to the image.
67 If this is acceptable and you have a need to use LEDs in SPL,
68 enable this option. You will need to enable device tree in SPL
69 for this to work.
Simon Glass92670672017-04-10 11:34:52 -060070
Simon Glass5a9390b2015-06-23 15:38:46 -060071config LED_GPIO
72 bool "LED support for GPIO-connected LEDs"
73 depends on LED && DM_GPIO
74 help
75 Enable support for LEDs which are connected to GPIO lines. These
76 GPIOs may be on the SoC or some other device which provides GPIOs.
77 The GPIO driver must used driver model. LEDs are configured using
78 the device tree.
Masahiro Yamadacc85b7b2015-07-26 02:46:26 +090079
Simon Glass965f4da2015-08-30 16:55:14 -060080config SPL_LED_GPIO
81 bool "LED support for GPIO-connected LEDs in SPL"
82 depends on SPL_LED && DM_GPIO
83 help
84 This option is an SPL-variant of the LED_GPIO option.
85 See the help of LED_GPIO for details.
86
Uri Mashiach3dc6f652017-01-19 10:51:05 +020087config LED_STATUS
88 bool "Enable status LED API"
89 help
90 Allows common u-boot commands to use a board's leds to
91 provide status for activities like booting and downloading files.
92
93if LED_STATUS
94
95# Hidden constants
96
97config LED_STATUS_OFF
98 int
99 default 0
100
101config LED_STATUS_BLINKING
102 int
103 default 1
104
105config LED_STATUS_ON
106 int
107 default 2
108
109# Hidden constants end
110
111config LED_STATUS_GPIO
112 bool "GPIO status LED implementation"
113 help
114 The status LED can be connected to a GPIO pin. In such cases, the
115 gpio_led driver can be used as a status LED backend implementation.
116
117config LED_STATUS_BOARD_SPECIFIC
118 bool "Specific board"
119 default y
120 help
121 LED support is only for a specific board.
122
123comment "LEDs parameters"
124
125config LED_STATUS0
126 bool "Enable status LED 0"
127
128if LED_STATUS0
129
130config LED_STATUS_BIT
131 int "identification"
132 help
133 CONFIG_LED_STATUS_BIT is passed into the __led_* functions to identify
134 which LED is being acted on. As such, the chosen value must be unique
135 with respect to the other CONFIG_LED_STATUS_BIT's. Mapping the value
136 to a physical LED is the responsibility of the __led_* function.
137
138config LED_STATUS_STATE
139 int "initial state"
140 range LED_STATUS_OFF LED_STATUS_ON
141 default LED_STATUS_OFF
142 help
143 Should be set one of the following:
144 0 - off
145 1 - blinking
146 2 - on
147
148config LED_STATUS_FREQ
149 int "blink frequency"
150 range 2 10
151 default 2
152 help
153 The LED blink period calculated from LED_STATUS_FREQ:
154 LED_STATUS_PERIOD = CONFIG_SYS_HZ/LED_STATUS_FREQ
155 Values range: 2 - 10
156
157endif # LED_STATUS0
158
159config LED_STATUS1
160 bool "Enable status LED 1"
161
162if LED_STATUS1
163
164config LED_STATUS_BIT1
165 int "identification"
166 help
167 CONFIG_LED_STATUS_BIT1 is passed into the __led_* functions to
168 identify which LED is being acted on. As such, the chosen value must
169 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
170 the value to a physical LED is the responsibility of the __led_*
171 function.
172
173config LED_STATUS_STATE1
174 int "initial state"
175 range LED_STATUS_OFF LED_STATUS_ON
176 default LED_STATUS_OFF
177 help
178 Should be set one of the following:
179 0 - off
180 1 - blinking
181 2 - on
182
183config LED_STATUS_FREQ1
184 int "blink frequency"
185 range 2 10
186 default 2
187 help
188 The LED blink period calculated from LED_STATUS_FREQ1:
189 LED_STATUS_PERIOD1 = CONFIG_SYS_HZ/LED_STATUS_FREQ1
190 Values range: 2 - 10
191
192endif # LED_STATUS1
193
194config LED_STATUS2
195 bool "Enable status LED 2"
196
197if LED_STATUS2
198
199config LED_STATUS_BIT2
200 int "identification"
201 help
202 CONFIG_LED_STATUS_BIT2 is passed into the __led_* functions to
203 identify which LED is being acted on. As such, the chosen value must
204 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
205 the value to a physical LED is the responsibility of the __led_*
206 function.
207
208config LED_STATUS_STATE2
209 int "initial state"
210 range LED_STATUS_OFF LED_STATUS_ON
211 default LED_STATUS_OFF
212 help
213 Should be set one of the following:
214 0 - off
215 1 - blinking
216 2 - on
217
218config LED_STATUS_FREQ2
219 int "blink frequency"
220 range 2 10
221 default 2
222 help
223 The LED blink period calculated from LED_STATUS_FREQ2:
224 LED_STATUS_PERIOD2 = CONFIG_SYS_HZ/LED_STATUS_FREQ2
225 Values range: 2 - 10
226
227endif # LED_STATUS2
228
229config LED_STATUS3
230 bool "Enable status LED 3"
231
232if LED_STATUS3
233
234config LED_STATUS_BIT3
235 int "identification"
236 help
237 CONFIG_LED_STATUS_BIT3 is passed into the __led_* functions to
238 identify which LED is being acted on. As such, the chosen value must
239 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
240 the value to a physical LED is the responsibility of the __led_*
241 function.
242
243config LED_STATUS_STATE3
244 int "initial state"
245 range LED_STATUS_OFF LED_STATUS_ON
246 default LED_STATUS_OFF
247 help
248 Should be set one of the following:
249 0 - off
250 1 - blinking
251 2 - on
252
253config LED_STATUS_FREQ3
254 int "blink frequency"
255 range 2 10
256 default 2
257 help
258 The LED blink period calculated from LED_STATUS_FREQ3:
259 LED_STATUS_PERIOD3 = CONFIG_SYS_HZ/LED_STATUS_FREQ3
260 Values range: 2 - 10
261
262endif # LED_STATUS3
263
264config LED_STATUS4
265 bool "Enable status LED 4"
266
267if LED_STATUS4
268
269config LED_STATUS_BIT4
270 int "identification"
271 help
272 CONFIG_LED_STATUS_BIT4 is passed into the __led_* functions to
273 identify which LED is being acted on. As such, the chosen value must
274 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
275 the value to a physical LED is the responsibility of the __led_*
276 function.
277
278config LED_STATUS_STATE4
279 int "initial state"
280 range LED_STATUS_OFF LED_STATUS_ON
281 default LED_STATUS_OFF
282 help
283 Should be set one of the following:
284 0 - off
285 1 - blinking
286 2 - on
287
288config LED_STATUS_FREQ4
289 int "blink frequency"
290 range 2 10
291 default 2
292 help
293 The LED blink period calculated from LED_STATUS_FREQ4:
294 LED_STATUS_PERIOD4 = CONFIG_SYS_HZ/LED_STATUS_FREQ4
295 Values range: 2 - 10
296
297endif # LED_STATUS4
298
299config LED_STATUS5
300 bool "Enable status LED 5"
301
302if LED_STATUS5
303
304config LED_STATUS_BIT5
305 int "identification"
306 help
307 CONFIG_LED_STATUS_BIT5 is passed into the __led_* functions to
308 identify which LED is being acted on. As such, the chosen value must
309 be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
310 the value to a physical LED is the responsibility of the __led_*
311 function.
312
313config LED_STATUS_STATE5
314 int "initial state"
315 range LED_STATUS_OFF LED_STATUS_ON
316 default LED_STATUS_OFF
317 help
318 Should be set one of the following:
319 0 - off
320 1 - blinking
321 2 - on
322
323config LED_STATUS_FREQ5
324 int "blink frequency"
325 range 2 10
326 default 2
327 help
328 The LED blink period calculated from LED_STATUS_FREQ5:
329 LED_STATUS_PERIOD5 = CONFIG_SYS_HZ/LED_STATUS_FREQ5
330 Values range: 2 - 10
331
332endif # LED_STATUS5
333
334config LED_STATUS_BOOT_ENABLE
335 bool "Enable BOOT LED"
336 help
337 Enable to turn an LED on when the board is booting.
338
339if LED_STATUS_BOOT_ENABLE
340
341config LED_STATUS_BOOT
342 int "LED to light when the board is booting"
343 help
344 Valid enabled LED device number.
345
346endif # LED_STATUS_BOOT_ENABLE
347
348config LED_STATUS_RED_ENABLE
349 bool "Enable red LED"
350 help
351 Enable red status LED.
352
353if LED_STATUS_RED_ENABLE
354
355config LED_STATUS_RED
356 int "Red LED identification"
357 help
358 Valid enabled LED device number.
359
360endif # LED_STATUS_RED_ENABLE
361
362config LED_STATUS_YELLOW_ENABLE
363 bool "Enable yellow LED"
364 help
365 Enable yellow status LED.
366
367if LED_STATUS_YELLOW_ENABLE
368
369config LED_STATUS_YELLOW
370 int "Yellow LED identification"
371 help
372 Valid enabled LED device number.
373
374endif # LED_STATUS_YELLOW_ENABLE
375
376config LED_STATUS_BLUE_ENABLE
377 bool "Enable blue LED"
378 help
379 Enable blue status LED.
380
381if LED_STATUS_BLUE_ENABLE
382
383config LED_STATUS_BLUE
384 int "Blue LED identification"
385 help
386 Valid enabled LED device number.
387
388endif # LED_STATUS_BLUE_ENABLE
389
390config LED_STATUS_GREEN_ENABLE
391 bool "Enable green LED"
392 help
393 Enable green status LED.
394
395if LED_STATUS_GREEN_ENABLE
396
397config LED_STATUS_GREEN
398 int "Green LED identification"
399 help
400 Valid enabled LED device number (0-5).
401
402endif # LED_STATUS_GREEN_ENABLE
403
404config LED_STATUS_CMD
405 bool "Enable status LED commands"
406
407endif # LED_STATUS
408
Masahiro Yamadacc85b7b2015-07-26 02:46:26 +0900409endmenu