multiple imx-flexspi-nor flash ICs #57483
-
Hello, I am working with the NXP RT1040. I have two flash ICs specifically is25wp064, one is used for the main flash for the NXP MCU and the second will be used for littlefs. Here is my dtsi Here is the DTS
}; Before I go into little fs, I have loaded the spi_flash example to do a basic read write operation and setting both devices show as being successful. example edit: I decided to verify this by putting a scope on the chip select lines and it shows that the same flash IC is being used and the second chip select isn't being selected. How would I select the second IC? the second ic is already denoted as is25wp064@1 and reg = <1>; |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
Hi @ShahinHaque97-Corintech , [Edited: this comment is out of date. The FlexSPI driver does support this now, see new comment below.] Currently the Zephyr FlexSPI driver does not support having multiple memory devices on the same FlexSPI. See this PR comment. If you are interested in adding this support, another discussion has details on the FlexSPI memory mapping with multiple chip selects. Best regards |
Beta Was this translation helpful? Give feedback.
-
I will reassign it to a different pin. Unfortunately, I have uart8_rx on the dqs pin for flexspi2, and the only alternative for uart8_rx is SEMC_DQS which needs to be floating. For now, I will reassign it to a regular lpspi |
Beta Was this translation helpful? Give feedback.
-
@ShahinHaque97-CT , FYI NXP added support for multiple memories on a single FlexSPI, see this merged PR #72528. Our plans changed from my previous comment. Trying to enable the MIMXRT685-EVK board, we found the limitations on that device do not allow simultaneous use of the two memories on that board. But we were able enable this on the RD-RW612-BGA board. Best regards |
Beta Was this translation helpful? Give feedback.
-
@DerekSnell I gave this a test today, I can confirm it still does not work on the IMXRT104X series chips, test was as follows: Added second CS mapping:
Added second flash IC onto our boards device tree:
Then I mapped a little FS partition onto it in our application overlay:
This did boot once and showed in the device tree and appeared to work, then I rebooted the device and it refused to boot at all, indicating when it formatted the LFS partition it actually overwrote part of the bootloader which was inside the main QSPI flash IC which is shares the bus with. Partially censored log below:
After rebooting following that log there was no more uart output at all, assumption: MCUboot was damaged |
Beta Was this translation helpful? Give feedback.
-
Hi @matt-wood-ct , The board we tested with multiple memories uses a slightly different implementation of the FlexSPI. It would be helpful to confirm the FlexSPI register settings after the FlexSPI is configured for both memories. Can you use a debugger and capture these FlexSPI registers for us on your board? Thank you |
Beta Was this translation helpful? Give feedback.
Hi @ShahinHaque97-Corintech ,
[Edited: this comment is out of date. The FlexSPI driver does support this now, see new comment below.]
Currently the Zephyr FlexSPI driver does not support having multiple memory devices on the same FlexSPI. See this PR comment.
If you are interested in adding this support, another discussion has details on the FlexSPI memory mapping with multiple chip selects. Best regards