summaryrefslogtreecommitdiff
path: root/board/atmel/sama5d2_icp/sama5d2_icp.c
diff options
context:
space:
mode:
authorEugen Hristev <eugen.hristev@microchip.com>2019-05-03 16:26:53 +0300
committerEugen Hristev <eugen.hristev@microchip.com>2019-05-15 09:34:22 +0300
commitbc2d313d68f8b8f21438d4e52ebb932cd4ce83b8 (patch)
tree9dbae89fccb826c79f0fb31399a08306097a6bb1 /board/atmel/sama5d2_icp/sama5d2_icp.c
parent2950c514e8fc2c9d6a48cd7187521bc648dc679e (diff)
downloadu-boot-bc2d313d68f8b8f21438d4e52ebb932cd4ce83b8.tar.xz
board: atmel: sama5d2_icp: enable green led on SPL completion
Enable the green led on SPL completion. Red led has no pulldown and it will be lighted by default when the board starts up. If the PMIC is not configured to enable LDO2, the leds will not light. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Diffstat (limited to 'board/atmel/sama5d2_icp/sama5d2_icp.c')
-rw-r--r--board/atmel/sama5d2_icp/sama5d2_icp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c
index f55ea2c6f8..1593e2bd4e 100644
--- a/board/atmel/sama5d2_icp/sama5d2_icp.c
+++ b/board/atmel/sama5d2_icp/sama5d2_icp.c
@@ -79,6 +79,13 @@ static void board_can_stdby_dis(void)
atmel_pio4_set_pio_output(AT91_PIO_PORTB, 25, 0);
}
+static void board_leds_init(void)
+{
+ atmel_pio4_set_pio_output(AT91_PIO_PORTB, 0, 0); /* RED */
+ atmel_pio4_set_pio_output(AT91_PIO_PORTB, 1, 1); /* GREEN */
+ atmel_pio4_set_pio_output(AT91_PIO_PORTA, 31, 0); /* BLUE */
+}
+
/* deassert reset lines for external periph in case of warm reboot */
static void board_reset_additional_periph(void)
{
@@ -118,6 +125,7 @@ void spl_board_init(void)
#endif
board_reset_additional_periph();
board_can_stdby_dis();
+ board_leds_init();
}
void spl_display_print(void)