[Arm-dev] I2C in Centos 7

Sun Jan 29 12:45:41 UTC 2017
Fabian Arrotin <arrfab at centos.org>

On 23/04/16 01:18, cjvijf at gmail.com wrote:
> Hello,
> 
> I am running Centos on a raspberry pi 2b. (I downloaded the image from:
> http://people.centos.org/hughesjr/armv7hl/rpi2/images/ 
> rpi2-centos-image.img.xz )
> and installed the i2c libraries and modules for i2c.
> [root at rpi2-2 ~]# lsmod | grep i2c
> 
> i2c_bcm2708             5006  0
> i2c_dev                 6027  0
> 
> From what I read that should be correct
> 
> device file is there too:
> crw-------  1 root root   89,   1 Dec 31  1969 i2c-1
> 
> kernel:
> Linux rpi2-2 3.18.14-v7+ #794 SMP PREEMPT Sun Jun 7 12:50:51 BST 2015
> armv7l armv7l armv7l GNU/Linux
> 
> 
> However, when I scan the i2c bus with 'i2cdetect -y 1' I don't see any
> devices (and I tried 2 that I know work).
> 
> is the I2C stuff in this kernel working?  (or is there a newer kernel
> version?)
> 
> thanks,
> 
> Ron
> 
> 
> P.S.  I know this is an arm-dev list, but figured  the I2C topic would
> fit better here than in a general Centos list
> 

I know it's a very old post, but I  had to search for a friend of mine,
using CentOS 7.3.1611 on his rpi2 , so here we go :

We need to activate it through config.txt :

echo -e "dtparam=i2c1=on\ndtparam=i2c_arm=on" >> /boot/config.txt
echo -e "i2c-bcm2708\ni2c-dev" >> /etc/modules-load.d/i2c.conf
yum install -y i2c-tools
systemctl reboot

Once rebooted :

[root at rpi2 ~]# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


-- 
Fabian Arrotin
The CentOS Project | http://www.centos.org
gpg key: 56BEC54E | twitter: @arrfab

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/arm-dev/attachments/20170129/829bbd5d/attachment-0005.sig>