-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
MEC172x qmspi ldma fix spi nor support #55129
MEC172x qmspi ldma fix spi nor support #55129
Conversation
7b8577d
to
18e67f3
Compare
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.
Can the sample work on the mec172xmodular_assy6930 as well?
@galak The sample app uses the shared SPI interface pins and mec172xmodular_assy6930 also uses the same pins. No change to application overlay. The app erases/writes/reads at SPI flash offset 0xC10000. If you have 16MByte flash on the board no problem. The address will wrap on smaller flashes and should work but the actual SPI address will depend upon the SPI flash size. |
18e67f3
to
b6fb955
Compare
@jvasanth1 @albertofloyd can you take a look please? |
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 some questions
@scottwcpg please rebase |
b3aaca0
to
ab1b3ee
Compare
Hi @carlescufi Rebased fixing YAML formatting, etc. |
@albertofloyd can you help to re-approve? |
we have new conflicts, another rebase please. |
ab1b3ee
to
7e4a457
Compare
@nashif Twister failure is on beagleconnect_freedom board. Beagleconnect_freedom twister spif_flash fails in main branch where this MCHP PR does not exist. |
Zephyr SPI driver model for full-duplex operation assumes data will be transmitted and received during each clock period. The QMSPI driver for the XEC family also supported dual and quad I/O use cases which are inherently half-duplex. To support dual/quad the driver incorrectly processed spi buffers as all transmit buffers first then all receive buffers. This worked if only the SPI driver was used. It did not work with the Zephyr flash SPI NOR driver which assumes SPI drivers follow the SPI driver model. This commit implements a QMSPI driver that follows the Zephyr SPI driver model resulting in a slightly smaller driver. Dual/quad SPI transactions are supported if the experimental SPI extended mode Zephyr configuration flag is enabled. We also remove the QMSPI full duplex driver added previously to support the flash SPI NOR driver. Added board to spi loop-back test and spi_flash sample. Signed-off-by: Scott Worley <scott.worley@microchip.com>
Sample code for demonstrating spi buffer usage for single, dual, and quad SPI transfers. Signed-off-by: Scott Worley <scott.worley@microchip.com>
7e4a457
to
4a4ecd4
Compare
@jvasanth1 please take a look |
PR zephyrproject-rtos#55129 deleted the "port-sel" property. Delete this property from the MEC1727nsz variant. Signed-off-by: Keith Short <keithshort@google.com>
PR zephyrproject-rtos#55129 deleted the "port-sel" property. Delete this property from remaining Microchip SoC variants and boards. Test: west build -b mec172xevb_assy6906 samples/drivers/espi/ Signed-off-by: Keith Short <keithshort@google.com>
PR zephyrproject-rtos/zephyr#55129 deleted the "port-sel" property. Delete this property from remaining Microchip SoC variants and boards. Test: west build -b mec172xevb_assy6906 samples/drivers/espi/ Cherry-picked from zephyrproject-rtos/zephyr#56949 BRANCH=none BUG=b:278560668 TEST=zmake build mtlrvpp_mchp Cq-Depend: chromium:4431679 Change-Id: I36d83b453aea765d842055e53f5d8c634fa3efe6 Signed-off-by: Keith Short <keithshort@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4434469 Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Al Semjonovs <asemjonovs@google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Keith Short <keithshort@chromium.org>
PR #55129 deleted the "port-sel" property. Delete this property from remaining Microchip SoC variants and boards. Test: west build -b mec172xevb_assy6906 samples/drivers/espi/ Signed-off-by: Keith Short <keithshort@google.com>
PR zephyrproject-rtos#55129 deleted the "port-sel" property. Delete this property from remaining Microchip SoC variants and boards. Test: west build -b mec172xevb_assy6906 samples/drivers/espi/ Signed-off-by: Keith Short <keithshort@google.com>
Update Microchip MEC172x QMSPI-LDMA driver to work with Zephyr's SPI NOR flash driver. This PR provides multiple benefits: removal the QMSPI full duplex driver whose only purpose was compatibility with the SPI NOR flash driver, QMSPI-LDMA driver is added to the SPI loopback test and SPI flash sample, and support for Zephyr SPI extended modes for dual and quad. Only minor changes to applications are required to setup the SPI buffers similar to all other SPI drivers. The PR has two commits: first is the driver change and added MEC172x EVB support to the loopback test and SPI flash sample, the second is a custom board specific sample application demonstrating erase, program, and read (single, dual, quad).