All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] board: sunxi: enable status LED in SPL
@ 2020-04-22 10:37 Arnaud Ferraris
  2020-05-01 16:43 ` Jagan Teki
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaud Ferraris @ 2020-04-22 10:37 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
---

 board/sunxi/board.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 6afea6ef42..e0424a56ba 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -40,6 +40,9 @@
 #include <spl.h>
 #include <sy8106a.h>
 #include <asm/setup.h>
+#ifdef CONFIG_LED_STATUS
+#include <status_led.h>
+#endif
 
 #if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_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
-- 
2.26.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] board: sunxi: enable status LED in SPL
  2020-04-22 10:37 [PATCH] board: sunxi: enable status LED in SPL Arnaud Ferraris
@ 2020-05-01 16:43 ` Jagan Teki
  2020-05-06 11:06   ` Arnaud Ferraris
  0 siblings, 1 reply; 3+ messages in thread
From: Jagan Teki @ 2020-05-01 16:43 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 22, 2020 at 4:07 PM Arnaud Ferraris
<arnaud.ferraris@collabora.com> wrote:
>
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] board: sunxi: enable status LED in SPL
  2020-05-01 16:43 ` Jagan Teki
@ 2020-05-06 11:06   ` Arnaud Ferraris
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaud Ferraris @ 2020-05-06 11:06 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

Le 01/05/2020 ? 18:43, Jagan Teki a ?crit?:
> On Wed, Apr 22, 2020 at 4:07 PM Arnaud Ferraris
> <arnaud.ferraris@collabora.com> wrote:
>>
>> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-06 11:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 10:37 [PATCH] board: sunxi: enable status LED in SPL Arnaud Ferraris
2020-05-01 16:43 ` Jagan Teki
2020-05-06 11:06   ` Arnaud Ferraris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.