Can't write to iMX53 I2C registers

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

Can't write to iMX53 I2C registers

903 Views
mohammedqasim
Contributor I

I am trying to initialize the I2C module on the iMX53. When I write to the slave address register or the clock divider register of the I2C, the CPU resets. Other registers such as GPIO, UART,.. don't have this issue.

Is there something I am missing??

Labels (1)
Tags (2)
0 Kudos
2 Replies

604 Views
YixingKong
Senior Contributor IV

Mohammed, please click Correct Answer/Helpful Answer if your question had been answered.

Thanks,
Yixing

0 Kudos

604 Views
israelpz
Senior Contributor I

Hi,

In Linux  you should have your I2C slave register in the proper i2c_board_info structure in order to send and receive any data from the i2c slave device.

First check in which i2c bus is your device and ensure is register or included in the proper structure which are in your board file (arch/arm/mach-mx5/board-mx53xxxx.c).

Also verify the address and the platform data to be passed to the probe function.

After verify that you could use the i2c_smbus* functions you could take a look in the adv7180 driver.

(drivers/media/video/mxc/capture/adv7180).

Clock of the i2c master module should be changed to another clock source then modify the divider. Then changed again to the i2c. Slaves devices in the i2c bus have his own clock if they use and use his i2c address to modify his clock rate.

Regards,

-Israel.