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 | |
Simon Glass | 3bd0c46 | 2017-04-10 11:34:57 -0600 | [diff] [blame] | 31 | config 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 | |
Masahiro Yamada | 645dbd6 | 2015-08-12 07:31:50 +0900 | [diff] [blame] | 40 | config SPL_LED |
Simon Glass | cce3aed | 2015-06-23 15:38:45 -0600 | [diff] [blame] | 41 | bool "Enable LED support in SPL" |
Simon Glass | 965f4da | 2015-08-30 16:55:14 -0600 | [diff] [blame] | 42 | depends on SPL && SPL_DM |
Simon Glass | cce3aed | 2015-06-23 15:38:45 -0600 | [diff] [blame] | 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. |
Simon Glass | 9267067 | 2017-04-10 11:34:52 -0600 | [diff] [blame] | 48 | |
Simon Glass | 5a9390b | 2015-06-23 15:38:46 -0600 | [diff] [blame] | 49 | config 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. |
Masahiro Yamada | cc85b7b | 2015-07-26 02:46:26 +0900 | [diff] [blame] | 57 | |
Simon Glass | 965f4da | 2015-08-30 16:55:14 -0600 | [diff] [blame] | 58 | config 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 | |
Uri Mashiach | 3dc6f65 | 2017-01-19 10:51:05 +0200 | [diff] [blame] | 65 | config 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 | |
| 71 | if LED_STATUS |
| 72 | |
| 73 | # Hidden constants |
| 74 | |
| 75 | config LED_STATUS_OFF |
| 76 | int |
| 77 | default 0 |
| 78 | |
| 79 | config LED_STATUS_BLINKING |
| 80 | int |
| 81 | default 1 |
| 82 | |
| 83 | config LED_STATUS_ON |
| 84 | int |
| 85 | default 2 |
| 86 | |
| 87 | # Hidden constants end |
| 88 | |
| 89 | config 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 | |
| 95 | config LED_STATUS_BOARD_SPECIFIC |
| 96 | bool "Specific board" |
| 97 | default y |
| 98 | help |
| 99 | LED support is only for a specific board. |
| 100 | |
| 101 | comment "LEDs parameters" |
| 102 | |
| 103 | config LED_STATUS0 |
| 104 | bool "Enable status LED 0" |
| 105 | |
| 106 | if LED_STATUS0 |
| 107 | |
| 108 | config 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 | |
| 116 | config 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 | |
| 126 | config 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 | |
| 135 | endif # LED_STATUS0 |
| 136 | |
| 137 | config LED_STATUS1 |
| 138 | bool "Enable status LED 1" |
| 139 | |
| 140 | if LED_STATUS1 |
| 141 | |
| 142 | config 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 | |
| 151 | config 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 | |
| 161 | config 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 | |
| 170 | endif # LED_STATUS1 |
| 171 | |
| 172 | config LED_STATUS2 |
| 173 | bool "Enable status LED 2" |
| 174 | |
| 175 | if LED_STATUS2 |
| 176 | |
| 177 | config 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 | |
| 186 | config 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 | |
| 196 | config 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 | |
| 205 | endif # LED_STATUS2 |
| 206 | |
| 207 | config LED_STATUS3 |
| 208 | bool "Enable status LED 3" |
| 209 | |
| 210 | if LED_STATUS3 |
| 211 | |
| 212 | config 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 | |
| 221 | config 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 | |
| 231 | config 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 | |
| 240 | endif # LED_STATUS3 |
| 241 | |
| 242 | config LED_STATUS4 |
| 243 | bool "Enable status LED 4" |
| 244 | |
| 245 | if LED_STATUS4 |
| 246 | |
| 247 | config 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 | |
| 256 | config 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 | |
| 266 | config 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 | |
| 275 | endif # LED_STATUS4 |
| 276 | |
| 277 | config LED_STATUS5 |
| 278 | bool "Enable status LED 5" |
| 279 | |
| 280 | if LED_STATUS5 |
| 281 | |
| 282 | config 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 | |
| 291 | config 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 | |
| 301 | config 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 | |
| 310 | endif # LED_STATUS5 |
| 311 | |
| 312 | config LED_STATUS_BOOT_ENABLE |
| 313 | bool "Enable BOOT LED" |
| 314 | help |
| 315 | Enable to turn an LED on when the board is booting. |
| 316 | |
| 317 | if LED_STATUS_BOOT_ENABLE |
| 318 | |
| 319 | config LED_STATUS_BOOT |
| 320 | int "LED to light when the board is booting" |
| 321 | help |
| 322 | Valid enabled LED device number. |
| 323 | |
| 324 | endif # LED_STATUS_BOOT_ENABLE |
| 325 | |
| 326 | config LED_STATUS_RED_ENABLE |
| 327 | bool "Enable red LED" |
| 328 | help |
| 329 | Enable red status LED. |
| 330 | |
| 331 | if LED_STATUS_RED_ENABLE |
| 332 | |
| 333 | config LED_STATUS_RED |
| 334 | int "Red LED identification" |
| 335 | help |
| 336 | Valid enabled LED device number. |
| 337 | |
| 338 | endif # LED_STATUS_RED_ENABLE |
| 339 | |
| 340 | config LED_STATUS_YELLOW_ENABLE |
| 341 | bool "Enable yellow LED" |
| 342 | help |
| 343 | Enable yellow status LED. |
| 344 | |
| 345 | if LED_STATUS_YELLOW_ENABLE |
| 346 | |
| 347 | config LED_STATUS_YELLOW |
| 348 | int "Yellow LED identification" |
| 349 | help |
| 350 | Valid enabled LED device number. |
| 351 | |
| 352 | endif # LED_STATUS_YELLOW_ENABLE |
| 353 | |
| 354 | config LED_STATUS_BLUE_ENABLE |
| 355 | bool "Enable blue LED" |
| 356 | help |
| 357 | Enable blue status LED. |
| 358 | |
| 359 | if LED_STATUS_BLUE_ENABLE |
| 360 | |
| 361 | config LED_STATUS_BLUE |
| 362 | int "Blue LED identification" |
| 363 | help |
| 364 | Valid enabled LED device number. |
| 365 | |
| 366 | endif # LED_STATUS_BLUE_ENABLE |
| 367 | |
| 368 | config LED_STATUS_GREEN_ENABLE |
| 369 | bool "Enable green LED" |
| 370 | help |
| 371 | Enable green status LED. |
| 372 | |
| 373 | if LED_STATUS_GREEN_ENABLE |
| 374 | |
| 375 | config LED_STATUS_GREEN |
| 376 | int "Green LED identification" |
| 377 | help |
| 378 | Valid enabled LED device number (0-5). |
| 379 | |
| 380 | endif # LED_STATUS_GREEN_ENABLE |
| 381 | |
| 382 | config LED_STATUS_CMD |
| 383 | bool "Enable status LED commands" |
| 384 | |
| 385 | endif # LED_STATUS |
| 386 | |
Masahiro Yamada | cc85b7b | 2015-07-26 02:46:26 +0900 | [diff] [blame] | 387 | endmenu |