Skip to content

Conversation

@scottwcpg
Copy link
Contributor

Microchip MEC5 HAL based SPI driver using QSPI controller. Driver supports async and extended SPI. Driver is compatible with flash SPI_NOR driver. PR includes a commit adding the board to the SPI loopback test.

@scottwcpg scottwcpg force-pushed the pr_spi_driver_mec5_qspi branch from b83b69c to 3ac7f28 Compare April 28, 2025 15:45
@scottwcpg scottwcpg requested a review from nordicjm April 28, 2025 17:49
Copy link
Contributor

@tbursztyka tbursztyka left a comment

Choose a reason for hiding this comment

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

spi api does not support dual/quad/octal. Yes there are config options for it, but since it does not provide any means to actually configure everything else around ... I made a proposal to get a proper support long ago (see #39991 ) but it never caught any traction. It was assumed to be unnecessary. No one came since to request it, and instead we got a completely different api (mspi) competing with spi api...

so drop the dual/quad/octal for now, focus on the generic, and see my comments on the overall logic.

@scottwcpg scottwcpg force-pushed the pr_spi_driver_mec5_qspi branch from 3ac7f28 to fb501d3 Compare May 7, 2025 17:10
@scottwcpg
Copy link
Contributor Author

@tbursztyka Hi. Made the changes you requested and pushed an update.

@scottwcpg scottwcpg requested a review from tbursztyka May 7, 2025 19:48
@nordicjm nordicjm dismissed their stale review May 8, 2025 09:16

Addressed

pdgendt
pdgendt previously requested changes May 8, 2025
@scottwcpg scottwcpg force-pushed the pr_spi_driver_mec5_qspi branch from fb501d3 to e2e2f60 Compare May 8, 2025 13:15
@pdgendt pdgendt dismissed their stale review May 8, 2025 13:17

Issue resolved

@scottwcpg
Copy link
Contributor Author

Ran twister local for all four boards. No errors.

@scottwcpg scottwcpg requested a review from pdgendt May 10, 2025 13:18
@scottwcpg scottwcpg force-pushed the pr_spi_driver_mec5_qspi branch 2 times, most recently from ca84b9f to bfa56b6 Compare May 12, 2025 18:27
Copy link
Contributor

@pdgendt pdgendt left a comment

Choose a reason for hiding this comment

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

Some more implicit booleans.

@scottwcpg scottwcpg force-pushed the pr_spi_driver_mec5_qspi branch from bfa56b6 to 091416b Compare May 12, 2025 19:59
@sonarqubecloud
Copy link

@scottwcpg scottwcpg requested a review from pdgendt May 12, 2025 20:36
Copy link
Contributor

@tbursztyka tbursztyka left a comment

Choose a reason for hiding this comment

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

just a tiny comment, rest lgtm

scottwcpg added 2 commits May 14, 2025 14:30
SPI driver for Microchip MEC5 HAL based QSPI controller. QSPI
hardware supports full duplex, dual, and quad operation. MEC5
QSPI controller also includes three local DMA channels per
direction to off load firmware. The driver API supports full
or half-duplex. Due to QSPI hardware not supporting one wire
half-duplex, this driver supports full-duplex only. QSPI hardware
design requires it to control chip select and current hardware
supports up to two chip selects. Zephyr's SPI DT macros store the
child SPI device's reg properity as the "slave" member of the SPI
configuration structure. The driver uses the "slave" value as the
chip select. Additional timing settings specific to SPI flash devices
are in a new SPI device YAM file: "microchip,mec5-qspi-device.yaml"
which includes the standard "spi-device.yaml". If the new YAML is not
used, the QSPI controller will use default timing values for chip
select and I/O line taps.

Signed-off-by: Scott Worley <[email protected]>
Add Microchip MEC5 HAL based mec_assy6941 evaluation board to
the Zephyr SPI loopback driver test.

Signed-off-by: Scott Worley <[email protected]>
@scottwcpg scottwcpg force-pushed the pr_spi_driver_mec5_qspi branch from 091416b to f003ea4 Compare May 14, 2025 18:37
@scottwcpg scottwcpg requested a review from tbursztyka May 14, 2025 19:28
@kartben kartben merged commit 356827e into zephyrproject-rtos:main May 16, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: SPI SPI bus platform: Microchip MEC Microchip MEC Platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants