Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexspi imx9 support #264

Merged
merged 2 commits into from
Jul 5, 2024
Merged

Flexspi imx9 support #264

merged 2 commits into from
Jul 5, 2024

Conversation

joukkone
Copy link

@joukkone joukkone commented Jun 6, 2024

Pre-review for:

be77c57

Other patches are already merged to apache master

@joukkone joukkone requested a review from jlaitine June 6, 2024 06:02
Copy link

@jlaitine jlaitine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Do you plan to upstream this one to apache nuttx?

Copy link

@jlaitine jlaitine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add the common parts for NOR initialization to this same PR?

@jlaitine
Copy link

jlaitine commented Jul 5, 2024

I added the NOR driver part inside NuttX, added automatic detection for M25P devices. It is true that this needs to be extended if other than M25P devices are used, but I think this structure is a more solid starting point than copying NXP stuff blindly.

I modified the way how pages/sectors are treated for the MTD (page size is 256 bytes, subsector erase is 4K).
There was some really fishy cache operations, I tried to fix those as well.

Tested the stufff by opening the device, writing 3MB of data and reading it back. Seems to work

@jlaitine
Copy link

jlaitine commented Jul 5, 2024

This seems to be working, pushing it to upstream review.

joukkone and others added 2 commits July 5, 2024 10:46
…face

This is an initial FlexSPI SPI NOR MTD driver for IMX9

This supprts M25P SPI NOR on FlexSPI for now, and can later be extended to other
SPINOR devices if needed. The following configurations are needed to use this driver:
  CONFIG_IMX9_FLEXSPI_NOR=y
  CONFIG_MTD_M25P=y

In addition, board initialization logic needs to call the imx9_flexspi_nor_initialize
to receive a pointer to the mtd device.

Signed-off-by: Jukka Laitinen <[email protected]>
Co-authored-by: Jouni Ukkonen <[email protected]>
@jlaitine
Copy link

jlaitine commented Jul 5, 2024

Upstream review requested in https://github.com/tiiuae/saluki-nxp93/pull/7 . Let's wait with this until that gets merged to avoid unnecessary merge conflicts.

@jlaitine jlaitine requested a review from jpaali July 5, 2024 07:58
Copy link

@jpaali jpaali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jlaitine jlaitine merged commit 333a26d into master Jul 5, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants