Skip to content

Improvements for LPSPI driver#43

Open
SiarheiVolkau wants to merge 2 commits into
nxp-imx:lf-6.12.yfrom
SiarheiVolkau:patch-2
Open

Improvements for LPSPI driver#43
SiarheiVolkau wants to merge 2 commits into
nxp-imx:lf-6.12.yfrom
SiarheiVolkau:patch-2

Conversation

@SiarheiVolkau
Copy link
Copy Markdown
Contributor

Here I present two patches which helped me bring up a custom i.MX95-based board.

  • Adds LSB-first support.
  • Fixes hardware CS behavior while DMA is in use, observed with AD7940 driver.

Let me know if it is the right place for these patches, maybe better to add them into mainline first?

PS: Also I observed that TCR_CONTC bit related logic is broken/misused, but have no idea how to fix that.

The driver currently doesn't support SPI_LSB_FIRST feature but it can be easily added.

Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
In DMA mode LPSPI splits out transaction on per-word basis.
This is because TCR_CONT is not set.

When TCR_CONT set, it starts work properly.
However, CS stays active much longer than required, for ~80us on imx95. I guess DMA completion handler resets it.

Also I observed that TCR_CONTC flag logic is broken but don't know how to fix it.

Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant