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