Forums - Can't see /dev/i2c* or /dev/iic*

3 posts / 0 new
Last post
Can't see /dev/i2c* or /dev/iic*
metadaddy
Profile picture
Join Date: 29 Dec 17
Location: San Jose, CA
Posts: 2
Posted: Fri, 2018-02-02 16:06

I've wired an external I2C sensor (BMP180) to my Snapdragon board via I2C2 (J9). I tried to run i2cdetect to check that it's there, but...

root@linaro-developer:~# i2cdetect -y 1
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory

In fact:

root@linaro-developer:~# ls /dev/i2*
ls: cannot access /dev/i2*: No such file or directory
root@linaro-developer:~# ls /dev/ii*
ls: cannot access /dev/ii*: No such file or directory

and...

root@linaro-developer:~# lsmod | grep i2c

shows nothing.

Do I need to do something else to enable i2c? This is what dmesg has to say on the topic:

root@linaro-developer:~# dmesg | grep i2c
[    2.388635] i2c-core: driver [tabla-i2c-core] using legacy suspend method
[    2.394882] i2c-core: driver [tabla-i2c-core] using legacy resume method
[    2.401622] i2c-core: driver [wcd9xxx-i2c-core] using legacy suspend method
[    2.408524] i2c-core: driver [wcd9xxx-i2c-core] using legacy resume method
[    3.176559] i2c /dev entries driver
[    3.284363] msm_cci_i2c_read:533 read_words = 0, exp words = 1
[    3.290173] msm_cci_i2c_read_bytes:611 failed rc -22
[    3.295104] msm_camera_cci_i2c_read: line 53 rc = -22
[    3.414378] msm_cci_i2c_read:533 read_words = 0, exp words = 1
[    3.420184] msm_cci_i2c_read_bytes:611 failed rc -22
[    3.425115] msm_camera_cci_i2c_read: line 53 rc = -22
[    6.224953] msm_cci_i2c_read:533 read_words = 0, exp words = 1
[    6.231324] msm_cci_i2c_read_bytes:611 failed rc -22
[    6.235950] msm_camera_cci_i2c_read: line 53 rc = -22
[    6.484583] msm_cci_i2c_read:533 read_words = 0, exp words = 1
[    6.490354] msm_cci_i2c_read_bytes:611 failed rc -22
[    6.495267] msm_camera_cci_i2c_read: line 53 rc = -22
[    6.725007] msm_cci_i2c_read:533 read_words = 0, exp words = 1
[    6.730614] msm_cci_i2c_read_bytes:611 failed rc -22
[    6.735478] msm_camera_cci_i2c_read: line 53 rc = -22
  • Up0
  • Down0
drone_guy
Join Date: 14 Nov 16
Posts: 44
Posted: Thu, 2018-02-08 10:01

Hi metadaddy,

All of the externally accessible I2C ports are mapped (by system configuration) to the DSP and are not mapped to the linux subsystem. Same thing for UART ports. This is not something that can be re-configured by a user. So, you would need to write a DSP application in order to test your sensor.

Hope this helps!

drone_guy

  • Up0
  • Down0
nathan.humpal
Join Date: 30 May 19
Posts: 4
Posted: Mon, 2019-06-24 06:08

How do you know where external pins are mapped?

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.