[MinnowBoard] MinnowMax how to access SMBus under Linux

Krause Martin Martin.Krause at tq-group.com
Thu Mar 5 06:34:51 UTC 2015


Hi,

how can I access the SMBus of the MinnowMax under Linux?

I've successfully build an sdcard with a current Yocto-Linux (top of tree, with 3.19.0er kernel).

There are two modules (automatically) loaded with i2c-support:

- i2c_i801
- i2c_designware_core


root at intel-corei7-64:~# lsmod
Module                  Size  Used by
i2c_i801               10830  0
uio                     9941  0
iwlwifi               109670  0
cfg80211              525235  1 iwlwifi
snd_hda_codec_hdmi     39400  1
snd_hda_intel          22091  0
efivars                 7981  0
snd_hda_controller     22700  1 snd_hda_intel
snd_hda_codec         109749  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_controller
snd_pcm                93059  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              20730  1 snd_pcm
dw_dmac                 2803  0
dw_dmac_core           15959  1 dw_dmac
spi_pxa2xx_platform    16651  0
i2c_designware_platform     3843  0
i2c_designware_core     7249  1 i2c_designware_platform
root at intel-corei7-64:~#

I think the i2c_i801 is the driver for the smbus, the i2c_designware_xxx is for the i2c busses?
Is this correct?

I see nine i2c device-nodes (= buses):

root at intel-corei7-64:~# ls -la /dev/i2c*
crw------- 1 root root 89, 0 Mar  3 10:00 /dev/i2c-0
crw------- 1 root root 89, 1 Mar  3 10:00 /dev/i2c-1
crw------- 1 root root 89, 2 Mar  3 10:00 /dev/i2c-2
crw------- 1 root root 89, 3 Mar  3 10:00 /dev/i2c-3
crw------- 1 root root 89, 4 Mar  3 10:00 /dev/i2c-4
crw------- 1 root root 89, 5 Mar  3 10:00 /dev/i2c-5
crw------- 1 root root 89, 6 Mar  3 10:00 /dev/i2c-6
crw------- 1 root root 89, 7 Mar  3 10:00 /dev/i2c-7
crw------- 1 root root 89, 8 Mar  3 10:00 /dev/i2c-8
root at intel-corei7-64:~#

Is one of this the smbus?

The buses 0 to 6 could be accessed with i2cdetect (i2c-0 for example):

root at intel-corei7-64:~# i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root at intel-corei7-64:~#

When I try to access the busses 7 or 8 with i2cdetect, I get an error:

root at intel-corei7-64:~# i2cdetect 7
Error: Can't use SMBus Quick Write command on this bus
root at intel-corei7-64:~#

I would expect to see at least two devices on the smbus, one on address
0x50 (24C02 EEPROM) and on address 0x6c (NCT3012S). But on the
i2c buses 0-6 - which could be accessed with i2cdetect - there is nothing
detected on this addresses.

Best regards,
Martin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.elinux.org/pipermail/elinux-minnowboard/attachments/20150305/d7b7e4e3/attachment-0001.html>


More information about the elinux-MinnowBoard mailing list