Boot from SPI NOR on iMX 8M Mini

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Boot from SPI NOR on iMX 8M Mini

2,373件の閲覧回数
ondra1
Contributor I

I try to boot from SPI NOR connected to ECSPI2 interface on EVK board. I successfully prepared dtb file to activate spinor in Linux (5.4.24). After some patches in kernel module for CS0 (GPIO) I have working mtd device.

I installed U-boot into spi nor using dd on offset 0x400. I used working flash.bin build for sd. 

On EVK board I set dip switches for ecspi boot on spi2 cs0. I can watch expected 12MHz clock on SCK and from duration of transaction I calculated that system loads about 180kB of data.

But no activity on serial console and system hangs.

I modified boot data in IVT to  shorten loading data. I can see on oscilloscope, transaction is shorter -> boot rom parse IVT and boot data.

I modified U-boot and add some GPIO up/down into very early stages to watch activity on oscilloscope. My boot loader runs even on correct address (7e1000) but if processor runs some code placed more than 16kB from start it hangs.

It looks like boot rom loads only part of image.

Any help?

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

2,222件の閲覧回数
assarsson
Contributor I

We face the same problems. We've also connected a SPI flash memory to the ECSPI2 on the imx8mm evk. It's up and running in Linux (mtd), and we write the flash.bin (same as we use for the SD card) with offset 0x400.

When we select SPI NOR boot via ECSPI2 (using internal boot and BOOT_CFG), the boot rom starts reading from the flash, but no output on the console.

 

@igorpadykov can you please provide us with the same additional information?
@ondra1 do you mind sharing your changes?

0 件の賞賛
返信

1,924件の閲覧回数
tom_perman
Contributor III

Hi,

We have also been having issues with the iMX8MM SPI flash boot from ECSPI, on our own hardware design. 

@assarsson @igorpadykov @ondra1 - Can you share any information you have gathered?

Thanks,

Tom 

0 件の賞賛
返信

2,318件の閲覧回数
ondra1
Contributor I

Hi Igor,

thank you for reply. 

I tried to swap OCRAM and TCRAM in U-boot. OCRAM is used for image loading and TCRAM for data and stack. I had to write some init functions in U-boot sources to make ecspi working in SPL and load next  image. In the end I was successful and SPI boot so as recovery boot via SPI on my imx8mm-evk 

0 件の賞賛
返信

1,221件の閲覧回数
vignesh-baskaran
Contributor III

Hi @ondra1,

 

If possible can you share those steps, We were trying to do same.

0 件の賞賛
返信

2,319件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Miroslav

regarding this issue additional details were sent via mail.

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

0 件の賞賛
返信