imx: imx8mm-beacon: Enable FlexSPI in U-Boot
Subsystems (2)
PATCH v2 1/2 imx: imx8mm-beacon: Enable FlexSPI in U-Boot
In order to use the FlexSPI interface in U-Boot, configure the alias to make spi0 point to flexspi.
With that enabled, sf probe detects the QSPI part as:
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
---
V2: No Change
arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi +4 -0
@@ -6,6 +6,10 @@ #include "imx8mm-u-boot.dtsi" / { + aliases { + spi0 = &flexspi; + }; + wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>;
Signature · 1 line
2.34.1
PATCH v2 2/2 configs: imx: imx8mm_beacon: Add config option for QSPI booting
The imx8mm_beacon SOM has a QSPI part attached to the FSPI controller. Update the header and spl files to support booting from NOR flash and add imx8mm_beacon_fspi_defconfig to support this configuration.
---
V2: Rebase and rename CONFIG_SYS_UBOOT_BASE to CFG_SYS_UBOOT_BASE
board/beacon/imx8mm/spl.c +7 -0
@@ -36,6 +36,8 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)return BOOT_DEVICE_MMC2 ;case USB_BOOT :return BOOT_DEVICE_BOARD ; +case QSPI_BOOT : +return BOOT_DEVICE_NOR ;default :return BOOT_DEVICE_NONE ; }
@@ -46,6 +48,11 @@ static void spl_dram_init(void)ddr_init (&dram_timing); } +void spl_board_init (void ) +{ +arch_misc_init (); +} +#ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match (const char *name) {
configs/imx8mm_beacon_fspi_defconfig new file +155 -0
155 lines not on this page · raw message
include/configs/imx8mm_beacon.h +9 -0
@@ -9,8 +9,17 @@#include <linux/sizes.h> #include <asm/arch/imx-regs.h> +#define UBOOT_ITB_OFFSET 0x57C00 +#define FSPI_CONF_BLOCK_SIZE 0x1000 +#define UBOOT_ITB_OFFSET_FSPI \ + (UBOOT_ITB_OFFSET + FSPI_CONF_BLOCK_SIZE) +#ifdef CONFIG_FSPI_CONF_HEADER +#define CFG_SYS_UBOOT_BASE \ + (QSPI0_AMBA_BASE + UBOOT_ITB_OFFSET_FSPI) +#else #define CFG_SYS_UBOOT_BASE \ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) +#endif #ifdef CONFIG_SPL_BUILD /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
Signature · 1 line
2.34.1
PATCH v2 2/2 configs: imx: imx8mm_beacon: Add config option for QSPI booting
Quoted 4 lines
The
imx8mm_beaconSOM has a QSPI part attached to the FSPI controller. Update the header and spl files to support booting from NOR flash and addimx8mm_beacon_fspi_defconfigto support this configuration.Signed-off-by Adam Ford <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 1/2 imx: imx8mm-beacon: Enable FlexSPI in U-Boot
In reply to Adam FordQuoted 5 lines
In order to use the FlexSPI interface in U-Boot, configure
the alias to make spi0 point to flexspi.
With that enabled, sf probe detects the QSPI part as:
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiBSigned-off-by Adam Ford <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================