board: sunxi: enable status LED in SPL
PATCH 1/1 board: sunxi: enable status LED in SPL
For some systems, such as the PinePhone, there is no way for the end user to make sure the system is indeed booting before the boot script is executed, which takes several seconds. Therefore, it can be useful to provide early visual feedback as soon as possible.
In order achieve this goal, this patch initializes the status LED (if configured) in the SPL.
---
board/sunxi/board.c | 7 +++++++ 1 file changed, 7 insertions(+)
board/sunxi/board.c +7 -0
@@ -40,6 +40,9 @@#include <spl.h> #include <sy8106a.h> #include <asm/setup.h> +#ifdef CONFIG_LED_STATUS +#include <status_led.h> +#endif #if definedCONFIG_VIDEO_LCD_PANEL_I2C && !(definedCONFIG_SPL_BUILD )/* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */
@@ -610,6 +613,10 @@ void sunxi_board_init(void) {int power_failed =0 ; +#ifdef CONFIG_LED_STATUS +status_led_init (); +#endif +#ifdef CONFIG_SY8106A_POWER power_failed =sy8106a_set_vout1 (CONFIG_SY8106A_VOUT1_VOLT );#endif
Signature · 1 line
2.26.1
PATCH 1/1 board: sunxi: enable status LED in SPL
Quoted 5 lines · Arnaud Ferraris
For some systems, such as the PinePhone, there is no way for the end user to make sure the system is indeed booting before the boot script is executed, which takes several seconds. Therefore, it can be useful to provide early visual feedback as soon as possible.
Don't you have a splash screen on this device, so that users have a visibility? generally consumer devices do have.
Jagan.
PATCH 1/1 board: sunxi: enable status LED in SPL
Hi Jagan,
Le 01/05/2020 ? 18:43, Jagan Teki a ?crit?:
Quoted 10 lines
Quoted 5 lines · Arnaud Ferraris
For some systems, such as the PinePhone, there is no way for the end user to make sure the system is indeed booting before the boot script is executed, which takes several seconds. Therefore, it can be useful to provide early visual feedback as soon as possible.
Don't you have a splash screen on this device, so that users have a visibility? generally consumer devices do have.
Actually, I would hit the same problem (late visual feedback) with a splash screen: we would need to wait for u-boot to be fully loaded, which takes too much time.
(plus, the DE2 video driver only supports HDMI out for now, and I don't have the skills to add MIPI-DSI support)
Having the status LED set up in the SPL allows almost-instant visual feedback, which is what I'm looking for here.
Regards,
Arnaud