Hi,
I want to access register of I2C in IMX8MP but I am receiving "Bus error".
I have configured:
- RDC, to make I2C peripheral accessible in all domains --> devmem2 0x303D0510 w 0x000000FF
- Enable clock with clock source: SYSTEM_PLL1_DIV5 and divider 10 --> devmem2 0x3038AE00 w 0x1100000A
- Enable i2c3 and set pinctrl in device tree:
root@imx8mp-lpddr4-evk:~# devmem2 0x303D0510
/dev/mem opened.
Memory mapped at address 0xffffbe577000.
Read at address 0x303D0510 (0xffffbe577510): 0x000000FF
root@imx8mp-lpddr4-evk:~# devmem2 0x3038AE00
/dev/mem opened.
Memory mapped at address 0xffff98b48000.
Read at address 0x3038AE00 (0xffff98b48e00): 0x1100000A
root@imx8mp-lpddr4-evk:~# devmem2 0x30a40000
/dev/mem opened.
[ 5096.664377] audit: type=1701 audit(1678614959.920:16): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=897 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
Memory mapped at address 0xffff940f8000.
Bus error
Can anyone explain how I should solve the error?
Thanks,
Hello @Majidbahmani
Could you please explain what do you want to do exactly?
Also, you can use the I2C utilities in Linux, it is possible the bus error is because the register is being used for i2c driver.
Best regards.
Salas.
Thank you for your response.
I have changed the "compatible" property in "i2c3" node to make sure that it is not used with i2c driver.
Mainly I want to access i2c3 from IMX8MP DSP. However, when I read or write i2c3 registers in dsp, it is crashed and DSP stops working.
Then I tried to read i2c3 registers in Linux environment, and I found that I don't have access even in Linux (Bus error).
I also try to read other i2cx and for all other I received the same error. (Bus error)
I don't know what else I should change.
Thanks for your help.