Masahiro Yamada | cc85b7b | 2015-07-26 02:46:26 +0900 | [diff] [blame] | 1 | menu "LED Support" |
| 2 | |
Simon Glass | cce3aed | 2015-06-23 15:38:45 -0600 | [diff] [blame] | 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 | |
Álvaro Fernández Rojas | c7c859c | 2017-05-07 20:10:24 +0200 | [diff] [blame] | 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 | |
Álvaro Fernández Rojas | 9bcd355 | 2017-05-07 20:11:30 +0200 | [diff] [blame] | 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 | |
Philippe Reynes | 162a213 | 2022-02-17 17:17:04 +0100 | [diff] [blame] | 31 | config LED_BCM6753 |
| 32 | bool "LED Support for BCM6753" |
William Zhang | 3892182 | 2022-08-22 11:49:08 -0700 | [diff] [blame] | 33 | depends on LED && BCM6855 |
Philippe Reynes | 162a213 | 2022-02-17 17:17:04 +0100 | [diff] [blame] | 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 Reynes | 9d5fb9c | 2019-03-22 17:02:01 +0100 | [diff] [blame] | 38 | config LED_BCM6858 |
| 39 | bool "LED Support for BCM6858" |
William Zhang | 6b45fa6 | 2022-08-22 11:39:45 -0700 | [diff] [blame] | 40 | depends on LED && (BCM6856 || BCM6858 || BCM63158) |
Philippe Reynes | 9d5fb9c | 2019-03-22 17:02:01 +0100 | [diff] [blame] | 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 | |
Jway Lin | c161200 | 2020-06-30 21:08:06 -0700 | [diff] [blame] | 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 | |
Doug Zobel | 72b5a88 | 2023-11-17 12:38:11 +0100 | [diff] [blame] | 52 | config LED_LP5562 |
| 53 | bool "LED Support for LP5562" |
| 54 | depends on LED && DM_I2C |
| 55 | help |
| 56 | This option enables support for LEDs connected to the TI LP5562 |
| 57 | 4 channel I2C LED controller. Driver fully supports blink on the |
| 58 | B/G/R LEDs. White LED can blink, but re-uses the period from blue. |
| 59 | |
Ivan Vozvakhov | 78a18f6 | 2022-03-12 13:03:14 +0300 | [diff] [blame] | 60 | config LED_PWM |
| 61 | bool "LED PWM" |
| 62 | depends on LED && DM_PWM |
| 63 | help |
| 64 | Enable support for LEDs connected to PWM. |
| 65 | Linux compatible ofdata. |
Jway Lin | c161200 | 2020-06-30 21:08:06 -0700 | [diff] [blame] | 66 | |
Simon Glass | 3bd0c46 | 2017-04-10 11:34:57 -0600 | [diff] [blame] | 67 | config LED_BLINK |
Michael Polyntsov | 353deb9 | 2024-07-19 13:12:12 +0400 | [diff] [blame^] | 68 | bool "Support hardware LED blinking" |
Simon Glass | 3bd0c46 | 2017-04-10 11:34:57 -0600 | [diff] [blame] | 69 | depends on LED |
| 70 | help |
| 71 | Some drivers can support automatic blinking of LEDs with a given |
| 72 | period, without needing timers or extra code to handle the timing. |
| 73 | This option enables support for this which adds slightly to the |
| 74 | code size. |
| 75 | |
Michael Polyntsov | 353deb9 | 2024-07-19 13:12:12 +0400 | [diff] [blame^] | 76 | config LED_SW_BLINK |
| 77 | bool "Support software LED blinking" |
| 78 | depends on LED |
| 79 | select CYCLIC |
| 80 | help |
| 81 | Turns on led blinking implemented in the software, useful when |
| 82 | the hardware doesn't support led blinking. Half of the period |
| 83 | led will be ON and the rest time it will be OFF. Standard |
| 84 | led commands can be used to configure blinking. Does nothing |
| 85 | if driver supports hardware blinking. |
| 86 | WARNING: Blinking may be inaccurate during execution of time |
| 87 | consuming commands (ex. flash reading). Also it completely |
| 88 | stops during OS booting. |
| 89 | |
Masahiro Yamada | 645dbd6 | 2015-08-12 07:31:50 +0900 | [diff] [blame] | 90 | config SPL_LED |
Simon Glass | cce3aed | 2015-06-23 15:38:45 -0600 | [diff] [blame] | 91 | bool "Enable LED support in SPL" |
Tom Rini | 0a83cc2 | 2022-06-10 23:03:09 -0400 | [diff] [blame] | 92 | depends on SPL_DM |
Simon Glass | cce3aed | 2015-06-23 15:38:45 -0600 | [diff] [blame] | 93 | help |
| 94 | The LED subsystem adds a small amount of overhead to the image. |
| 95 | If this is acceptable and you have a need to use LEDs in SPL, |
| 96 | enable this option. You will need to enable device tree in SPL |
| 97 | for this to work. |
Simon Glass | 9267067 | 2017-04-10 11:34:52 -0600 | [diff] [blame] | 98 | |
Simon Glass | 5a9390b | 2015-06-23 15:38:46 -0600 | [diff] [blame] | 99 | config LED_GPIO |
| 100 | bool "LED support for GPIO-connected LEDs" |
| 101 | depends on LED && DM_GPIO |
| 102 | help |
| 103 | Enable support for LEDs which are connected to GPIO lines. These |
| 104 | GPIOs may be on the SoC or some other device which provides GPIOs. |
| 105 | The GPIO driver must used driver model. LEDs are configured using |
| 106 | the device tree. |
Masahiro Yamada | cc85b7b | 2015-07-26 02:46:26 +0900 | [diff] [blame] | 107 | |
Simon Glass | 965f4da | 2015-08-30 16:55:14 -0600 | [diff] [blame] | 108 | config SPL_LED_GPIO |
| 109 | bool "LED support for GPIO-connected LEDs in SPL" |
Tom Rini | 0a83cc2 | 2022-06-10 23:03:09 -0400 | [diff] [blame] | 110 | depends on SPL_LED && SPL_DM_GPIO |
Simon Glass | 965f4da | 2015-08-30 16:55:14 -0600 | [diff] [blame] | 111 | help |
| 112 | This option is an SPL-variant of the LED_GPIO option. |
| 113 | See the help of LED_GPIO for details. |
| 114 | |
Uri Mashiach | 3dc6f65 | 2017-01-19 10:51:05 +0200 | [diff] [blame] | 115 | config LED_STATUS |
| 116 | bool "Enable status LED API" |
| 117 | help |
| 118 | Allows common u-boot commands to use a board's leds to |
| 119 | provide status for activities like booting and downloading files. |
| 120 | |
| 121 | if LED_STATUS |
| 122 | |
| 123 | # Hidden constants |
| 124 | |
| 125 | config LED_STATUS_OFF |
| 126 | int |
| 127 | default 0 |
| 128 | |
| 129 | config LED_STATUS_BLINKING |
| 130 | int |
| 131 | default 1 |
| 132 | |
| 133 | config LED_STATUS_ON |
| 134 | int |
| 135 | default 2 |
| 136 | |
| 137 | # Hidden constants end |
| 138 | |
| 139 | config LED_STATUS_GPIO |
| 140 | bool "GPIO status LED implementation" |
| 141 | help |
| 142 | The status LED can be connected to a GPIO pin. In such cases, the |
| 143 | gpio_led driver can be used as a status LED backend implementation. |
| 144 | |
| 145 | config LED_STATUS_BOARD_SPECIFIC |
| 146 | bool "Specific board" |
| 147 | default y |
| 148 | help |
| 149 | LED support is only for a specific board. |
| 150 | |
| 151 | comment "LEDs parameters" |
| 152 | |
| 153 | config LED_STATUS0 |
| 154 | bool "Enable status LED 0" |
| 155 | |
| 156 | if LED_STATUS0 |
| 157 | |
| 158 | config LED_STATUS_BIT |
| 159 | int "identification" |
| 160 | help |
| 161 | CONFIG_LED_STATUS_BIT is passed into the __led_* functions to identify |
| 162 | which LED is being acted on. As such, the chosen value must be unique |
| 163 | with respect to the other CONFIG_LED_STATUS_BIT's. Mapping the value |
| 164 | to a physical LED is the responsibility of the __led_* function. |
| 165 | |
| 166 | config LED_STATUS_STATE |
| 167 | int "initial state" |
| 168 | range LED_STATUS_OFF LED_STATUS_ON |
| 169 | default LED_STATUS_OFF |
| 170 | help |
| 171 | Should be set one of the following: |
| 172 | 0 - off |
| 173 | 1 - blinking |
| 174 | 2 - on |
| 175 | |
| 176 | config LED_STATUS_FREQ |
| 177 | int "blink frequency" |
| 178 | range 2 10 |
| 179 | default 2 |
| 180 | help |
| 181 | The LED blink period calculated from LED_STATUS_FREQ: |
| 182 | LED_STATUS_PERIOD = CONFIG_SYS_HZ/LED_STATUS_FREQ |
| 183 | Values range: 2 - 10 |
| 184 | |
| 185 | endif # LED_STATUS0 |
| 186 | |
| 187 | config LED_STATUS1 |
| 188 | bool "Enable status LED 1" |
| 189 | |
| 190 | if LED_STATUS1 |
| 191 | |
| 192 | config LED_STATUS_BIT1 |
| 193 | int "identification" |
| 194 | help |
| 195 | CONFIG_LED_STATUS_BIT1 is passed into the __led_* functions to |
| 196 | identify which LED is being acted on. As such, the chosen value must |
| 197 | be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping |
| 198 | the value to a physical LED is the responsibility of the __led_* |
| 199 | function. |
| 200 | |
| 201 | config LED_STATUS_STATE1 |
| 202 | int "initial state" |
| 203 | range LED_STATUS_OFF LED_STATUS_ON |
| 204 | default LED_STATUS_OFF |
| 205 | help |
| 206 | Should be set one of the following: |
| 207 | 0 - off |
| 208 | 1 - blinking |
| 209 | 2 - on |
| 210 | |
| 211 | config LED_STATUS_FREQ1 |
| 212 | int "blink frequency" |
| 213 | range 2 10 |
| 214 | default 2 |
| 215 | help |
| 216 | The LED blink period calculated from LED_STATUS_FREQ1: |
| 217 | LED_STATUS_PERIOD1 = CONFIG_SYS_HZ/LED_STATUS_FREQ1 |
| 218 | Values range: 2 - 10 |
| 219 | |
| 220 | endif # LED_STATUS1 |
| 221 | |
| 222 | config LED_STATUS2 |
| 223 | bool "Enable status LED 2" |
| 224 | |
| 225 | if LED_STATUS2 |
| 226 | |
| 227 | config LED_STATUS_BIT2 |
| 228 | int "identification" |
| 229 | help |
| 230 | CONFIG_LED_STATUS_BIT2 is passed into the __led_* functions to |
| 231 | identify which LED is being acted on. As such, the chosen value must |
| 232 | be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping |
| 233 | the value to a physical LED is the responsibility of the __led_* |
| 234 | function. |
| 235 | |
| 236 | config LED_STATUS_STATE2 |
| 237 | int "initial state" |
| 238 | range LED_STATUS_OFF LED_STATUS_ON |
| 239 | default LED_STATUS_OFF |
| 240 | help |
| 241 | Should be set one of the following: |
| 242 | 0 - off |
| 243 | 1 - blinking |
| 244 | 2 - on |
| 245 | |
| 246 | config LED_STATUS_FREQ2 |
| 247 | int "blink frequency" |
| 248 | range 2 10 |
| 249 | default 2 |
| 250 | help |
| 251 | The LED blink period calculated from LED_STATUS_FREQ2: |
| 252 | LED_STATUS_PERIOD2 = CONFIG_SYS_HZ/LED_STATUS_FREQ2 |
| 253 | Values range: 2 - 10 |
| 254 | |
| 255 | endif # LED_STATUS2 |
| 256 | |
| 257 | config LED_STATUS3 |
| 258 | bool "Enable status LED 3" |
| 259 | |
| 260 | if LED_STATUS3 |
| 261 | |
| 262 | config LED_STATUS_BIT3 |
| 263 | int "identification" |
| 264 | help |
| 265 | CONFIG_LED_STATUS_BIT3 is passed into the __led_* functions to |
| 266 | identify which LED is being acted on. As such, the chosen value must |
| 267 | be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping |
| 268 | the value to a physical LED is the responsibility of the __led_* |
| 269 | function. |
| 270 | |
| 271 | config LED_STATUS_STATE3 |
| 272 | int "initial state" |
| 273 | range LED_STATUS_OFF LED_STATUS_ON |
| 274 | default LED_STATUS_OFF |
| 275 | help |
| 276 | Should be set one of the following: |
| 277 | 0 - off |
| 278 | 1 - blinking |
| 279 | 2 - on |
| 280 | |
| 281 | config LED_STATUS_FREQ3 |
| 282 | int "blink frequency" |
| 283 | range 2 10 |
| 284 | default 2 |
| 285 | help |
| 286 | The LED blink period calculated from LED_STATUS_FREQ3: |
| 287 | LED_STATUS_PERIOD3 = CONFIG_SYS_HZ/LED_STATUS_FREQ3 |
| 288 | Values range: 2 - 10 |
| 289 | |
| 290 | endif # LED_STATUS3 |
| 291 | |
| 292 | config LED_STATUS4 |
| 293 | bool "Enable status LED 4" |
| 294 | |
| 295 | if LED_STATUS4 |
| 296 | |
| 297 | config LED_STATUS_BIT4 |
| 298 | int "identification" |
| 299 | help |
| 300 | CONFIG_LED_STATUS_BIT4 is passed into the __led_* functions to |
| 301 | identify which LED is being acted on. As such, the chosen value must |
| 302 | be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping |
| 303 | the value to a physical LED is the responsibility of the __led_* |
| 304 | function. |
| 305 | |
| 306 | config LED_STATUS_STATE4 |
| 307 | int "initial state" |
| 308 | range LED_STATUS_OFF LED_STATUS_ON |
| 309 | default LED_STATUS_OFF |
| 310 | help |
| 311 | Should be set one of the following: |
| 312 | 0 - off |
| 313 | 1 - blinking |
| 314 | 2 - on |
| 315 | |
| 316 | config LED_STATUS_FREQ4 |
| 317 | int "blink frequency" |
| 318 | range 2 10 |
| 319 | default 2 |
| 320 | help |
| 321 | The LED blink period calculated from LED_STATUS_FREQ4: |
| 322 | LED_STATUS_PERIOD4 = CONFIG_SYS_HZ/LED_STATUS_FREQ4 |
| 323 | Values range: 2 - 10 |
| 324 | |
| 325 | endif # LED_STATUS4 |
| 326 | |
| 327 | config LED_STATUS5 |
| 328 | bool "Enable status LED 5" |
| 329 | |
| 330 | if LED_STATUS5 |
| 331 | |
| 332 | config LED_STATUS_BIT5 |
| 333 | int "identification" |
| 334 | help |
| 335 | CONFIG_LED_STATUS_BIT5 is passed into the __led_* functions to |
| 336 | identify which LED is being acted on. As such, the chosen value must |
| 337 | be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping |
| 338 | the value to a physical LED is the responsibility of the __led_* |
| 339 | function. |
| 340 | |
| 341 | config LED_STATUS_STATE5 |
| 342 | int "initial state" |
| 343 | range LED_STATUS_OFF LED_STATUS_ON |
| 344 | default LED_STATUS_OFF |
| 345 | help |
| 346 | Should be set one of the following: |
| 347 | 0 - off |
| 348 | 1 - blinking |
| 349 | 2 - on |
| 350 | |
| 351 | config LED_STATUS_FREQ5 |
| 352 | int "blink frequency" |
| 353 | range 2 10 |
| 354 | default 2 |
| 355 | help |
| 356 | The LED blink period calculated from LED_STATUS_FREQ5: |
| 357 | LED_STATUS_PERIOD5 = CONFIG_SYS_HZ/LED_STATUS_FREQ5 |
| 358 | Values range: 2 - 10 |
| 359 | |
| 360 | endif # LED_STATUS5 |
| 361 | |
| 362 | config LED_STATUS_BOOT_ENABLE |
| 363 | bool "Enable BOOT LED" |
| 364 | help |
| 365 | Enable to turn an LED on when the board is booting. |
| 366 | |
| 367 | if LED_STATUS_BOOT_ENABLE |
| 368 | |
| 369 | config LED_STATUS_BOOT |
| 370 | int "LED to light when the board is booting" |
| 371 | help |
| 372 | Valid enabled LED device number. |
| 373 | |
| 374 | endif # LED_STATUS_BOOT_ENABLE |
| 375 | |
| 376 | config LED_STATUS_RED_ENABLE |
| 377 | bool "Enable red LED" |
| 378 | help |
| 379 | Enable red status LED. |
| 380 | |
| 381 | if LED_STATUS_RED_ENABLE |
| 382 | |
| 383 | config LED_STATUS_RED |
| 384 | int "Red LED identification" |
| 385 | help |
| 386 | Valid enabled LED device number. |
| 387 | |
| 388 | endif # LED_STATUS_RED_ENABLE |
| 389 | |
| 390 | config LED_STATUS_YELLOW_ENABLE |
| 391 | bool "Enable yellow LED" |
| 392 | help |
| 393 | Enable yellow status LED. |
| 394 | |
| 395 | if LED_STATUS_YELLOW_ENABLE |
| 396 | |
| 397 | config LED_STATUS_YELLOW |
| 398 | int "Yellow LED identification" |
| 399 | help |
| 400 | Valid enabled LED device number. |
| 401 | |
| 402 | endif # LED_STATUS_YELLOW_ENABLE |
| 403 | |
| 404 | config LED_STATUS_BLUE_ENABLE |
| 405 | bool "Enable blue LED" |
| 406 | help |
| 407 | Enable blue status LED. |
| 408 | |
| 409 | if LED_STATUS_BLUE_ENABLE |
| 410 | |
| 411 | config LED_STATUS_BLUE |
| 412 | int "Blue LED identification" |
| 413 | help |
| 414 | Valid enabled LED device number. |
| 415 | |
| 416 | endif # LED_STATUS_BLUE_ENABLE |
| 417 | |
| 418 | config LED_STATUS_GREEN_ENABLE |
| 419 | bool "Enable green LED" |
| 420 | help |
| 421 | Enable green status LED. |
| 422 | |
| 423 | if LED_STATUS_GREEN_ENABLE |
| 424 | |
| 425 | config LED_STATUS_GREEN |
| 426 | int "Green LED identification" |
| 427 | help |
| 428 | Valid enabled LED device number (0-5). |
| 429 | |
| 430 | endif # LED_STATUS_GREEN_ENABLE |
| 431 | |
| 432 | config LED_STATUS_CMD |
| 433 | bool "Enable status LED commands" |
| 434 | |
| 435 | endif # LED_STATUS |
| 436 | |
Masahiro Yamada | cc85b7b | 2015-07-26 02:46:26 +0900 | [diff] [blame] | 437 | endmenu |