summaryrefslogtreecommitdiff
path: root/board/atmel
diff options
context:
space:
mode:
authorEugen Hristev <eugen.hristev@microchip.com>2019-08-26 06:47:07 +0000
committerEugen Hristev <eugen.hristev@microchip.com>2019-10-08 09:16:11 +0300
commit2a09eb6340e055be03008b75a7ca322a39482d3e (patch)
tree9da141700724563a2d972056718a55ca118d7384 /board/atmel
parent06e0da70ca0bfc9d909af044c82d66261fe47dd3 (diff)
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 <eugen.hristev@microchip.com>
Diffstat (limited to 'board/atmel')
-rw-r--r--board/atmel/sama5d27_wlsom1_ek/MAINTAINERS1
-rw-r--r--board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c17
2 files changed, 18 insertions, 0 deletions
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)