[PATCH 0/1] spi: fsl_espi: fix din offset
Michael Walle
mwalle at kernel.org
Mon Apr 27 14:33:20 CEST 2026
Hi Tomas,
On Tue Mar 24, 2026 at 6:02 PM CET, Tomas Alvarez Vanoli wrote:
> Hello,
>
> While working on an old T1040-based board, I ran into issues when reading data
> with spi_xfer. It seems to me that the driver is copying the data back to the
> caller at the wrong addresses. I am not entirely sure what was the intention
> with the original code as far as I can tell.
>
> With my suggested change, at least a small tx of 3 bytes works correctly and I
> can see the expected data in the buffer.
>
> I've really only tested this with a 2016 version of u-boot but the code has not
> changed regarding this since then, and I suspect that there's not a lot of
> boards left using this driver to read spi data in u-boot :)
This will break the SPI NOR flash on the P2041RDB:
=> sf probe
jedec_spi_nor flash at 0: unrecognized JEDEC id bytes: 00, 01, 20
Failed to initialize SPI flash at 0:0 (error -2)
After reverting this commit, I get:
=> sf probe
SF: Detected s25sl12801 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
What kind of issues do you see? And how does your patch resolves
this? I guess we can assume the code was working correctly once.
Honestly, I don't understand that code either. But I doubt just
moving pointers around will fix anything.
Thanks,
-michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 297 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260427/dc47e5ba/attachment.sig>
More information about the U-Boot
mailing list