Skip to content
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

drivers: spi: spi_mcux_flexcomm: transceive_dma() releases chip select in the middle of multi-buffer transfers #59575

Closed
mjchen0 opened this issue Jun 22, 2023 · 0 comments · Fixed by #59576
Assignees
Labels
area: SPI SPI bus bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug

Comments

@mjchen0
Copy link
Contributor

mjchen0 commented Jun 22, 2023

When more the spi_buf_set has more than one entry, the transceive_dma() will create multiple DMA transfer requests to the SPI controller. However, chip select is released after each intermediate transfer, instead of being asserted for the entire buf_set.

Reproduced on RT595 EVK and confirmed on a logic-analyzer

Chip select should be asserted for the entire transfer request, even if the request involves more than one spi_buf in the set.

This bug prevents usage of >1 in the spi_buf_set.

@mjchen0 mjchen0 added the bug The issue is a bug, or the PR is fixing a bug label Jun 22, 2023
mjchen0 added a commit to mjchen0/zephyr that referenced this issue Jun 22, 2023
…transfers

Fix for bug:
zephyrproject-rtos#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
mjchen0 added a commit to mjchen0/zephyr that referenced this issue Jun 22, 2023
Fix for bug:
zephyrproject-rtos#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
@jhedberg jhedberg added the priority: low Low impact/importance bug label Jul 4, 2023
mjchen0 added a commit to mjchen0/zephyr that referenced this issue Jul 6, 2023
Fix for bug:
zephyrproject-rtos#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
dleach02 pushed a commit that referenced this issue Jul 11, 2023
Fix for bug:
#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
zephyrbot pushed a commit that referenced this issue Jul 11, 2023
Fix for bug:
#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
(cherry picked from commit 2a4acb2)
coreboot-org-bot pushed a commit to coreboot/zephyr-cros that referenced this issue Jul 12, 2023
Fix for bug:
zephyrproject-rtos/zephyr#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

(cherry picked from commit 2a4acb2)

Original-Signed-off-by: Mike J. Chen <mjchen@google.com>
GitOrigin-RevId: 2a4acb2
Change-Id: I96d0dae3298b2aeefe0e833931b9eebd1eca5841
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4681463
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
Tested-by: Al Semjonovs <asemjonovs@google.com>
jgl-meta pushed a commit that referenced this issue Jul 26, 2023
Fix for bug:
#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
(cherry picked from commit 2a4acb2)
DRuffer-tmo pushed a commit to tmobile/DevEdge-IoTDevKit-ZephyrRTOS that referenced this issue Jul 27, 2023
Fix for bug:
zephyrproject-rtos/zephyr#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
DRuffer-tmo pushed a commit to tmobile/DevEdge-IoTDevKit-ZephyrRTOS that referenced this issue Jul 27, 2023
Fix for bug:
zephyrproject-rtos/zephyr#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
pfayolle pushed a commit to SiemaApplications-attic/zephyr that referenced this issue Aug 3, 2023
Fix for bug:
zephyrproject-rtos#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
(cherry picked from commit 2a4acb2)
DRuffer-tmo pushed a commit to tmobile/DevEdge-IoTDevKit-ZephyrRTOS that referenced this issue Aug 8, 2023
Fix for bug:
zephyrproject-rtos/zephyr#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
DRuffer-tmo pushed a commit to tmobile/DevEdge-IoTDevKit-ZephyrRTOS that referenced this issue Aug 9, 2023
Fix for bug:
zephyrproject-rtos/zephyr#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
yclistanford pushed a commit to yclistanford/zephyr that referenced this issue Aug 25, 2023
Fix for bug:
zephyrproject-rtos#59575

The dma version of the version of the driver can
invoke multiple intermediate dma transfers, like
when the spi_buf_set count is greater than one.
However, there is a bug where chip select is not kept
asserted for all intermediate dma transfers required
to process the entire spi_buf_set.

Signed-off-by: Mike J. Chen <mjchen@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants