From 2a09eb6340e055be03008b75a7ca322a39482d3e Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Mon, 26 Aug 2019 06:47:07 +0000 Subject: board: atmel: sama5d2_wlsom1_ek: add qspi support and qspi boot config Add support for qspi memory on board. Created boot support for QSPI for both u-boot proper and SPL. Signed-off-by: Eugen Hristev --- board/atmel/sama5d27_wlsom1_ek/MAINTAINERS | 1 + board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'board') diff --git a/board/atmel/sama5d27_wlsom1_ek/MAINTAINERS b/board/atmel/sama5d27_wlsom1_ek/MAINTAINERS index 59671ac540..ff68cf01a3 100644 --- a/board/atmel/sama5d27_wlsom1_ek/MAINTAINERS +++ b/board/atmel/sama5d27_wlsom1_ek/MAINTAINERS @@ -5,3 +5,4 @@ S: Maintained F: board/atmel/sama5d27_wlsom1_ek/ F: include/configs/sama5d27_wlsom1_ek.h F: configs/sama5d27_wlsom1_ek_mmc_defconfig +F: configs/sama5d27_wlsom1_ek_qspiflash_defconfig diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c index 3663ae4a7a..19300483b5 100644 --- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c @@ -97,11 +97,28 @@ void spl_mmc_init(void) } #endif +#ifdef CONFIG_QSPI_BOOT +void spl_qspi_init(void) +{ + atmel_pio4_set_d_periph(AT91_PIO_PORTB, 5, 0); /* SCK */ + atmel_pio4_set_d_periph(AT91_PIO_PORTB, 6, 0); /* CS */ + atmel_pio4_set_d_periph(AT91_PIO_PORTB, 7, 0); /* IO0 */ + atmel_pio4_set_d_periph(AT91_PIO_PORTB, 8, 0); /* IO1 */ + atmel_pio4_set_d_periph(AT91_PIO_PORTB, 9, 0); /* IO2 */ + atmel_pio4_set_d_periph(AT91_PIO_PORTB, 10, 0); /* IO3 */ + + at91_periph_clk_enable(ATMEL_ID_QSPI1); +} +#endif + void spl_board_init(void) { #ifdef CONFIG_SD_BOOT spl_mmc_init(); #endif +#ifdef CONFIG_QSPI_BOOT + spl_qspi_init(); +#endif } void spl_display_print(void) -- cgit v1.2.3