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