Hi,
Custom LS1043 Board
Linux version 5.4.47-2.3 (NXP-SDK 2.2 dunfell)
i've got a weird I2C problem:
Everything is working quite fine, reading temperature-sensors, reading/setting rtcs (all transfers < 16 bytes)...
But I need to transmit 4kB of data to a I2C slave, so the drivers/i2c/busses/i2c-imx.c driver selects DMA ( i2c_imx_xfer line 1171).
The problem: DMA transfer just transmits garbarge over i2c, some unknown part of memory to be precise. I saw parts of the boot-message (klog), different contents on every transfer. I tracked down to the dma_map_single() (i2c_imx_dma_xfer line 457), everything seems to be correct (msgs->buf contains the correct data).
If i increase the DMA_THRESHOLD so dma isnt used, everything works fine.
Its also reproducable with the i2ctransfer tool, e.g. i2ctransfer -y 0 w10@0x12 0+ sends incremental data, i2ctransfer -y 0 w4000@0x12 0+ sends complete nonsense.
(Nonsense sent is validated with a DigiView probe)
Any suggestions?