diff options
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/imxrt1050-evk/MAINTAINERS | 1 | ||||
-rw-r--r-- | board/freescale/imxrt1050-evk/imximage-nor.cfg | 41 | ||||
-rw-r--r-- | board/freescale/imxrt1050-evk/imximage.cfg | 10 | ||||
-rw-r--r-- | board/freescale/imxrt1050-evk/imxrt1050-evk.c | 7 |
4 files changed, 56 insertions, 3 deletions
diff --git a/board/freescale/imxrt1050-evk/MAINTAINERS b/board/freescale/imxrt1050-evk/MAINTAINERS index a872855..890825b 100644 --- a/board/freescale/imxrt1050-evk/MAINTAINERS +++ b/board/freescale/imxrt1050-evk/MAINTAINERS @@ -4,3 +4,4 @@ S: Maintained F: board/freescale/imxrt1050-evk F: include/configs/imxrt1050-evk.h F: configs/imxrt1050-evk_defconfig +F: configs/imxrt1050-evk_fspi_defconfig diff --git a/board/freescale/imxrt1050-evk/imximage-nor.cfg b/board/freescale/imxrt1050-evk/imximage-nor.cfg new file mode 100644 index 0000000..829be6c --- /dev/null +++ b/board/freescale/imxrt1050-evk/imximage-nor.cfg @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2024 + * Author(s): Jesse Taube <Mr.Bossman075@gmail.com> + */ + +#include <config.h> + +/* image version */ + +IMAGE_VERSION 2 + +/* + * Boot Device : one of + * spi/sd/nand/onenand, qspi/nor + */ + +BOOT_FROM nor + +/* + * Device Configuration Data (DCD) + * + * Each entry must have the format: + * Addr-type Address Value + * + * where: + * Addr-type register length (1,2 or 4 bytes) + * Address absolute address of the register + * value value to be stored in the register + */ + +/* + * 0x400AC044 is used to configure the flexram. + * Unfortunately setting all to OCRAM only works for MMC + * and setting all to DTCM only works for FLEXSPI NOR. + * This configuration fortunately works for both SPI and MMC. +*/ +/* Set first two banks FlexRAM as OCRAM(01b) and the rest to DTCM(10b) */ +DATA 4 0x400AC044 0x55aaaaaa +/* Use FLEXRAM_BANK_CFG to config FlexRAM */ +SET_BIT 4 0x400AC040 0x4 diff --git a/board/freescale/imxrt1050-evk/imximage.cfg b/board/freescale/imxrt1050-evk/imximage.cfg index f1f09fd..b30d852 100644 --- a/board/freescale/imxrt1050-evk/imximage.cfg +++ b/board/freescale/imxrt1050-evk/imximage.cfg @@ -29,7 +29,13 @@ BOOT_FROM sd * value value to be stored in the register */ -/* Set all FlexRAM as OCRAM(01b) */ -DATA 4 0x400AC044 0x55555555 +/* + * 0x400AC044 is used to configure the flexram. + * Unfortunately setting all to OCRAM only works for MMC + * and setting all to DTCM only works for FLEXSPI NOR. + * This configuration fortunately works for both SPI and MMC. +*/ +/* Set first two banks FlexRAM as OCRAM(01b) and the rest to DTCM(10b) */ +DATA 4 0x400AC044 0x55aaaaaa /* Use FLEXRAM_BANK_CFG to config FlexRAM */ SET_BIT 4 0x400AC040 0x4 diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c index 4b82ee5..4cc3def 100644 --- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c +++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c @@ -68,7 +68,12 @@ void spl_board_init(void) u32 spl_boot_device(void) { - return BOOT_DEVICE_MMC1; + /* There is no way to find the boot device so look if there is a valid IVT in RAM for MMC */ + u32 nor_ivt = *(u32 *)(CONFIG_SYS_LOAD_ADDR - 0xC00); + + if (nor_ivt == 0x402000d1) + return BOOT_DEVICE_MMC1; + return BOOT_DEVICE_NOR; } #endif |