-
Notifications
You must be signed in to change notification settings - Fork 8k
spi_mcux_lpspi: restore old driver and disable by default #97134
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
base: main
Are you sure you want to change the base?
spi_mcux_lpspi: restore old driver and disable by default #97134
Conversation
fa30beb
to
a989e63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not want to support and maintain two drivers. If you are having an issue with the current driver that is upstream, then make a bug report.
@decsny, it’s good that you don’t want to maintain the old driver — those who actually use it will take care of supporting it. |
You can keep a copy in your downstream project? |
Yes, I can keep a copy downstream. Similarly, you can develop the new driver outside the main branch. Still, it would be fair to first hear from those who actually rely on the LPSPI driver before discarding the old version. |
@AnElderlyFox it's in everyone's interest if you just make a bug report normally for whatever issue you're having. As far as I know the LPSPI driver in tree is stable and finally is enabling users who could not use LPSPI with Zephyr with the old version that didn't meet the API expectations that you are trying to re-add. Also, it's not a "new driver", it's a new version of the same driver, that has just been worked on a lot in the last year by a lot of people to the point that it is indeed very different now, because there was tons of different use cases that needed support that the old version didn't allow for. At each point it was tested successful by all the test case available and whenever a bug was found that the test case doesn't catch we add a test case. And even add some test case without a known bug just in case when there was suspicion about missing edge cases of the API, which expose some bugs sometimes on many drivers, not just NXP LPSPI. So if you really want to help, submit a bug report with your use case so we can fix the bug and potentially add more test coverage if something is missing, which would improve all of Zephyr, not just LPSPI.
You are suggesting we maintain and advertise a whole fork of zephyr for the single purpose of providing a SPI driver that actually works for most use cases? No, we put these fixes directly in upstream. |
Fixes zephyrproject-rtos#97270. Revert the old MCUX LPSPI driver to its original location to allow users to choose which implementation to use. The new driver remains under development and has shown instability and functional issues in some configurations. Providing the previous version ensures a stable and reliable option for users who prefer or require it. The restored driver was taken from commit <42511c80bacee5f072fc64b0c9d6dc068005e31b> (before it was moved to the new location). Signed-off-by: Isaev Denis <[email protected]>
Disabled the MCUX LPSPI driver by default to avoid conflicts with the SPI_NXP_LPSPI driver. Added a dependency to ensure that the MCUX LPSPI driver is not enabled when the new driver is selected. Signed-off-by: Isaev Denis <[email protected]>
a989e63
to
6d6bfe8
Compare
|
Description:
This pull request restores the previous
MCUX LPSPI
driver to its original location and disables it by default, providing a stable alternative to the new driver.Problem:
When using the
i.MX RT1062
withWinbond W25N01GVZEIG NAND flash
onzephyr:main
, built withZephyr SDK 0.17.4
, theYAFFS2
filesystem mounts correctly with thenew LPSPI
driver, but the partition contents appear corrupted: files are displayed as directories, and data cannot be accessed.Using the
old driver
resolves the issue, indicating that thenew driver
can behave unpredictably in some configurations. The problems likely manifest under high driver load, which makes them non-obvious and difficult to reproduce consistently. This unpredictability suggests that fixing or improving thenew driver
may require significant time.Providing the
old driver
as a stable alternative ensures reliable operation during this period and allows users to compare the behavior of both drivers. This backup option is particularly useful for users who want the new features of the Zephyr RTOS but experience issues with thenew driver
.Summary of changes:
Restore old driver:
Restores the MCUX LPSPI driver from commit 42511c8 (before relocation to NXP folder). This provides a proven, stable alternative while the new driver matures.
Disable by default:
The old driver is disabled by default to prevent conflicts with SPI_NXP_LPSPI.
How to use old driver:
No changes occur unless the new driver is explicitly disabled and the old driver is enabled via configuration.