drivers: mspi: Support MSPI driver for STM32. #96670
drivers: mspi: Support MSPI driver for STM32. #96670MaureenHelm merged 3 commits intozephyrproject-rtos:mainfrom
Conversation
834dc73 to
7e8241c
Compare
ed327ea to
a09a921
Compare
| For example | ||
| dma-names = "tx_rx"; | ||
|
|
||
| ssht-enable: |
There was a problem hiding this comment.
For the three IPs, these bindings will have to propose the same configuration options as the union of dts/bindings/memory-controllers/st,stm32-xspi-psram.yaml and dts/bindings/flash_controller/st,stm32-xspi-nor.yaml
There was a problem hiding this comment.
Note that this may potentially be done as a follow up PR
e0849ca to
806f0f8
Compare
93bcc78 to
1331f41
Compare
If you agree @swift-tk , we could raise a new issue for that improvement in the jedec driver |
etienne-lms
left a comment
There was a problem hiding this comment.
Minor comments. Otherwise LGTM.
|
Some CI compliance checks reports to be addressed: |
|
My primary concern with this PR is the handling of flash-specific command transfers in the controller driver instead of the flash driver, which goes against the intended MSPI API design. ee https://github.com/zephyrproject-rtos/zephyr/pull/96670/files#r2575480446 |
Sorry, I missed this from before. If there is no plan to support software multi-peripheral with GPIO or HW CE, then you can remove this code that would never be used. |
ee8f8e0 to
d7c6beb
Compare
|
For users who want to run samples/sysbuild/with_mcuboot, please note that support for the XSPI/QSPI/OSPI controller must be added in flash_map_extended located at: bootloader/mcuboot/boot/zephyr/flash_map_extended.c |
d7c6beb to
9eac205
Compare
|
Hi all, |
erwango
left a comment
There was a problem hiding this comment.
Late request:
As there is an agreement later changes will be required, and driver is not yet ready for production. Let's make it explicit that is is still in experimental phase. This will give us more freedom in next steps.
| depends on DT_HAS_ST_STM32_OSPI_CONTROLLER_ENABLED || \ | ||
| DT_HAS_ST_STM32_QSPI_CONTROLLER_ENABLED || \ | ||
| DT_HAS_ST_STM32_XSPI_CONTROLLER_ENABLED | ||
| default y |
There was a problem hiding this comment.
| default y | |
| select EXPERIMENTAL | |
| default y |
This commit introduces support for the mspi and ospi drivers on STM32, enabling functionality APIs for MSPI/OSPI/QSPI host controllers.. Signed-off-by: Sara Touqan <zephyr@exalt.ps> Signed-off-by: Sarah Younis <zephyr@exalt.ps> Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
this commit enables building and running the sample on stm32h573i_dk board,stm32h735g_disco board, arduino_giga_r1 board, and b_u585i_iot02a board by providing the required overlay and configuration updates. Signed-off-by: Sara Touqan <zephyr@exalt.ps> Signed-off-by: Sarah Younis <zephyr@exalt.ps> Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
9eac205 to
839ecc0
Compare
|
There was a problem hiding this comment.
Late catch. Probably wrong or to be put in readable format.
There was a problem hiding this comment.
I did not get this comment, could you please clarify what do you mean by ‘readable format’?
There was a problem hiding this comment.
Clock freq set as follows feels quite odd:
clock-frequency = <0x17d7840>;
| config MSPI_STM32_MAX_FREQ | ||
| int "MSPI max frequency" | ||
| default 250000000 if SOC_SERIES_STM32H5X | ||
| default 280000000 if SOC_SERIES_STM32H7X | ||
| default 160000000 if SOC_SERIES_STM32U5X | ||
| default 120000000 if SOC_SERIES_STM32L4X | ||
| default 110000000 if SOC_SERIES_STM32L5X | ||
| default 96000000 if SOC_SERIES_STM32U3X | ||
| default 250000000 |
There was a problem hiding this comment.
Late catch: Why is that requested while mspi-max-frequency prop is available ?
There was a problem hiding this comment.
yes, mspi-max-frequency should be enough but since this is an optional property, we need to assign a default value. We noticed that the maximum frequency varies across series, which is why we added this Kconfig. If you have any concerns, we can remove it and make mspi-max-frequency a required property instead
There was a problem hiding this comment.
and make mspi-max-frequency a required property instead
That would be more simple indeed.
There was a problem hiding this comment.
sure, should we open a new PR now since this one is already merged?
There was a problem hiding this comment.
mspi-max-frequency is defined in mspi-device.yaml and is intended to describe the target operating frequency requested by the device. The clock-frequency in mspi-controller.yaml represents the maximum clock rate supported or configured for a given controller instance. These properties were inherited from the SPI bindings; however, the naming is arguably inverted. A more intuitive convention would be to use clock frequency on the device side and maximum frequency on the controller side...
There was a problem hiding this comment.
@swift-tk regarding last sentence, u meant to use clock_frequency on controller side not device side, right? since we have clock-frequency property in mspi-controller.yaml ?
There was a problem hiding this comment.
I meant their names are inverted in my opinion. But currently, clock-frequency is on controller side and mspi-max-frequency on device side. Note that mspi-max-frequency should not be used as maximum frequency indication for the controller!!
There was a problem hiding this comment.
ok got it, thanks



This PR introduces support for MSPI driver on STM32, enabling functionality APIs for MSPI host controllers.
mspi_stm32_xspi driver
ospi_stm32 driver
mspi_stm32_qspi driver
arduino_giga_r1/stm32h747xx/m7andstm32l496g_discoNotes: