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