Skip to content

Conversation

SuperHeroAbner
Copy link
Contributor

Add Zephyr XSPI driver as memc driver.
Add xspi psram and flash driver to handle those different memory cases. The goal is using them to cover all PSRAM and FLASH types. Currently they can only work with the memory on NXP RT700 board.
Porting them to the samples drivers/memc and drivers/spi_flash. RT700 cpu0 supports XSPI0(Flash used in XIP), XSPI1(PSRAM as default), XSPI2(PSRAM). The cpu2 supports XSPI2(PSRAM).

@SuperHeroAbner
Copy link
Contributor Author

@hakehuang Can you help to trigger the unit test?

@hakehuang
Copy link
Contributor

@hakehuang Can you help to trigger the unit test?

do you want to enable all spi flash testing based on this? if so, please update the board support list.

@SuperHeroAbner SuperHeroAbner force-pushed the support-xspi-on-rt700 branch 2 times, most recently from 1d8539d to cd8df3d Compare August 25, 2025 06:47
@SuperHeroAbner SuperHeroAbner force-pushed the support-xspi-on-rt700 branch 6 times, most recently from 8c0467f to a36ad82 Compare October 16, 2025 03:45
@hakehuang
Copy link
Contributor

board testing pass. on v4.2.0-5922-ga36ad82ca689

*** Booting Zephyr OS build v4.2.0-5922-ga36ad82ca689 *** flash-controller@0 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!! 
hakehuang
hakehuang previously approved these changes Oct 16, 2025
@SuperHeroAbner
Copy link
Contributor Author

@dleach02 Can we merge this PR for 4.3.0 release together with zephyrproject-rtos/hal_nxp#597

@dleach02
Copy link
Member

@SuperHeroAbner I rebased your PR to clear CI. Please note the comment on the HAL PR.
@mmahadevan108 this can be added to the HAL merge train

@ZhaoxiangJin ZhaoxiangJin force-pushed the support-xspi-on-rt700 branch from 3649b92 to 5e173b9 Compare October 23, 2025 12:13
@ZhaoxiangJin
Copy link
Contributor

help @SuperHeroAbner to rebase to the latest main

Add mcux xspi driver suppport. Add the flash and psram driver support based on xspi driver. Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
Move nxp,xspi.yaml from spi bindings to mtd, it should be flash controllor rather than simple bus controller. Delete the xspi flash mx25um51345g bindling yaml file which is useless. Enable flash and two psrams on RT700 core0 and one psram on core1. Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
Add flash and psram dts based on RT700 board resource. Add the clock and power setting for XSPI in board specfic initilization function. Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
Update the Kconfig to parse the dts. Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
Add memc sample for XSPI PSRAM. Add spi_flash sample for XSPI Nor Flash. Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
Update hal_nxp to latest main. Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
@ZhaoxiangJin ZhaoxiangJin force-pushed the support-xspi-on-rt700 branch from b95e436 to 2fe2385 Compare October 23, 2025 13:01
# FRAD configuration
start-address:
type: int
description: Start address of the region
Copy link
Contributor

Choose a reason for hiding this comment

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

What region?

description: Enable AHB read prefetch feature.

child-binding:
description: NXP XSPI configurations
Copy link
Contributor

@JarmouniA JarmouniA Oct 23, 2025

Choose a reason for hiding this comment

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

This child-binding doesn't seem to be used in DT, what is it for?

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