-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Extend STM32 QSPI with QER (SFDP, DTS), custom quad write opcode, and 1-1-4 read mode #45433
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
Extend STM32 QSPI with QER (SFDP, DTS), custom quad write opcode, and 1-1-4 read mode #45433
Conversation
da5815e to
e491229
Compare
dc3502b to
ca8104b
Compare
ca8104b to
15d6828
Compare
2249c64 to
c7152b0
Compare
|
Removes unused QE bit define. Signed-off-by: Georgij Cernysiov <[email protected]>
* Renames 4PP define to PP_1_4_4 * Adds PP_1_1_4 define That matches linux kernel defines a bit more. Signed-off-by: Georgij Cernysiov <[email protected]>
Adds Status Register 3 read and write opcode defines. Signed-off-by: Georgij Cernysiov <[email protected]>
Corrects type name in the comment for the DW15 QER field. Signed-off-by: Georgij Cernysiov <[email protected]>
Adds writeoc property to allow quad write opcode selection. Signed-off-by: Georgij Cernysiov <[email protected]>
Removes double line and log output regarding device initialization. Signed-off-by: Georgij Cernysiov <[email protected]>
Adds support for DTS writeoc. Uses 1-4-4 mode by default (as the original driver). Signed-off-by: Georgij Cernysiov <[email protected]>
Adds support for 1-4-4 and 1-1-4 read modes. SFDP is used to query for available read instructions, then the fastest one is used. Signed-off-by: Georgij Cernysiov <[email protected]>
Moves IS_ENABLE check from prepare program and read to the caller. Signed-off-by: Georgij Cernysiov <[email protected]>
Adds support for DTS quad_enable_requirements property. Signed-off-by: Georgij Cernysiov <[email protected]>
Parses SFDP QER related DW15 to use as the source for QER. Signed-off-by: Georgij Cernysiov <[email protected]>
Always include gpio header. Signed-off-by: Georgij Cernysiov <[email protected]>
There is no need in the `flag_quad_io_en` field. When QE enabling failed, then the driver `init` fails as well. There is no way to use qspi in quad mode if qe is not enabled. Signed-off-by: Georgij Cernysiov <[email protected]>
Use ternary operation and asserts to reduce the footprint and code size. Signed-off-by: Georgij Cernysiov <[email protected]>
c7152b0 to
689528b
Compare
|
Rebased, got rid of |
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.
A bit of commit number inflation, but I won't be picky this close to the DV freeze.
|
@nvlsianpu I'm going to merge this to make it in time for code freeze since the changes to the common SPI NOR header seem quite harmless. If I messed up, I apologize, and we can revert. |
|
Extends existing STM32 QSPI NOR driver.
Adds:
Support every QE requirement - can be specified in DTS. However, SFDP BFP DW15 bypasses the DTS value (if DW15 is present).
Add support to specify what quad program (write) opcode is going to be used:
PP_1_1_4(new)PP_1_4_4(used originally)Some flash ICs support a different set of opcodes for programming and reading. The inspiration is taken from the
nrf_qspi_nordriver, butspi_nordefines are used.Add support for 1-1-4 read mode. The driver auto-detects the fastest supported quad read mode from SFDP BFP
This PR enables STM32 QSPI NOR driver usage with different kinds of QSPI Flash ICs.
Tested using custom H750 board with W25Q128JVSIQ.
Flash test output