Have a custom device based on the i.MX6Q processor and have some problem with booting up from SPI-NOR flash.
Using the same file of u-boot.bin burn to SD card,eMMC and SPI-NOR flash.
It can booting up from SD card and eMMC successfully.
But boot up from SPI-NOR flash, when I use the command of "print".
There is no environment variable.
CPU: Freescale i.MX6 family TO1.2 at 792 MHz
Thermal sensor with ratio = 189
Temperature: 31 C, calibration data 0x5a95097d
mx6q pll1: 792MHz
mx6q pll2: 528MHz
mx6q pll3: 480MHz
mx6q pll8: 50MHz
ipg clock : 66000000Hz
ipg per clock : 66000000Hz
uart clock : 80000000Hz
cspi clock : 60000000Hz
ahb clock : 132000000Hz
axi clock : 264000000Hz
emi_slow clock: 132000000Hz
ddr clock : 528000000Hz
usdhc1 clock : 198000000Hz
usdhc2 clock : 198000000Hz
usdhc3 clock : 198000000Hz
usdhc4 clock : 198000000Hz
nfc clock : 24000000Hz
Board: i.MX6Q-SABRESD: unknown-board Board: 0x63012 [POR ]
Boot Device: SPI NOR
I2C: ready
DRAM: 1 GB
MMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2,FSL_USDHC: 3
Card did not respond to voltage select!
MMC init failed
In: serial
Out: serial
Err: serial
Found PFUZE100! deviceid=10,revid=11
Net: got MAC address from IIM: 00:04:9f:02:b1:af
FEC0
MX6Q SABRESD U-Boot > print
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
Environment size: 53/8188 bytes
MX6Q SABRESD U-Boot >
SPI-NOR flash connect to SPI3.The chip select is cs0.
I burn the u-boot image to SPI-NOR flash by MfgTool.
Does someone know what is the problem may be?
Do I need to config the pin of SPI3 no the code of u-boot?
What can I have a try?
Solved! Go to Solution.
For SPI NOR flash support, you can reference to the uboot head file "include/configs/mx6q_sabrelite.h", this board was designed for SPI NOR boot.
You should make sure there is the followed setting in your uboot config file:
#define CONFIG_CMD_SPI
#define CONFIG_CMD_SF
#ifdef CONFIG_CMD_SF
#define CONFIG_FSL_SF 1
#define CONFIG_SPI_FLASH_IMX_SST 1
#define CONFIG_SPI_FLASH_CS 0
#define CONFIG_IMX_ECSPI
#define IMX_CSPI_VER_2_3 1
#define MAX_SPI_BYTES (64 * 4)
#endif
#elif defined(CONFIG_FSL_ENV_IN_SF)
#define CONFIG_ENV_IS_IN_SPI_FLASH 1
#define CONFIG_ENV_SPI_CS 0
#define CONFIG_ENV_OFFSET (768 * 1024)
#else
For SPI NOR flash support, you can reference to the uboot head file "include/configs/mx6q_sabrelite.h", this board was designed for SPI NOR boot.
You should make sure there is the followed setting in your uboot config file:
#define CONFIG_CMD_SPI
#define CONFIG_CMD_SF
#ifdef CONFIG_CMD_SF
#define CONFIG_FSL_SF 1
#define CONFIG_SPI_FLASH_IMX_SST 1
#define CONFIG_SPI_FLASH_CS 0
#define CONFIG_IMX_ECSPI
#define IMX_CSPI_VER_2_3 1
#define MAX_SPI_BYTES (64 * 4)
#endif
#elif defined(CONFIG_FSL_ENV_IN_SF)
#define CONFIG_ENV_IS_IN_SPI_FLASH 1
#define CONFIG_ENV_SPI_CS 0
#define CONFIG_ENV_OFFSET (768 * 1024)
#else
HI Qiang:
I want to update uboot2013.
my step:
1.MX6QSABRELITE U-Boot > tftp u-boot.imx //Load address: 0x12000000
2.MX6QSABRELITE U-Boot > sf probe
3.MX6QSABRELITE U-Boot > sf erase 0 50000
4.MX6QSABRELITE U-Boot > sf write 12000000 0 4ed14 // uboot2013 size is 4ed14
But I reboot,my board without serial print information.
If I update uboot2009,it is Success.
please help me ! thank you!
I solved the problem:
sf probe
sf erase 0 +0x50000
sf write 0x10800000 0x400 0x50000
but I don't understand why 0x400 as the starting address?
please!
maybe you used uboot 2014, right, as we did NOT add 0x400 offset on uboot image from uboot 2014, so you need to program from offset 0x400 on spi flash. you can compare the uboot binary content between uboot 2009 and uboot 2014.
Hi, Carmili
As far as I know, we did NOT have spi nor uboot enabled for i.MX6Q SabreSD board, only have it in SabreAuto board. So can you let me know which config you used to build spi -nor u-boot you flashed into the board? We can see that in include/configs/mx6q_sabreauto_spi-nor.h, there is definition about CONFIG_FSL_ENV_IN_SF and the offset of ENV, you may need to check them.