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