10b11dbf7SMasahiro Yamadamenu "LED Support" 20b11dbf7SMasahiro Yamada 35917112cSSimon Glassconfig LED 45917112cSSimon Glass bool "Enable LED support" 55917112cSSimon Glass depends on DM 65917112cSSimon Glass help 75917112cSSimon Glass Many boards have LEDs which can be used to signal status or alerts. 85917112cSSimon Glass U-Boot provides a uclass API to implement this feature. LED drivers 95917112cSSimon Glass can provide access to board-specific LEDs. Use of the device tree 105917112cSSimon Glass for configuration is encouraged. 115917112cSSimon Glass 1228300dc5SÁlvaro Fernández Rojasconfig LED_BCM6328 1328300dc5SÁlvaro Fernández Rojas bool "LED Support for BCM6328" 1428300dc5SÁlvaro Fernández Rojas depends on LED && ARCH_BMIPS 1528300dc5SÁlvaro Fernández Rojas help 1628300dc5SÁlvaro Fernández Rojas This option enables support for LEDs connected to the BCM6328 1728300dc5SÁlvaro Fernández Rojas LED HW controller accessed via MMIO registers. 1828300dc5SÁlvaro Fernández Rojas HW blinking is supported and up to 24 LEDs can be controlled. 1928300dc5SÁlvaro Fernández Rojas All LEDs can blink at the same time but the delay is shared, which 2028300dc5SÁlvaro Fernández Rojas means that if one LED is set to blink at 100ms and then a different 2128300dc5SÁlvaro Fernández Rojas LED is set to blink at 200ms, both will blink at 200ms. 2228300dc5SÁlvaro Fernández Rojas 23*632889cfSÁlvaro Fernández Rojasconfig LED_BCM6358 24*632889cfSÁlvaro Fernández Rojas bool "LED Support for BCM6358" 25*632889cfSÁlvaro Fernández Rojas depends on LED && ARCH_BMIPS 26*632889cfSÁlvaro Fernández Rojas help 27*632889cfSÁlvaro Fernández Rojas This option enables support for LEDs connected to the BCM6358 28*632889cfSÁlvaro Fernández Rojas LED HW controller accessed via MMIO registers. 29*632889cfSÁlvaro Fernández Rojas HW has no blinking capabilities and up to 32 LEDs can be controlled. 30*632889cfSÁlvaro Fernández Rojas 3153378dacSSimon Glassconfig LED_BLINK 3253378dacSSimon Glass bool "Support LED blinking" 3353378dacSSimon Glass depends on LED 3453378dacSSimon Glass help 3553378dacSSimon Glass Some drivers can support automatic blinking of LEDs with a given 3653378dacSSimon Glass period, without needing timers or extra code to handle the timing. 3753378dacSSimon Glass This option enables support for this which adds slightly to the 3853378dacSSimon Glass code size. 3953378dacSSimon Glass 40f0cd2454SMasahiro Yamadaconfig SPL_LED 415917112cSSimon Glass bool "Enable LED support in SPL" 426a436c91SSimon Glass depends on SPL && SPL_DM 435917112cSSimon Glass help 445917112cSSimon Glass The LED subsystem adds a small amount of overhead to the image. 455917112cSSimon Glass If this is acceptable and you have a need to use LEDs in SPL, 465917112cSSimon Glass enable this option. You will need to enable device tree in SPL 475917112cSSimon Glass for this to work. 489b36f748SSimon Glass 495ac76badSSimon Glassconfig LED_GPIO 505ac76badSSimon Glass bool "LED support for GPIO-connected LEDs" 515ac76badSSimon Glass depends on LED && DM_GPIO 525ac76badSSimon Glass help 535ac76badSSimon Glass Enable support for LEDs which are connected to GPIO lines. These 545ac76badSSimon Glass GPIOs may be on the SoC or some other device which provides GPIOs. 555ac76badSSimon Glass The GPIO driver must used driver model. LEDs are configured using 565ac76badSSimon Glass the device tree. 570b11dbf7SMasahiro Yamada 586a436c91SSimon Glassconfig SPL_LED_GPIO 596a436c91SSimon Glass bool "LED support for GPIO-connected LEDs in SPL" 606a436c91SSimon Glass depends on SPL_LED && DM_GPIO 616a436c91SSimon Glass help 626a436c91SSimon Glass This option is an SPL-variant of the LED_GPIO option. 636a436c91SSimon Glass See the help of LED_GPIO for details. 646a436c91SSimon Glass 6579267eddSUri Mashiachconfig LED_STATUS 6679267eddSUri Mashiach bool "Enable status LED API" 6779267eddSUri Mashiach help 6879267eddSUri Mashiach Allows common u-boot commands to use a board's leds to 6979267eddSUri Mashiach provide status for activities like booting and downloading files. 7079267eddSUri Mashiach 7179267eddSUri Mashiachif LED_STATUS 7279267eddSUri Mashiach 7379267eddSUri Mashiach# Hidden constants 7479267eddSUri Mashiach 7579267eddSUri Mashiachconfig LED_STATUS_OFF 7679267eddSUri Mashiach int 7779267eddSUri Mashiach default 0 7879267eddSUri Mashiach 7979267eddSUri Mashiachconfig LED_STATUS_BLINKING 8079267eddSUri Mashiach int 8179267eddSUri Mashiach default 1 8279267eddSUri Mashiach 8379267eddSUri Mashiachconfig LED_STATUS_ON 8479267eddSUri Mashiach int 8579267eddSUri Mashiach default 2 8679267eddSUri Mashiach 8779267eddSUri Mashiach# Hidden constants end 8879267eddSUri Mashiach 8979267eddSUri Mashiachconfig LED_STATUS_GPIO 9079267eddSUri Mashiach bool "GPIO status LED implementation" 9179267eddSUri Mashiach help 9279267eddSUri Mashiach The status LED can be connected to a GPIO pin. In such cases, the 9379267eddSUri Mashiach gpio_led driver can be used as a status LED backend implementation. 9479267eddSUri Mashiach 9579267eddSUri Mashiachconfig LED_STATUS_BOARD_SPECIFIC 9679267eddSUri Mashiach bool "Specific board" 9779267eddSUri Mashiach default y 9879267eddSUri Mashiach help 9979267eddSUri Mashiach LED support is only for a specific board. 10079267eddSUri Mashiach 10179267eddSUri Mashiachcomment "LEDs parameters" 10279267eddSUri Mashiach 10379267eddSUri Mashiachconfig LED_STATUS0 10479267eddSUri Mashiach bool "Enable status LED 0" 10579267eddSUri Mashiach 10679267eddSUri Mashiachif LED_STATUS0 10779267eddSUri Mashiach 10879267eddSUri Mashiachconfig LED_STATUS_BIT 10979267eddSUri Mashiach int "identification" 11079267eddSUri Mashiach help 11179267eddSUri Mashiach CONFIG_LED_STATUS_BIT is passed into the __led_* functions to identify 11279267eddSUri Mashiach which LED is being acted on. As such, the chosen value must be unique 11379267eddSUri Mashiach with respect to the other CONFIG_LED_STATUS_BIT's. Mapping the value 11479267eddSUri Mashiach to a physical LED is the responsibility of the __led_* function. 11579267eddSUri Mashiach 11679267eddSUri Mashiachconfig LED_STATUS_STATE 11779267eddSUri Mashiach int "initial state" 11879267eddSUri Mashiach range LED_STATUS_OFF LED_STATUS_ON 11979267eddSUri Mashiach default LED_STATUS_OFF 12079267eddSUri Mashiach help 12179267eddSUri Mashiach Should be set one of the following: 12279267eddSUri Mashiach 0 - off 12379267eddSUri Mashiach 1 - blinking 12479267eddSUri Mashiach 2 - on 12579267eddSUri Mashiach 12679267eddSUri Mashiachconfig LED_STATUS_FREQ 12779267eddSUri Mashiach int "blink frequency" 12879267eddSUri Mashiach range 2 10 12979267eddSUri Mashiach default 2 13079267eddSUri Mashiach help 13179267eddSUri Mashiach The LED blink period calculated from LED_STATUS_FREQ: 13279267eddSUri Mashiach LED_STATUS_PERIOD = CONFIG_SYS_HZ/LED_STATUS_FREQ 13379267eddSUri Mashiach Values range: 2 - 10 13479267eddSUri Mashiach 13579267eddSUri Mashiachendif # LED_STATUS0 13679267eddSUri Mashiach 13779267eddSUri Mashiachconfig LED_STATUS1 13879267eddSUri Mashiach bool "Enable status LED 1" 13979267eddSUri Mashiach 14079267eddSUri Mashiachif LED_STATUS1 14179267eddSUri Mashiach 14279267eddSUri Mashiachconfig LED_STATUS_BIT1 14379267eddSUri Mashiach int "identification" 14479267eddSUri Mashiach help 14579267eddSUri Mashiach CONFIG_LED_STATUS_BIT1 is passed into the __led_* functions to 14679267eddSUri Mashiach identify which LED is being acted on. As such, the chosen value must 14779267eddSUri Mashiach be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping 14879267eddSUri Mashiach the value to a physical LED is the responsibility of the __led_* 14979267eddSUri Mashiach function. 15079267eddSUri Mashiach 15179267eddSUri Mashiachconfig LED_STATUS_STATE1 15279267eddSUri Mashiach int "initial state" 15379267eddSUri Mashiach range LED_STATUS_OFF LED_STATUS_ON 15479267eddSUri Mashiach default LED_STATUS_OFF 15579267eddSUri Mashiach help 15679267eddSUri Mashiach Should be set one of the following: 15779267eddSUri Mashiach 0 - off 15879267eddSUri Mashiach 1 - blinking 15979267eddSUri Mashiach 2 - on 16079267eddSUri Mashiach 16179267eddSUri Mashiachconfig LED_STATUS_FREQ1 16279267eddSUri Mashiach int "blink frequency" 16379267eddSUri Mashiach range 2 10 16479267eddSUri Mashiach default 2 16579267eddSUri Mashiach help 16679267eddSUri Mashiach The LED blink period calculated from LED_STATUS_FREQ1: 16779267eddSUri Mashiach LED_STATUS_PERIOD1 = CONFIG_SYS_HZ/LED_STATUS_FREQ1 16879267eddSUri Mashiach Values range: 2 - 10 16979267eddSUri Mashiach 17079267eddSUri Mashiachendif # LED_STATUS1 17179267eddSUri Mashiach 17279267eddSUri Mashiachconfig LED_STATUS2 17379267eddSUri Mashiach bool "Enable status LED 2" 17479267eddSUri Mashiach 17579267eddSUri Mashiachif LED_STATUS2 17679267eddSUri Mashiach 17779267eddSUri Mashiachconfig LED_STATUS_BIT2 17879267eddSUri Mashiach int "identification" 17979267eddSUri Mashiach help 18079267eddSUri Mashiach CONFIG_LED_STATUS_BIT2 is passed into the __led_* functions to 18179267eddSUri Mashiach identify which LED is being acted on. As such, the chosen value must 18279267eddSUri Mashiach be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping 18379267eddSUri Mashiach the value to a physical LED is the responsibility of the __led_* 18479267eddSUri Mashiach function. 18579267eddSUri Mashiach 18679267eddSUri Mashiachconfig LED_STATUS_STATE2 18779267eddSUri Mashiach int "initial state" 18879267eddSUri Mashiach range LED_STATUS_OFF LED_STATUS_ON 18979267eddSUri Mashiach default LED_STATUS_OFF 19079267eddSUri Mashiach help 19179267eddSUri Mashiach Should be set one of the following: 19279267eddSUri Mashiach 0 - off 19379267eddSUri Mashiach 1 - blinking 19479267eddSUri Mashiach 2 - on 19579267eddSUri Mashiach 19679267eddSUri Mashiachconfig LED_STATUS_FREQ2 19779267eddSUri Mashiach int "blink frequency" 19879267eddSUri Mashiach range 2 10 19979267eddSUri Mashiach default 2 20079267eddSUri Mashiach help 20179267eddSUri Mashiach The LED blink period calculated from LED_STATUS_FREQ2: 20279267eddSUri Mashiach LED_STATUS_PERIOD2 = CONFIG_SYS_HZ/LED_STATUS_FREQ2 20379267eddSUri Mashiach Values range: 2 - 10 20479267eddSUri Mashiach 20579267eddSUri Mashiachendif # LED_STATUS2 20679267eddSUri Mashiach 20779267eddSUri Mashiachconfig LED_STATUS3 20879267eddSUri Mashiach bool "Enable status LED 3" 20979267eddSUri Mashiach 21079267eddSUri Mashiachif LED_STATUS3 21179267eddSUri Mashiach 21279267eddSUri Mashiachconfig LED_STATUS_BIT3 21379267eddSUri Mashiach int "identification" 21479267eddSUri Mashiach help 21579267eddSUri Mashiach CONFIG_LED_STATUS_BIT3 is passed into the __led_* functions to 21679267eddSUri Mashiach identify which LED is being acted on. As such, the chosen value must 21779267eddSUri Mashiach be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping 21879267eddSUri Mashiach the value to a physical LED is the responsibility of the __led_* 21979267eddSUri Mashiach function. 22079267eddSUri Mashiach 22179267eddSUri Mashiachconfig LED_STATUS_STATE3 22279267eddSUri Mashiach int "initial state" 22379267eddSUri Mashiach range LED_STATUS_OFF LED_STATUS_ON 22479267eddSUri Mashiach default LED_STATUS_OFF 22579267eddSUri Mashiach help 22679267eddSUri Mashiach Should be set one of the following: 22779267eddSUri Mashiach 0 - off 22879267eddSUri Mashiach 1 - blinking 22979267eddSUri Mashiach 2 - on 23079267eddSUri Mashiach 23179267eddSUri Mashiachconfig LED_STATUS_FREQ3 23279267eddSUri Mashiach int "blink frequency" 23379267eddSUri Mashiach range 2 10 23479267eddSUri Mashiach default 2 23579267eddSUri Mashiach help 23679267eddSUri Mashiach The LED blink period calculated from LED_STATUS_FREQ3: 23779267eddSUri Mashiach LED_STATUS_PERIOD3 = CONFIG_SYS_HZ/LED_STATUS_FREQ3 23879267eddSUri Mashiach Values range: 2 - 10 23979267eddSUri Mashiach 24079267eddSUri Mashiachendif # LED_STATUS3 24179267eddSUri Mashiach 24279267eddSUri Mashiachconfig LED_STATUS4 24379267eddSUri Mashiach bool "Enable status LED 4" 24479267eddSUri Mashiach 24579267eddSUri Mashiachif LED_STATUS4 24679267eddSUri Mashiach 24779267eddSUri Mashiachconfig LED_STATUS_BIT4 24879267eddSUri Mashiach int "identification" 24979267eddSUri Mashiach help 25079267eddSUri Mashiach CONFIG_LED_STATUS_BIT4 is passed into the __led_* functions to 25179267eddSUri Mashiach identify which LED is being acted on. As such, the chosen value must 25279267eddSUri Mashiach be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping 25379267eddSUri Mashiach the value to a physical LED is the responsibility of the __led_* 25479267eddSUri Mashiach function. 25579267eddSUri Mashiach 25679267eddSUri Mashiachconfig LED_STATUS_STATE4 25779267eddSUri Mashiach int "initial state" 25879267eddSUri Mashiach range LED_STATUS_OFF LED_STATUS_ON 25979267eddSUri Mashiach default LED_STATUS_OFF 26079267eddSUri Mashiach help 26179267eddSUri Mashiach Should be set one of the following: 26279267eddSUri Mashiach 0 - off 26379267eddSUri Mashiach 1 - blinking 26479267eddSUri Mashiach 2 - on 26579267eddSUri Mashiach 26679267eddSUri Mashiachconfig LED_STATUS_FREQ4 26779267eddSUri Mashiach int "blink frequency" 26879267eddSUri Mashiach range 2 10 26979267eddSUri Mashiach default 2 27079267eddSUri Mashiach help 27179267eddSUri Mashiach The LED blink period calculated from LED_STATUS_FREQ4: 27279267eddSUri Mashiach LED_STATUS_PERIOD4 = CONFIG_SYS_HZ/LED_STATUS_FREQ4 27379267eddSUri Mashiach Values range: 2 - 10 27479267eddSUri Mashiach 27579267eddSUri Mashiachendif # LED_STATUS4 27679267eddSUri Mashiach 27779267eddSUri Mashiachconfig LED_STATUS5 27879267eddSUri Mashiach bool "Enable status LED 5" 27979267eddSUri Mashiach 28079267eddSUri Mashiachif LED_STATUS5 28179267eddSUri Mashiach 28279267eddSUri Mashiachconfig LED_STATUS_BIT5 28379267eddSUri Mashiach int "identification" 28479267eddSUri Mashiach help 28579267eddSUri Mashiach CONFIG_LED_STATUS_BIT5 is passed into the __led_* functions to 28679267eddSUri Mashiach identify which LED is being acted on. As such, the chosen value must 28779267eddSUri Mashiach be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping 28879267eddSUri Mashiach the value to a physical LED is the responsibility of the __led_* 28979267eddSUri Mashiach function. 29079267eddSUri Mashiach 29179267eddSUri Mashiachconfig LED_STATUS_STATE5 29279267eddSUri Mashiach int "initial state" 29379267eddSUri Mashiach range LED_STATUS_OFF LED_STATUS_ON 29479267eddSUri Mashiach default LED_STATUS_OFF 29579267eddSUri Mashiach help 29679267eddSUri Mashiach Should be set one of the following: 29779267eddSUri Mashiach 0 - off 29879267eddSUri Mashiach 1 - blinking 29979267eddSUri Mashiach 2 - on 30079267eddSUri Mashiach 30179267eddSUri Mashiachconfig LED_STATUS_FREQ5 30279267eddSUri Mashiach int "blink frequency" 30379267eddSUri Mashiach range 2 10 30479267eddSUri Mashiach default 2 30579267eddSUri Mashiach help 30679267eddSUri Mashiach The LED blink period calculated from LED_STATUS_FREQ5: 30779267eddSUri Mashiach LED_STATUS_PERIOD5 = CONFIG_SYS_HZ/LED_STATUS_FREQ5 30879267eddSUri Mashiach Values range: 2 - 10 30979267eddSUri Mashiach 31079267eddSUri Mashiachendif # LED_STATUS5 31179267eddSUri Mashiach 31279267eddSUri Mashiachconfig LED_STATUS_BOOT_ENABLE 31379267eddSUri Mashiach bool "Enable BOOT LED" 31479267eddSUri Mashiach help 31579267eddSUri Mashiach Enable to turn an LED on when the board is booting. 31679267eddSUri Mashiach 31779267eddSUri Mashiachif LED_STATUS_BOOT_ENABLE 31879267eddSUri Mashiach 31979267eddSUri Mashiachconfig LED_STATUS_BOOT 32079267eddSUri Mashiach int "LED to light when the board is booting" 32179267eddSUri Mashiach help 32279267eddSUri Mashiach Valid enabled LED device number. 32379267eddSUri Mashiach 32479267eddSUri Mashiachendif # LED_STATUS_BOOT_ENABLE 32579267eddSUri Mashiach 32679267eddSUri Mashiachconfig LED_STATUS_RED_ENABLE 32779267eddSUri Mashiach bool "Enable red LED" 32879267eddSUri Mashiach help 32979267eddSUri Mashiach Enable red status LED. 33079267eddSUri Mashiach 33179267eddSUri Mashiachif LED_STATUS_RED_ENABLE 33279267eddSUri Mashiach 33379267eddSUri Mashiachconfig LED_STATUS_RED 33479267eddSUri Mashiach int "Red LED identification" 33579267eddSUri Mashiach help 33679267eddSUri Mashiach Valid enabled LED device number. 33779267eddSUri Mashiach 33879267eddSUri Mashiachendif # LED_STATUS_RED_ENABLE 33979267eddSUri Mashiach 34079267eddSUri Mashiachconfig LED_STATUS_YELLOW_ENABLE 34179267eddSUri Mashiach bool "Enable yellow LED" 34279267eddSUri Mashiach help 34379267eddSUri Mashiach Enable yellow status LED. 34479267eddSUri Mashiach 34579267eddSUri Mashiachif LED_STATUS_YELLOW_ENABLE 34679267eddSUri Mashiach 34779267eddSUri Mashiachconfig LED_STATUS_YELLOW 34879267eddSUri Mashiach int "Yellow LED identification" 34979267eddSUri Mashiach help 35079267eddSUri Mashiach Valid enabled LED device number. 35179267eddSUri Mashiach 35279267eddSUri Mashiachendif # LED_STATUS_YELLOW_ENABLE 35379267eddSUri Mashiach 35479267eddSUri Mashiachconfig LED_STATUS_BLUE_ENABLE 35579267eddSUri Mashiach bool "Enable blue LED" 35679267eddSUri Mashiach help 35779267eddSUri Mashiach Enable blue status LED. 35879267eddSUri Mashiach 35979267eddSUri Mashiachif LED_STATUS_BLUE_ENABLE 36079267eddSUri Mashiach 36179267eddSUri Mashiachconfig LED_STATUS_BLUE 36279267eddSUri Mashiach int "Blue LED identification" 36379267eddSUri Mashiach help 36479267eddSUri Mashiach Valid enabled LED device number. 36579267eddSUri Mashiach 36679267eddSUri Mashiachendif # LED_STATUS_BLUE_ENABLE 36779267eddSUri Mashiach 36879267eddSUri Mashiachconfig LED_STATUS_GREEN_ENABLE 36979267eddSUri Mashiach bool "Enable green LED" 37079267eddSUri Mashiach help 37179267eddSUri Mashiach Enable green status LED. 37279267eddSUri Mashiach 37379267eddSUri Mashiachif LED_STATUS_GREEN_ENABLE 37479267eddSUri Mashiach 37579267eddSUri Mashiachconfig LED_STATUS_GREEN 37679267eddSUri Mashiach int "Green LED identification" 37779267eddSUri Mashiach help 37879267eddSUri Mashiach Valid enabled LED device number (0-5). 37979267eddSUri Mashiach 38079267eddSUri Mashiachendif # LED_STATUS_GREEN_ENABLE 38179267eddSUri Mashiach 38279267eddSUri Mashiachconfig LED_STATUS_CMD 38379267eddSUri Mashiach bool "Enable status LED commands" 38479267eddSUri Mashiach 38579267eddSUri Mashiachendif # LED_STATUS 38679267eddSUri Mashiach 3870b11dbf7SMasahiro Yamadaendmenu 388