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