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

STM32N6: add XSPI Flash support #85561

Merged
merged 4 commits into from
Mar 20, 2025

Conversation

gautierg-st
Copy link
Contributor

Add XSPI Flash support for STM32N6. Enable XSPI Flash on STM32N6570-DK and Nucleo N657X0.

@gautierg-st
Copy link
Contributor Author

Test results of samples/drivers/spi_flash/:

*** Booting Zephyr OS build v4.0.0-4948-gb6be482bbe68 ***

ospi-nor-flash@70000000 SPI flash testing
==========================

Perform test on single sector
Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!!

Perform test on multiple consecutive sectors
Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes at offset 0xff000
Data read matches data written. Good!!
Attempting to write 4 bytes at offset 0x100000
Data read matches data written. Good!!

kartben
kartben previously approved these changes Feb 12, 2025
@gautierg-st
Copy link
Contributor Author

Rebased to fix conflicts

kartben
kartben previously approved these changes Feb 13, 2025
@gautierg-st
Copy link
Contributor Author

Completed board docs with XSPI info

@gautierg-st
Copy link
Contributor Author

Rebase round 2

@gautierg-st gautierg-st assigned FRASTM and unassigned erwango Feb 14, 2025
#size-cells = <1>;
storage_partition: partition@3ff0000 {
label = "storage";
reg = <0xa0000 DT_SIZE_K(64)>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why does the address differ from the partition@3ff0000

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Old value that I forgot to update. Changed

@@ -86,6 +86,8 @@ The Zephyr ``stm32n6570_dk`` board supports the following hardware features:
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| XSPI | on-chip | External Flash |
+-----------+------------+-------------------------------------+
Copy link
Collaborator

Choose a reason for hiding this comment

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

External Memory ( flash or PSRAM )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@gautierg-st gautierg-st force-pushed the n6_add_xspi_flash branch 2 times, most recently from 71aa1d1 to b199c57 Compare March 17, 2025 16:14
Copy link
Collaborator

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

nitpicking comment

&xspim_p2_io6_pn10 &xspim_p2_io7_pn11>;
pinctrl-names = "default";
status = "okay";
mx25um51245g: ospi-nor-flash@70000000 {

This comment was marked as resolved.

Set VddIO 2 and 3 voltage to 1.8V

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add some ifdef to fix compilation error on STM32N6

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add XSPI2 support to STM32N6

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
erwango
erwango previously approved these changes Mar 19, 2025
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
storage_partition: partition@3ff0000 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

here also :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
storage_partition: partition@7ff0000 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

... and here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Enable XSPI external Flash for STM32N6570-DK and Nucleo N657X0 boards.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
@erwango erwango requested review from FRASTM and kartben March 20, 2025 08:40
@carlescufi carlescufi merged commit 6384096 into zephyrproject-rtos:main Mar 20, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants