Commit graph zephyr/drivers/memc
Author SHA1 Message Date
Sven Ginka
0947bcca5a drivers: memc: sam_smc: configure SAME70 SMC mode fields
The current driver is prepared for the SAM4 which has a
8-bit interface only. This commit adds optional config
to support also 16-bit interfaces for the SAME7 family.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
Co-authored-by: Pieter De Gendt <pieter.degendt@gmail.com>
2026-07-27 11:36:41 -07:00
Dhanoo Surasarang
0db903f479 drivers: memc: is66wv: Assign endianness from DT
Replace the hardcoded MSPI_XFER_LITTLE_ENDIAN value in
MSPI_DEVICE_CONFIG_INIT() with DT_ENUM_IDX_OR(), so the
init_cfg endian field is driven by the mspi-endian property
of the device node when present, falling back to big-endian
when the property is absent.

Signed-off-by: Dhanoo Surasarang <dhanoo.surasarang@nordicsemi.no>
2026-07-23 16:08:59 +02:00
Richard Wheatley
24ac9afbd6 drivers: mspi: rename MSPI_XIP to MSPI_MEMMAP
XIP in Zephyr is a software configuration concept (CONFIG_XIP). The MSPI
feature gated by MSPI_XIP only memory-maps the device into the SoC
address space; the mapped region can be used for plain data access as
well as code execution. Rename the feature to MEMMAP to reflect what it
actually does:

- CONFIG_MSPI_XIP -> CONFIG_MSPI_MEMMAP
- CONFIG_FLASH_MSPI_XIP_READ -> CONFIG_FLASH_MSPI_MEMMAP_READ
- struct mspi_xip_cfg -> struct mspi_memmap_cfg
- enum mspi_xip_permit / MSPI_XIP_READ_* -> mspi_memmap_permit /
  MSPI_MEMMAP_READ_*
- mspi_xip_config() -> mspi_memmap_config(), driver API entry
  xip_config -> memmap_config
- MSPI_XIP_CONFIG_DT{,_INST,_NO_CHECK} -> MSPI_MEMMAP_CONFIG_DT{,...}
- MSPI_XIP_CFG_STRUCT_DECLARE / MSPI_XIP_BASE_ADDR_{DECLARE,INIT} ->
  MSPI_MEMMAP_*
- devicetree property xip-config -> memmap-config

Vendor HAL symbols (am_hal_mspi_xip_*) and DesignWare register names,
where XIP is the hardware documentation terminology, are unchanged.

The MSPI API is experimental, so no deprecated aliases are provided;
a migration guide entry is added in a separate commit. Add missing
Doxygen comments on new API symbols. Add missing SPDX header to the
nrf54h20dk code_relocation_nocopy overlay touched by this rename.

Fixes #104657

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2026-07-18 10:26:30 -04:00
Swift Tian
ed16d687b5 drivers: mspi: update compat string in device drivers
The compat string is updated in device drivers to align with
changes in binding files.
Added depends on $(dt_compat_on_bus,$(DT_COMPAT_[DEVICE]),mspi)
to device Kconfig.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2026-07-10 08:51:14 -05:00
Camille BAUD
a0473c3a2f drivers: bflb: extend shared drivers with BL616CL support
Add support for BL616CL in shared drivers

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-07-08 10:01:48 +02:00
William Markezana
a8de134052 drivers: memc: add BL808 UHS PSRAM driver, enable on M1S Dock
Add a controller and PHY driver for the BL808 UHS PSRAM. The PHY read/write
eye is calibrated at boot by sweeping the DQS/DQ delay taps and latency, so
any supported rate works without per-rate constants. Add the devicetree
nodes and enable on the M1S Dock.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-07-02 12:58:45 -04:00
Dhanoo Surasarang
c628a3dc26 drivers: memc: Add IS66WV PSRAM driver over MSPI
Generic MSPI driver for the ISSI IS66/67WV Serial PSRAM family
(both wrapped-burst WVS and continuous WVR variants).

Implements MEMC read/write for bus-transaction access via MSPI.
When CONFIG_MSPI_XIP=y and xip-config is present in DT with
enable=true, also implements get_mem_base so the memcpy path
is used automatically on controllers with a memory-mapped
aperture.

Signed-off-by: Dhanoo Surasarang <dhanoo.surasarang@nordicsemi.no>
2026-06-25 15:21:42 +02:00
Erwan Gouriou
cb60c30213 drivers: stm32: xspi: remove local xspim setup paths
Drop duplicated HAL_XSPIM_Config fallback code from STM32 XSPI
flash, MSPI, and MEMC drivers.

With manager setup centralized in the common XSPIM driver and
explicit xspim devicetree nodes, XSPI consumer drivers no longer
need to configure XSPIM directly.

Assisted-by: GitHub Copilot:GPT-5.3-Codex west
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-06-22 14:25:57 +02:00
Camille BAUD
16b8db7fbf drivers: bflb: Convert EFUSEs to OTP
Use new OTP API instead of syscon

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-02 20:19:36 -04:00
Aksel Skauge Mellbye
b0344892f7 manifest: Update hal_silabs
Update hal_silabs to new HAL versions:

* SiSDK 2025.12.3
* WiSeConnect 4.0.2

This HAL update requires a minor change to the `memc` driver
for SiWx91x because an API has been renamed.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-05-07 13:19:13 +01:00
Sarah Younis
44d34aaade drivers: memc: mspi_aps_z8: Add APS256/APS6408L RLC/WLC mapping
This commit adds support for APS256 and APS6408L in RLC/WLC
configuration. This includes a dedicated mapping for these
variants.
also this commit updates:
   - Read/write length handling for APS256/APS6408L
   - Vendor ID read sequence to support APS256/APS6408L
     register behavior

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
2026-04-27 14:24:44 +02:00
Sara Touqan
83eb8da4ae drivers: memc: mspi_aps_z8: add STM32 timing support
This commit introduces the stm32 timing configuration

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
2026-04-27 14:24:44 +02:00
Ruijia Wang
2971661db1 drivers: memc: flexspi: add apply_pinctrl and update_lut APIs
Add memc_flexspi_apply_pinctrl() for configuring additional FlexSPI
port pins when init is skipped due to XIP, and memc_flexspi_update_lut()
for runtime LUT updates using a stack buffer to avoid XIP pointer
rejection.

Guard all irq_lock() calls with CONFIG_FLASH_MCUX_FLEXSPI_XIP so
non-XIP systems do not incur unnecessary interrupt latency.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2026-04-22 12:52:05 +02:00
Krisztian Szilvasi
7ee1146a5b drivers: memc: fix compiler warnings for stm32 ospi psram
shared_multi_heap_add expects the region parameter to be
a non-const parameter; if const is passed, it still discards
it, but generates warnings.

Signed-off-by: Krisztian Szilvasi <krisztian@atym.io>
2026-03-30 15:02:52 -05:00
Pisit Sawangvonganan
c259c78097 drivers: fix typo in (interrupt_controller, led_strip, lora, memc, mfd)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/interrupt_controller`
- `drivers/led_strip`
- `drivers/lora`
- `drivers/memc`
- `drivers/mfd`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Erwan Gouriou
fec56d3076 soc: stm32: common: Add xspi manager
Implement a device driver for XSPI manager.
This allows to define the xspi controllers configuration that should
be applied towards the xspi IO ports:
- Muxed
- Swapped
- ...

Since its configuration has impact on final application location and
implies the deactivation of xspi clocks, it should be run only at fsbl
stage and not later.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-03-20 20:46:57 +09:00
Francois Ramu
ac98131ff0 drivers: memc: stm32_xspi_psram: add support for STM32H5E/F
Name the XSPI 1/2 depending on the stm32 series.
It could be mixed between XSPI or OCTOSPI depending
on the module HAL.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-03-18 15:21:14 -05:00
Jiafei Pan
0a703e6ece drivers: memc_mcux_flexspi: enable MMIO mapping
Adding MMIO memory mapping support for the flexspi memc driver.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2026-03-12 11:33:24 +01:00
Mathieu Choplain
a11688fab5 drivers: *: stm32: don't check if clock device is ready
If the clock device (i.e., RCC) failed to initialize, we have bigger
problems than trying to call clock_control_{off,on,configure} on it.
Don't bother checking to save some footprint.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-13 18:59:16 +00:00
Benjamin Cabé
b295fe1bc5 drivers: memc: use proper essential type to initialize boolean variables
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized with true/false, not 1/0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-04 13:52:38 +01:00
Ha Duong Quang
6313d3d6f7 drivers: memc: add NXP S32 XSPI controller for K5
add NXP S32 XSPI controller for K5

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2026-02-03 08:20:27 -06:00
Arthur Gay
b6e40c34bd drivers: memc: stm32_xspi_psram: make refresh configurable in dt
Limit a transaction to a maximum length. Each PSRAM may specify
different configuration.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-01-30 05:57:34 -06:00
Arthur Gay
89b5151851 drivers: memc: stm32_ospi_psram: make refresh configurable in dt
Limit a transaction to a maximum length. Each PSRAM may specify
different configuration.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-01-30 05:57:34 -06:00
Nikhil Namjoshi
c8f8fab1ed drivers: memc: Fix copyright and add example DTS config
Example DTS config comment is meant to help users of the
driver, with the PSRAM device tree configuration.

Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
2025-12-20 09:16:38 +01:00
Nikhil Namjoshi
1a31990457 drivers: memc: Add imx-flexspi-is66wvs8m8 driver
Tested:
Verified that reading and writing data to the PSRAM
with MCU's FlexSPI controller in Quad Mode, works as
expected.

Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
2025-12-20 09:16:38 +01:00
Martin Hoff
ff3637bf83 soc: silabs: siwx91x: enabled clock control by default for siwx91x soc
Enable clock control by default for siwx91x SoCs. Moreover, most
drivers for siwx91x soc depend on clock control, but didn't declare
it.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-12-02 15:18:53 -05:00
Josuah Demangeon
30950b888d style: drivers: sort Kconfig and CMake includes
Use the "zephyr-keep-sorted-start/stop" comment to have CI check
the alphabetical order of includes, to help reducing the chance
of conflicts while contributing drivers.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-11-17 13:48:03 -05:00
Etienne Carriere
b0ccb2295f drivers: stm32: use STM32_CLOCK_INFO_BY_NAME() and friends
Use STM32_CLOCK_INFO(), STM32_DT_INST_CLOCK_INFO(),
STM32_CLOCK_INFO_BY_NAME() and STM32_DT_INST_CLOCK_INFO_BY_NAME()
helper macros in STM32 drivers.

Using these macros ensure the clock division factor is properly
populated according to DT information. Prior these changes some
drivers only got the bus and bits position information and missed
the clock division information which is fine only when this division
factor information is 0.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-14 15:26:17 +02:00
Alain Volmat
679a6c6ec6 memc: stm32_xspi_psram: avoid XSPIM_Config if running from flash
Avoid calling the HAL_XSPIM_Config function if the app is running
from flash in order to avoid locking since HAL_XSPIM_Config is once
turning off each XSPI instance when performing the configuration.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-11-05 11:35:04 +02:00
Alain Volmat
299e067f8f drivers: memc: stm32_xspi_psram: avoid hardcode to XSPI1
The PSRAM could well be plugged to the XSPI2 instead of XSPI1
hence allow configuration of the IOPort and avoid forcing the
ChipSelect in order to allow working on both XSPI1 or XSPI2.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-11-05 11:35:04 +02:00
Alain Volmat
d604af86b0 drivers: memc: stm32_xspi_psram: use XSPI_HandleTypeDef ptr at init
Avoid copying the whole XSPI_HandleTypeDef structure into the
init function and use a pointer since the structure is already part
of the _data structure.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-11-05 11:35:04 +02:00
Camille BAUD
b75a846ad0 divers: memc: Add BL61x PSRAM controller
Driver for BL61x's PSRAM controller

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-10-24 20:19:06 -04:00
Guillaume Gautier
004c613e25 drivers: stm32: replace MODIFY_REG HAL macro by stm32_reg_modify_bits
For all STM32 drivers and SoC, replace the MODIFY_REG macro (defined in
the STM32 HAL) by stm32_reg_modify_bits defined in Zephyr.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 08:58:25 -07:00
Ruijia Wang
e8bb85ee69 drivers: xspi: add NXP xspi driver
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>
2025-10-24 08:56:59 -07:00
Andre Heinemans
35396b1a0e drivers: memc_mcux_flexspi: force applying OVRDVAL
Enable this kconfig setting to force using a specific raw value for the
OVRDVAL field in the DLLCR registers.

This option gives more granularity than the 'data-valid-time' field in
the dts. The unit of 'data-valid-time' is nanoseconds while the unit of
OVRDVAL are raw delay cells.

Normally the 'data-valid-time' on any 'nxp,imx-flexspi-device' device
will set the OVRDVAL and OVRDEN fields in the DLLCR register
but works only when the 'rx-clock-source' is configured to '#0 External
input from DQS pad' and the frequency <= 100MHz.

Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
2025-10-20 19:17:39 -04:00
Etienne Carriere
1c809f3c8a drivers: memc: test STM32 HAL return value in SDRAM driver
Add missing test of some HAL functions return value.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-10-16 17:13:16 +03:00
Etienne Carriere
b4a9874baf drivers: memc: test STM32 HAL return value in OSPI PSRAM driver
Add missing test of some HA functions return value.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-10-16 17:13:16 +03:00
Jérôme Pouiller
e4c3090586 drivers: memc: siwx91x: Do not override clock configuration
In the original HAL, sl_si91x_psram_init() and sl_si91x_psram_uninit() were
also in charge of configuring the pinctrl and the clocks. A workaround
have been introduced to avoid change in pinctrl but they still changed the
clock configuration.

We definitely need to expose the clock configuration to Zephyr users. The
HAL has been patched to split the sl_si91x_psram_*init() function in
smaller pieces. So it is possible to configure the devic without changing
the clock or the pinctrl. Let's use these new functions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-10-14 18:53:47 +02:00
Jérôme Pouiller
bb0b45dd53 drivers: memc: siwx91x: Drop orphan struct
PSRAMSecureSegments is in fact orphan.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-10-14 18:53:47 +02:00
Missael Maciel
4dee6c0cd2 drivers: memory: aps6404l: Removed addressshift field from APS6404L driver
Memory APS6404L does not support address shift feature.
Since it is being configured for different platforms that uses this
memory, this is cauing an error while building.

Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
2025-10-13 18:13:01 -04:00
Arthur Gay
b62be03552 drivers: memc: stm32_xspi_psram: fix command size in x8 mode
This patch fixes PSRAM initialization logic in x8 mode by ensuring that
the data line mode configuration accurately reflects the io-x16-mode
property specified in the device tree.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2025-10-10 12:59:42 -04:00
Arthur Gay
d1ea7534c6 drivers: memc: stm32_ospi_psram: make NCS boundary configurable in dt
Limit a transaction to a boundary of aligned addresses. Each PSRAM may
specify different configuration.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2025-10-02 16:48:11 +02:00
Arthur Gay
1e966ba478 drivers: memc: stm32_xspi_psram: make NCS boundary configurable in dt
Limit a transaction to a boundary of aligned addresses. Each PSRAM may
specify different configuration.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2025-10-02 16:48:11 +02:00
Mario Paja
f52855b048 drivers: memc: add driver for stm32 ospi psram
Add a driver for STM32U5 OSPI PSRAM in memory mapped mode.

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-09-25 09:24:59 +02:00
Alain Volmat
9cc26d64e3 drivers: memc: stm32: removal of sdram1/sdram2/psram sections handling
SDRAM1 / SDRAM2 / PSRAM sections were being referenced in order to make
them accessible for the framebuffer. This is now addressed via the
mechanism provided by Zephyr hence this is no more necessary.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-09-19 08:28:22 -04:00
Pete Johanson
9e7313d982 drivers: memc: MAX32 memc linker support improvements
In order to allow the linker to place certain objects into external RAM,
e.g. heaps, adjust the memc initialization level to PRE_KERNEL_1, allowing
clock control and memc to come up before priority objects like heaps are
initialized.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2025-08-23 05:11:25 +02:00
Georgij Černyšiov
f38a32617a drivers: memc: stm32: FMC NOR/PSRAM add bank validation
Ensure NSBank values are validated at build time.
That helps to identify and fix incorrect bank values.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2025-08-18 17:49:20 +02:00
Georgij Černyšiov
6df089676d drivers: memc: stm32: FMC NOR/PSRAM refactor
Simplifies the driver code:
* Use existing FMC_NORSRAM_DEVICE and FMC_NORSRAM_EXTENDED_DEVICE
  defines. No need to keep references to them in the driver's config.
* Refine initialization loop.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2025-08-18 17:49:20 +02:00
Georgij Černyšiov
54e16c4ad2 drivers: mipi_dbi: stm32: get fmc frequency correctly
Use clock api to get correct FMC clock frequency.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2025-07-23 09:34:08 +02:00
Raymond Lei
a93a80be82 drivers: nxp: flexspi: fix hyper flash hang issue
CS hold time parameter is not correct which may cause bus fault
randomly.
System hang during status register reading after flash progromming which
is caused by parameter accessing in XIP mode.
Add dummy delay for READ command according the flash datasheet which is
required for SDR mode.
Use FlexSPI internal divider for clock updating instead of register in
CCM to avoid potential risk caused by flash access during clock updating
procedure.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2025-06-26 22:14:38 -05:00