IMX8QM LPI2C DMA error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8QM LPI2C DMA error

1,655 Views
mohamedmusthafa
Contributor I

Hi,

i get the following kernel logs for i2c in imx8qm, we are using 5.10.35 version linux kernel 

root@:~# dmesg | grep i2c
[ 2.379560] i2c /dev entries driver
[ 2.994049] imx-lpi2c 3b230000.i2c: can't get the TX DMA channel, error -19!
[ 3.001120] imx-lpi2c 3b230000.i2c: error -ENODEV: dma setup error -19, use pio
[ 3.053200] i2c i2c-2: LPI2C adapter registered
[ 3.058640] imx-lpi2c 5a800000.i2c: can't get the TX DMA channel, error -19!
[ 3.065727] imx-lpi2c 5a800000.i2c: error -ENODEV: dma setup error -19, use pio
[ 9.683160] i2c i2c-3: LPI2C adapter registered
[ 9.697523] imx-lpi2c 5a810000.i2c: using scl,sda for recovery
[ 9.703374] imx-lpi2c 5a810000.i2c: can't get the TX DMA channel, error -19!
[ 9.710438] imx-lpi2c 5a810000.i2c: error -ENODEV: dma setup error -19, use pio
[ 9.953716] i2c i2c-4: LPI2C adapter registered
[ 9.959539] imx-lpi2c 58226000.i2c: can't get the TX DMA channel, error -19!
[ 9.966609] imx-lpi2c 58226000.i2c: error -ENODEV: dma setup error -19, use pio
[ 10.299223] i2c i2c-5: LPI2C adapter registered
[ 10.305256] imx-lpi2c 58246000.i2c: can't get the TX DMA channel, error -19!
[ 10.312363] imx-lpi2c 58246000.i2c: error -ENODEV: dma setup error -19, use pio
[ 10.342772] i2c i2c-6: LPI2C adapter registered
[ 10.759768] imx-lpi2c 56247000.i2c: can't get the TX DMA channel, error -19!
[ 10.766862] imx-lpi2c 56247000.i2c: error -ENODEV: dma setup error -19, use pio
[ 10.782481] i2c i2c-7: LPI2C adapter registered
[ 10.787813] imx-lpi2c 57247000.i2c: can't get the TX DMA channel, error -19!
[ 10.794886] imx-lpi2c 57247000.i2c: error -ENODEV: dma setup error -19, use pio
[ 11.817094] i2c i2c-8: LPI2C adapter registered
[ 11.824084] imx-lpi2c 56226000.i2c: can't get the TX DMA channel, error -19!
[ 11.831167] imx-lpi2c 56226000.i2c: error -ENODEV: dma setup error -19, use pio
[ 11.887837] i2c i2c-9: LPI2C adapter registered
[ 11.893251] imx-lpi2c 57226000.i2c: can't get the TX DMA channel, error -19!
[ 11.900325] imx-lpi2c 57226000.i2c: error -ENODEV: dma setup error -19, use pio
[ 11.957434] i2c i2c-10: LPI2C adapter registered
root@:~#
 
it uses pio instead of DMA
how can we enable DMA transfer mode?
 
Thanks & Regards,
mohamed
0 Kudos
Reply
3 Replies

1,642 Views
mohamedmusthafa
Contributor I

Hi,

We Are using M41_I2C0_SCL , M41_I2C0_SDA to connect EEPROM in our custom board.

the above mentioned logs are getting for custom board based on iMX8QM processor.

but in mek we are not getting error  like that ,please find the below log in mek

we are using i2c-2 bus, which is the device tree node for M4 I2C

root@dictgu:~# dmesg | grep i2c
[ 2.026260] i2c /dev entries driver
[ 3.092767] i2c i2c-2: LPI2C adapter registered
[ 3.125138] input: fxos8700 as /devices/platform/bus@5a000000/5a800000.i2c/i2c-3/3-001e/input/input2
[ 3.136865] input: fxas2100x as /devices/platform/bus@5a000000/5a800000.i2c/i2c-3/3-0020/input/input3
[ 3.179499] OF: graph: no port node found in /bus@5a000000/i2c@5a800000/tcpc@51
[ 3.192181] i2c i2c-3: LPI2C adapter registered
[ 3.206233] imx-lpi2c 5a810000.i2c: using scl,sda for recovery
[ 3.216089] i2c i2c-4: LPI2C adapter registered
[ 3.244320] i2c i2c-5: LPI2C adapter registered
[ 3.272327] i2c i2c-6: LPI2C adapter registered
[ 3.277391] imx-lpi2c 56247000.i2c: can't get irq number
[ 3.283445] imx-lpi2c 57247000.i2c: can't get irq number
[ 3.289465] imx-lpi2c 56226000.i2c: can't get irq number
[ 3.295484] imx-lpi2c 57226000.i2c: can't get irq number
[ 4.216360] OF: graph: no port node found in /bus@5a000000/i2c@5a800000/tcpc@51
[ 4.239025] i2c i2c-7: LPI2C adapter registered
[ 4.251672] i2c i2c-8: LPI2C adapter registered
[ 4.309271] i2c i2c-9: LPI2C adapter registered
[ 4.402626] i2c i2c-10: LPI2C adapter registered
[ 4.536002] debugfs: Directory 'mipi1-i2c1' with parent 'pm_genpd' already present!
[ 4.543710] debugfs: Directory 'mipi1-i2c0' with parent 'pm_genpd' already present!
root@dictgu:~#
0 Kudos
Reply

1,638 Views
igorpadykov
NXP Employee
NXP Employee

if it works on MEK board you can try to debug it using AN12631: Normal and Secure Debug for i.MX8/8X Family of Applications Processors – Application Note

and running the same image on both boards.

 

Best regards
igor

0 Kudos
Reply

1,650 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mohamed

 

not all i2c have dma supported as described in datasheet

 

1.jpg

i.MX 8QuadMax Automotive and Infotainment Applications Processors

 

Best regards
igor

0 Kudos
Reply