imx6 how to use i2c in u-boot

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

imx6 how to use i2c in u-boot

2,883 Views
rudolphhsueh
Contributor III

Hi all,

    Recently, I want to tried to do i2c access in u-boot cycle. I noticed that i2c.h has a i2c_set_bus_num and i2c_get_bus_num function.

In my opinion, I have to select which one i2c bus I want to access. And that I cant give a i2c_read/i2c_write function work.

I tried to include i2c.h and used i2c_set_bus_num/i2c_read/_i2c_write, but it told me i2c_set_bus_num/i2c_get_bus_num undeclared.

I'm sure that function was implemented, but it still tell me undeclared. So I used SouceInsight to trace these functions.

i2c_set_bus_num and i2c_get_bus_num are implemented in other file which was not include during compile.

Is there any patch or any method I can easy to use i2c access? Please tell me some directions. Thank you.

Labels (2)
0 Kudos
Reply
1 Reply

1,469 Views
igorpadykov
NXP Employee
NXP Employee

Hi Rudolph

depending on uboot version, one can try : i2c probe, help i2c

patch is described on:

https://community.freescale.com/thread/322813

https://community.freescale.com/thread/337569

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply