Skip to content

Conversation

@ashiroji
Copy link
Contributor

Modify the SPI Nor driver to be able to have multiple instances at the same time

This patch is heavily inspired by the at45 driver. It was tested on the nRF5340 DK by using the external spi memory two times. Macros were improved by de-nordic

Note: this PR is duplicate of a previous one.
The original PR was closed because it became unusable do to a mistake that I made.
Original PR: #55735

Modify the SPI Nor driver to be able to have multiple instances at
the same time.

This patch is heavily inspired by the at45 driver.
It was tested on the nRF5340 DK by using the external spi memory two times.
Macros were improved by de-nordic

Signed-off-by: Mehdi Zemzem <mehdi.zemzem2@gmail.com>
@ashiroji ashiroji force-pushed the Add_MultInstance_Support_for_SPI_Flash branch from 19e95cf to e2c36dc Compare March 19, 2024 09:41
@de-nordic de-nordic requested review from Laczen and nordicjm March 19, 2024 15:29
@de-nordic
Copy link
Contributor

@benner Please take a look at this PR, you have been interested in the previous instance of it.

@de-nordic de-nordic requested a review from anangl March 19, 2024 18:33
Copy link
Contributor

@de-nordic de-nordic left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@benner
Copy link
Contributor

benner commented Mar 19, 2024

@benner Please take a look at this PR, you have been interested in the previous instance of it.

I'll tests but it maybe take a few days. ATM I don't have this board.

@benner
Copy link
Contributor

benner commented Mar 20, 2024

Tested on 280fd59 commit - works as expected. Good work!

@benner
Copy link
Contributor

benner commented Mar 20, 2024

👍

@nordicjm
Copy link
Contributor

Tested on 280fd59 commit - works as expected. Good work!

Please approve PR

@nordicjm nordicjm requested a review from fabiobaltieri March 20, 2024 14:53
Copy link
Member

@fabiobaltieri fabiobaltieri left a comment

Choose a reason for hiding this comment

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

wow, serious optimization work going on here, probably more than was strictly necessary but hey props to you folks, I'm now looking at some of the drivers under my area for pulling some of these tricks there :-)

@de-nordic
Copy link
Contributor

de-nordic commented Mar 20, 2024

wow, serious optimization work going on here, probably more than was strictly necessary but hey props to you folks, I'm now looking at some of the drivers under my area for pulling some of these tricks there :-)

@fabiobaltieri You may want to wait for this PR: #70385
I have fixed one of the macros systemwide, but did not want to keep this PR waiting for my PR to got through.

@fabiobaltieri fabiobaltieri added the DNM This PR should not be merged (Do Not Merge) label Mar 20, 2024
@fabiobaltieri
Copy link
Member

fabiobaltieri commented Mar 20, 2024

cool thanks for the heads up @de-nordic, that one has 1h left before it's eligible, I'll try to keep an eye on it and do it in 1h :-)

@de-nordic
Copy link
Contributor

de-nordic commented Mar 20, 2024

cool thanks for the heads up @de-nordic, that one has 1h left before it's eligible, I'll try to keep an eye on it and do it in 1h :-)

Ah, you get me wrong. Get this PR in. What I meant is that @ashiroji has completed his PR before I have worked out my fix. Let this one in. I have already made the author wait entire release to make this PR through.
What I meant is that if you are going to work on your stuff, you may want to wait.

@fabiobaltieri fabiobaltieri removed the DNM This PR should not be merged (Do Not Merge) label Mar 20, 2024
@fabiobaltieri
Copy link
Member

fabiobaltieri commented Mar 20, 2024

Ok got it now, thanks! Dropped the tag then, this will have to bake for a bit longer regardless.

@ashiroji
Copy link
Contributor Author

Ok got it now, thanks! Dropped the tag then, this will have to bake for a bit longer regardless.

Thank you. Can I get an estimate of how long to wait please?

@fabiobaltieri fabiobaltieri merged commit adedf14 into zephyrproject-rtos:main Mar 21, 2024
@fabiobaltieri
Copy link
Member

fabiobaltieri commented Mar 21, 2024

Thank you. Can I get an estimate of how long to wait please?

The PR has to be out for two (business) days normally, more details here https://docs.zephyrproject.org/latest/project/dev_env_and_tools.html#review-time

@de-nordic
Copy link
Contributor

Congrats @ashiroji, this is it: the PR is finally in. Thanks for waiting.

@ashiroji
Copy link
Contributor Author

@de-nordic , thank you for your support!

@benner
Copy link
Contributor

benner commented Mar 21, 2024

I home similar thing will be done with QSPI (at least for STM32 MCU's)

@ashiroji
Copy link
Contributor Author

I home similar thing will be done with QSPI (at least for STM32 MCU's)

I didn't look into that, but maybe it's as simple as repeating what was done here?

@benner
Copy link
Contributor

benner commented Mar 21, 2024

I home similar thing will be done with QSPI (at least for STM32 MCU's)

I didn't look into that, but maybe it's as simple as repeating what was done here?

I looked. It's similar but also different in other ways. I probably will look into it when I will have spare time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants