Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
[platform/kernel/u-boot.git] / drivers / led / Kconfig
1 menu "LED Support"
2
3 config 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
12 config 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
23 config 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
31 config 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
38 config LED_BCM6858
39         bool "LED Support for BCM6858"
40         depends on LED && (ARCH_BCM68360 || ARCH_BCM6858 || ARCH_BCM63158)
41         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
45 config 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
53 config 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
62 config SPL_LED
63         bool "Enable LED support in SPL"
64         depends on SPL && SPL_DM
65         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.
70
71 config 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.
79
80 config 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
87 config 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
93 if LED_STATUS
94
95 # Hidden constants
96
97 config LED_STATUS_OFF
98         int
99         default 0
100
101 config LED_STATUS_BLINKING
102         int
103         default 1
104
105 config LED_STATUS_ON
106         int
107         default 2
108
109 # Hidden constants end
110
111 config 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
117 config LED_STATUS_BOARD_SPECIFIC
118         bool "Specific board"
119         default y
120         help
121           LED support is only for a specific board.
122
123 comment "LEDs parameters"
124
125 config LED_STATUS0
126         bool "Enable status LED 0"
127
128 if LED_STATUS0
129
130 config 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
138 config 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
148 config 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
157 endif # LED_STATUS0
158
159 config LED_STATUS1
160         bool "Enable status LED 1"
161
162 if LED_STATUS1
163
164 config 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
173 config 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
183 config 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
192 endif # LED_STATUS1
193
194 config LED_STATUS2
195         bool "Enable status LED 2"
196
197 if LED_STATUS2
198
199 config 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
208 config 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
218 config 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
227 endif # LED_STATUS2
228
229 config LED_STATUS3
230         bool "Enable status LED 3"
231
232 if LED_STATUS3
233
234 config 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
243 config 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
253 config 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
262 endif # LED_STATUS3
263
264 config LED_STATUS4
265         bool "Enable status LED 4"
266
267 if LED_STATUS4
268
269 config 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
278 config 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
288 config 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
297 endif # LED_STATUS4
298
299 config LED_STATUS5
300         bool "Enable status LED 5"
301
302 if LED_STATUS5
303
304 config 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
313 config 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
323 config 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
332 endif # LED_STATUS5
333
334 config LED_STATUS_BOOT_ENABLE
335         bool "Enable BOOT LED"
336         help
337           Enable to turn an LED on when the board is booting.
338
339 if LED_STATUS_BOOT_ENABLE
340
341 config LED_STATUS_BOOT
342         int "LED to light when the board is booting"
343         help
344           Valid enabled LED device number.
345
346 endif # LED_STATUS_BOOT_ENABLE
347
348 config LED_STATUS_RED_ENABLE
349         bool "Enable red LED"
350         help
351           Enable red status LED.
352
353 if LED_STATUS_RED_ENABLE
354
355 config LED_STATUS_RED
356         int "Red LED identification"
357         help
358           Valid enabled LED device number.
359
360 endif # LED_STATUS_RED_ENABLE
361
362 config LED_STATUS_YELLOW_ENABLE
363         bool "Enable yellow LED"
364         help
365           Enable yellow status LED.
366
367 if LED_STATUS_YELLOW_ENABLE
368
369 config LED_STATUS_YELLOW
370         int "Yellow LED identification"
371         help
372           Valid enabled LED device number.
373
374 endif # LED_STATUS_YELLOW_ENABLE
375
376 config LED_STATUS_BLUE_ENABLE
377         bool "Enable blue LED"
378         help
379           Enable blue status LED.
380
381 if LED_STATUS_BLUE_ENABLE
382
383 config LED_STATUS_BLUE
384         int "Blue LED identification"
385         help
386           Valid enabled LED device number.
387
388 endif # LED_STATUS_BLUE_ENABLE
389
390 config LED_STATUS_GREEN_ENABLE
391         bool "Enable green LED"
392         help
393           Enable green status LED.
394
395 if LED_STATUS_GREEN_ENABLE
396
397 config LED_STATUS_GREEN
398         int "Green LED identification"
399         help
400           Valid enabled LED device number (0-5).
401
402 endif # LED_STATUS_GREEN_ENABLE
403
404 config LED_STATUS_CMD
405         bool "Enable status LED commands"
406
407 endif # LED_STATUS
408
409 endmenu