Skip to content

Conversation

anangl
Copy link
Contributor

@anangl anangl commented Sep 10, 2025

Replace previously cherry-picked fromlist commits with what was finally merged upstream.

anangl and others added 15 commits September 10, 2025 13:37
…ly-gpios" property"

This reverts commit fce86d0.

Signed-off-by: Andrzej Głąbek <[email protected]>
…itial Quad disabling"

This reverts commit 7cee84c.

Signed-off-by: Andrzej Głąbek <[email protected]>
…QER, add handling of OER"

This reverts commit a4d3616.

Signed-off-by: Andrzej Głąbek <[email protected]>
…commands"

This reverts commit bbf0567.

Signed-off-by: Andrzej Głąbek <[email protected]>
…P arrays"

This reverts commit d01522d.

Signed-off-by: Andrzej Głąbek <[email protected]>
Implement the Zephyr Flash Driver API for completeness.

Signed-off-by: Utsav Munendra <[email protected]>
(cherry picked from commit 19988ac)
Get parameters for used flash commands and requirements for enabling
Quad and Octal modes from dts uint8-arrays containing data read from
SFDP tables for particular flash chips.
Also introduce `pre_init` quirk that allows alteration of the above
parameters or complementation of them in a specific way for particular
flash chip families.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 29bc5bf)
- Use standard operation codes and parameters from SFDP for handling
  the used flash commands (allow to override some of them through dts
  with the `read-command`, `write-command`, and `rx-dummy` properties)
- Use all available erase types as specified by SFDP
- Allow using all IO modes
- Add support for switching to 4-byte addressing mode
- Use common functions for reading and writing of status registers
  and for enabling write operations
- Switch IO mode (between the target one and Single IO) in a common
  function that performs transfers and do it only when required for
  a given command
- Make checking of JEDEC ID at initialization optional

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit cafa288)
… handling of OER

Complete implementation of quad_enable_set() by adding support for all
possible Quad Enable Requirements (QER) as specified by the SFDP JEDEC
standard (JESD216). Add also corresponding octal_enable_set() to handle
Octal Enable Requirements.

Also remove initial waiting from mxicy_mx25r_post_switch_mode() which
became unneeded, as now such waiting is done in cmd_wrsr() which is
called at the end of quad_enable_set().

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 2fcb215)
Add implementation of the most common Soft Reset routine (sequence of
reset enable instruction 0x66 and reset instruction 0x99).

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit ff13d40)
…ad disabling

Using a GPIO reset for a flash chip that has a dual function pin
(RESET# or SIO3) and is to be used in Quad mode is rather a bad idea
and so is clearing of the Quad Enable bit at every initialization
of the flash driver, since this bit is usually non-volatile, so such
operation means unnecessary wearing of the flash chip. Soft Reset
should be use instead in such case.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit c2b537f)
…" property

Add support for supplying power to the flash chip by activation of
a GPIO specified through the "supply-gpios" property. Implementation
of gpio_reset() is also slightly modified so that it is consistent
with soft_reset() and the new power_supply() and so that all these
functions can use a common routine that performs a reset recovery
delay.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 835d773)
…family

When Octal IO mode is to be used with DDR in mx25u family chips,
bit 1 instead of 0 must be set in the Configuration Register 2 at
address 0.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 77f00f0)
…for nRF54H20 DK

It is no longer needed to specify the read command parameters in dts,
as the flash driver is capable of obtaining those from SFDP structures,
so the redundant properties are removed.

After commit 612fd94 got merged, both
the EXMIF and flash nodes in dts are not enabled by default so this
needs to be done in the overlay.

Although nrfutil is still not capable of programming the external
flash on nRF54H20 DK, thus `west flash` will not work in this case,
`nrf54h20dk/nrf54h20/cpuapp` is added as an allowed platform so that
the sample is at least built in CI for it.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 10740d6)
This is a follow-up to commit cafa288.

Bit masks should use the bitwise OR operator, not the logical one...

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 9223235)
@anangl anangl merged commit 9f038bf into nrfconnect:main Sep 11, 2025
19 checks passed
@anangl anangl deleted the update_flash_mspi_nor branch September 11, 2025 09:10
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.

4 participants