I2C issue IMX8MP

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

I2C issue IMX8MP

319 Views
Majidbahmani
Contributor II

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:

&i2c3 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
}
 

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,

0 Kudos
Reply
2 Replies

289 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

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.

0 Kudos
Reply

274 Views
Majidbahmani
Contributor II

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.

0 Kudos
Reply