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?
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?
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
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
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!
-----------------------------------------------------------------------------------------------------------------------