help mx6q boot from spi nor flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

help mx6q boot from spi nor flash

1,707 Views
lixuhui112
Contributor I

Hi everyone,

I have designed a custom i.MX6 board based on MCIMX6Q-SDB board and am planning to bootup from SPI NOR Flash. I have run the DDR Stress test and updated the calibration details in my u-boot file,but the uboot not bootup .My nor flash chip is S25FL064P .I just change the following:

1.mx6qsabresd.c

/*........................uart1..........................................*/

static iomux_v3_cfg_t const uart1_pads[] = {

    MX6_PAD_SD3_DAT6__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),

    MX6_PAD_SD3_DAT7__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),

};

/*............................spi nor......................................*/

#ifdef CONFIG_MXC_SPI

static iomux_v3_cfg_t const ecspi1_pads[] = {

    MX6_PAD_CSI0_DAT4__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),

    MX6_PAD_CSI0_DAT5__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL),

    MX6_PAD_CSI0_DAT6__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),

    MX6_PAD_CSI0_DAT7__GPIO5_IO25 | MUX_PAD_CTRL(NO_PAD_CTRL),

};

 

static void setup_spi(void)

{

    imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));

}

 

int board_spi_cs_gpio(unsigned bus, unsigned cs)

{

    return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(5, 25)) : -1;

}

#endif

 

2 mx6qsabresd_defconfig

 

CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/my_mx6q.cfg,MX6Q,SYS_BOOT_SPINOR"

CONFIG_ARM=y

CONFIG_TARGET_MX6SABRESD=y

CONFIG_SYS_MALLOC_F=y

CONFIG_SYS_MALLOC_F_LEN=0x400

CONFIG_DM=y

CONFIG_DM_THERMAL=y

 

I do not know if there are any problems,Can anyone guide me please

 

thank you very much !!!

 

Original Attachment has been moved to: MfgTool.log.zip

Labels (1)
Tags (2)
0 Kudos
2 Replies

856 Views
igorpadykov
NXP Employee
NXP Employee

Hi xuhui

Sabre SD design unfortunately does not allow to boot from

spi-nor, as described in attached Release Notes Table 7. Known

Issues and Workarounds. It is necessary to follow Sabre AI design,

steps for spi-nor programming are given in sect.7.5 Flash U-Boot on

SPI-NOR  i.MX_6Dual6Quad_Sabre-AI_Linux_User's_Guide.pdf

Porting new spi-nor is described in Porting Guide Chapter 5

Configuring the SPI NOR Flash.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

856 Views
lixuhui112
Contributor I

yes ,my board also made reference the Sabre AI design, I use the MFG TOOL down  my modified uboot on my boot ;

U-Boot 2015.04-14468-gd7d7c43-dirty (Jun 17 2016 - 15:42:33)

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz

CPU:   Temperature 49 C

Reset cause: POR

Board: MX6-SabreSD

I2C:   ready

DRAM:  1 GiB

PMIC:  PFUZE100 ID=0x10

MMC:   Warning: you configured more USDHC controllers(1) then supported by the board (3)

FSL_SDHC: 0

MMC Device 2 not found

No MMC card found

Using default environment

No panel detected: default to Hannstar-XGA

Display: Hannstar-XGA (1024x768)

In:    serial

Out:   serial

Err:   serial

MMC Device 2 not found

no mmc device at slot 2

Net:   FEC [PRIME]

Error: FEC address not set.

Boot from USB for mfgtools

Use default environment for                              mfgtools

Run bootcmd_mfg: run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};

Hit any key to stop autoboot:  0

Bad Linux ARM zImage magic!

=> sf probe

SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB

=>

but I'm not sure if uboot burned into the spi nor flash,I use this command:

  <LIST name="Nor Flash" desc="Choose Nor flash as media">    

    <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot.imx" ifdev="MX6Q">Loading U-boot</CMD>

  <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

   

    <CMD state="Updater" type="push" body="send" file="files/u-boot.imx" ifdev="MX6Q">Sending U-Boot</CMD>

    <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=1k seek=%seek%">write U-Boot to NOR flash</CMD>

    <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>

  </LIST>

and how can sure uboot is in nor flash

Thank you!!!

0 Kudos