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