mirror of
https://xff.cz/git/u-boot/
synced 2025-09-05 18:52:17 +02:00
sunxi: pinephone: Add support for optional LED feedback during boot
Signed-off-by: Ondrej Jirman <megous@megous.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
if ARCH_SUNXI
|
if ARCH_SUNXI
|
||||||
|
|
||||||
|
config PINEPHONE_LEDS
|
||||||
|
bool "Notify boot status via LEDs on PinePhone"
|
||||||
|
---help---
|
||||||
|
LED boot notification.
|
||||||
|
|
||||||
config SPL_LDSCRIPT
|
config SPL_LDSCRIPT
|
||||||
default "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds" if !ARM64
|
default "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds" if !ARM64
|
||||||
|
|
||||||
|
@@ -653,6 +653,12 @@ void sunxi_board_init(void)
|
|||||||
{
|
{
|
||||||
int power_failed = 0;
|
int power_failed = 0;
|
||||||
|
|
||||||
|
#ifdef CONFIG_PINEPHONE_LEDS
|
||||||
|
/* PD18:G PD19:R PD20:B */
|
||||||
|
gpio_request(SUNXI_GPD(18), "led:green");
|
||||||
|
gpio_direction_output(SUNXI_GPD(18), 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SY8106A_POWER
|
#ifdef CONFIG_SY8106A_POWER
|
||||||
power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
|
power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
|
||||||
#endif
|
#endif
|
||||||
@@ -994,6 +1000,15 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
|||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PINEPHONE_LEDS
|
||||||
|
gpio_request(SUNXI_GPD(18), "led:green");
|
||||||
|
gpio_direction_output(SUNXI_GPD(18), 0);
|
||||||
|
|
||||||
|
gpio_request(SUNXI_GPD(19), "led:blue");
|
||||||
|
gpio_direction_output(SUNXI_GPD(19), 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user