-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Microchip MEC5 HAL based SPI driver for QSPI controller #89122
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
Microchip MEC5 HAL based SPI driver for QSPI controller #89122
Conversation
b83b69c to
3ac7f28
Compare
tbursztyka
left a comment
There was a problem hiding this 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.
3ac7f28 to
fb501d3
Compare
|
@tbursztyka Hi. Made the changes you requested and pushed an update. |
fb501d3 to
e2e2f60
Compare
|
Ran twister local for all four boards. No errors. |
ca84b9f to
bfa56b6
Compare
pdgendt
left a comment
There was a problem hiding this 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.
bfa56b6 to
091416b
Compare
|
tbursztyka
left a comment
There was a problem hiding this 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
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]>
091416b to
f003ea4
Compare



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.