Viola I2C with T30 and VF61

Dear sir/madam:
Actually we have two viola plus 1.2A one with colibri vf61 and other with Tega T30.
We have developed a board that fits on viola’s X9 connector with one mcp23s17 IO expander on the SPI bus, 3 rs232 drivers, an accelerometer/magnetometer barometer on the i2c bus.

With th vf61 all works fine (toradex kernel 4.1.15) the i2c bus shows:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1e -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- -- 
70: -- -- -- -- -- -- -- 77                    

The problem is with the T30 module (toradex kernel 3.1.10):

root@zic-5120:~/scripts# i2cdetect -y 0

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@zic-5120:~/scripts# i2cdetect -y 3
     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@zic-5120:~/scripts# i2cdetect -y 4
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- UU -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- UU -- -- -- -- -- -- -- -- -- -- UU -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

As you can see, there is no i2c devices attached on the buses (except the ones that the kernel has configuration)

Which is the i2c bus on X9?

running on a debian stable 8.5

On X9 extension header I2C bus 0 is exposed at 5 and 6 pins of X9 header i.e. SODIMM_PIN: 196 and 194.

Small question regarding the logs, with T20 i could see the external RTC getting registered(@68) since on Viola 1.2 Plus external RTC is assembled. VF61 logs should also have the external RTC detected?

On Vybrid are you using the I2C pins available on X9 header(X9_5, X9_6) or any other alternate pins available on X9 header?

We are using pins 5 and 6 of X9 header…
the log for vf61 comes from an older viola without rtc (sorry)

On dmesg there is a lot of errors when running i2cdetect -y 0:

tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.280252] tegra-i2c tegra-i2c.0: no acknowledge from address 0x30
[  181.289274] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.298561] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.306970] tegra-i2c tegra-i2c.0: no acknowledge from address 0x31
[  181.315713] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.324774] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.333215] tegra-i2c tegra-i2c.0: no acknowledge from address 0x32
[  181.342057] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.351275] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.359670] tegra-i2c tegra-i2c.0: no acknowledge from address 0x33
[  181.368516] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.377644] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.386075] tegra-i2c tegra-i2c.0: no acknowledge from address 0x34
[  181.394915] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.404396] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.412796] tegra-i2c tegra-i2c.0: no acknowledge from address 0x35
[  181.421769] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.430317] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.438763] tegra-i2c tegra-i2c.0: no acknowledge from address 0x36
[  181.447603] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.456736] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.465136] tegra-i2c tegra-i2c.0: no acknowledge from address 0x37
[  181.473971] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.490740] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.499429] tegra-i2c tegra-i2c.0: no acknowledge from address 0x50
[  181.508263] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.518697] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.527150] tegra-i2c tegra-i2c.0: no acknowledge from address 0x51
[  181.535985] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.544659] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.553048] tegra-i2c tegra-i2c.0: no acknowledge from address 0x52
[  181.562071] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.570598] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.578983] tegra-i2c tegra-i2c.0: no acknowledge from address 0x53
[  181.587790] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.596280] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.604598] tegra-i2c tegra-i2c.0: no acknowledge from address 0x54
[  181.613372] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.621694] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.630029] tegra-i2c tegra-i2c.0: no acknowledge from address 0x55
[  181.638770] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.647059] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.655388] tegra-i2c tegra-i2c.0: no acknowledge from address 0x56
[  181.664143] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.672482] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.680822] tegra-i2c tegra-i2c.0: no acknowledge from address 0x57
[  181.689567] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.697824] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.706131] tegra-i2c tegra-i2c.0: no acknowledge from address 0x58
[  181.714878] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.723143] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.731471] tegra-i2c tegra-i2c.0: no acknowledge from address 0x59
[  181.740227] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.748475] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.756813] tegra-i2c tegra-i2c.0: no acknowledge from address 0x5a
[  181.765550] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.773962] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.782271] tegra-i2c tegra-i2c.0: no acknowledge from address 0x5b
[  181.791009] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.799274] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.807615] tegra-i2c tegra-i2c.0: no acknowledge from address 0x5c
[  181.816368] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.824670] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.833004] tegra-i2c tegra-i2c.0: no acknowledge from address 0x5d
[  181.841754] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.850079] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.858415] tegra-i2c tegra-i2c.0: no acknowledge from address 0x5e
[  181.867182] tegra-i2c tegra-i2c.0: Packet status 0x00010009
[  181.875478] tegra-i2c tegra-i2c.0: I2c error status 0x0000000a
[  181.883895] tegra-i2c tegra-i2c.0: no acknowledge from address 0x5f
[  181.892723] tegra-i2c tegra-i2c.0: Packet status 0x00010009

Also tested the T30 on viola 1.1A (the same board with we tested the vf61, with no rtc) with same results, i2c bus 0 is void:

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

Tegra I2C driver seems too verbose… one can ignore those erros, those are just debug messages about the NACK on specific slave adress. If there is ACK form slave device there will no error message.

As such i could not see any particluar reason for not detecting the slave devices… can you check the i2c signals with scope and see what’s going on the bus? Does the slave gives ACKs to the request ?

it’s ok thanks…

The question is that we are not capable to detect our i2c devices when plugged a T30 module, with the same hardware (viola plus 1.2 and our expansion board) and VF61 module, all works fine. Could be a kernel issue? kernel configuration?

root@zic-5110:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1e -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- UU -- 6a -- -- -- -- -- 
70: -- -- -- -- -- -- -- 77

We don’t have a scope right now … we tested the T30 with the old viola witouth rtc (the viola with the vf61 of the previous logs) and i2c does not show anything

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

could be a kernel problem? some configuration of the i2c bus? (we are running your stock kernel 3.1.10)

thanks