[MinnowBoard] MinnoboardMax I2C and Kernel 3.18.1 ACK problem
Michael Jones
mike at proclivis.com
Fri Jan 2 23:46:27 UTC 2015
I took some log data. There are two cases
There are annotations labeled ***
CASE 1 (MUCKED UP DRIVER)
———————————————————
*** Driver got mucked up, and no addresses are issued on the bus. Things are timing out. A case follows after a hardware reset.
*** data from strace
open("/dev/i2c-7", O_RDWR) = 3
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f19896bd000
write(1, "open 3\n", 7open 3
) = 7
ioctl(3, 0x702, 0x7fff27354000) = 0 *** I2C_TIMEOUT
write(1, "Timeout -1991762032\n", 20Timeout -1991762032
) = 20
ioctl(3, 0x705, 0x7fff27354008) = 0 *** I2C_FUNCS
write(1, "Funcs 0xc7e0003\n", 16Funcs 0xc7e0003
) = 16
ioctl(3, 0x708, 0) = 0 *** I2C_PEC
open("/dev/i2c-7", O_RDWR) = 4
ioctl(4, 0x708, 0x1) = 0
write(1, "\n", 1
) = 1
*** From calls made before read/write
*** 703 is I2C_SLAVE.
*** 720 is I2C_SMBUS transaction
ioctl(3, 0x703, 0x30) = 0
ioctl(3, 0x720, 0x7fff27353f50) = -1 ETIMEDOUT (Connection timed out)
ioctl(3, 0x703, 0x30) = 0
ioctl(3, 0x720, 0x7fff27353f30) = -1 ETIMEDOUT (Connection timed out)
ioctl(3, 0x703, 0x30) = 0
ioctl(3, 0x720, 0x7fff27353f30) = -1 ETIMEDOUT (Connection timed out)
*** From /sys/kernel/debug/tracing/trace with i2c enabled
LT_PMBusTest-3583 [000] .... 12931.831216: sys_ioctl -> 0xffffffffffffff92 *** Not sure what this is
LT_PMBusTest-3583 [000] .... 12931.831230: sys_ioctl(fd: 3, cmd: 703, arg: 30) *** Set addr, should be hex 0x30
LT_PMBusTest-3583 [000] .... 12931.831242: sys_ioctl -> 0x0 *** Maybe a return value?
LT_PMBusTest-3583 [000] .... 12931.831245: sys_ioctl(fd: 3, cmd: 720, arg: 7fffa10822d0) *** SMBUS command
LT_PMBusTest-3583 [000] .... 12931.831250: smbus_read: i2c-7 a=030 f=0000 c=8b WORD_DATA
LT_PMBusTest-3583 [000] .... 12931.831255: i2c_write: i2c-7 #0 a=030 f=0000 l=1 [8b] *** Probably SMBUS command
LT_PMBusTest-3583 [000] .... 12931.831257: i2c_read: i2c-7 #1 a=030 f=0001 l=2 *** Probably repeated start and read WORD
LT_PMBusTest-3583 [000] .... 12932.832323: i2c_result: i2c-7 n=0 ret=-110 *** Times out
LT_PMBusTest-3583 [000] .... 12932.832330: smbus_reply: i2c-7 a=030 f=0000 c=8b WORD_DATA l=2 [ff-ff]
LT_PMBusTest-3583 [000] .... 12932.832334: smbus_result: i2c-7 a=030 f=0000 c=8b WORD_DATA rd res=-110 *** Passes error to SMBUS
LT_PMBusTest-3583 [000] .... 12932.832338: sys_ioctl -> 0xffffffffffffff92
CASE 2 (AFTER HARDWARE RESET)
—————————
*** In this case, there are transactions on the bus.
*** START + 0x30 + W + ACK (24ms) + STOP
*** From the levels, you can seek that the slave is pulling it low.
*** There is a glitch on the input side of the I2C buffer right as the ACK clock goes high. This might be because I have 12” wire from the MinnowBoardMax to my board using a couple of wires that are twisted without the ground. The accelerator is yanking up the edges and may be feeding to other signals. It is possible that the glitch on the data line is messing up the I2C master. One good reason for me to test with whatever you test with, especially if it is working for you and not for me.
*** It a test with your board works, I can layout a very small adapter and try to get a cleaner signal.
*** If you want scope shots in PNG, send me an e-mail mike at proclivis dot com
# tracer: nop
#
# entries-in-buffer/entries-written: 224/224 #P:2
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
LT_PMBusTest-2341 [001] .... 182.034620: smbus_write: i2c-7 a=030 f=0000 c=0 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.034631: i2c_write: i2c-7 #0 a=030 f=0000 l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.051692: i2c_result: i2c-7 n=0 ret=-11 *** EAGAIN
LT_PMBusTest-2341 [001] .... 182.051701: smbus_result: i2c-7 a=030 f=0000 c=0 BYTE_DATA wr res=-11
LT_PMBusTest-2341 [001] .... 182.051738: smbus_read: i2c-7 a=030 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.051743: i2c_write: i2c-7 #0 a=030 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.051745: i2c_read: i2c-7 #1 a=030 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.076030: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.076038: smbus_reply: i2c-7 a=030 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.076041: smbus_result: i2c-7 a=030 f=0000 c=8b WORD_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.076064: smbus_read: i2c-7 a=030 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.076068: i2c_write: i2c-7 #0 a=030 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.076070: i2c_read: i2c-7 #1 a=030 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.100296: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.100305: smbus_reply: i2c-7 a=030 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.100307: smbus_result: i2c-7 a=030 f=0000 c=20 BYTE_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.100404: smbus_write: i2c-7 a=030 f=0000 c=0 BYTE_DATA l=1 [01]
LT_PMBusTest-2341 [001] .... 182.100410: i2c_write: i2c-7 #0 a=030 f=0000 l=2 [00-01]
LT_PMBusTest-2341 [001] .... 182.124480: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.124489: smbus_result: i2c-7 a=030 f=0000 c=0 BYTE_DATA wr res=-11
LT_PMBusTest-2341 [001] .... 182.124515: smbus_read: i2c-7 a=030 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.124520: i2c_write: i2c-7 #0 a=030 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.124522: i2c_read: i2c-7 #1 a=030 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.148388: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.148397: smbus_reply: i2c-7 a=030 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.148399: smbus_result: i2c-7 a=030 f=0000 c=8b WORD_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.148424: smbus_read: i2c-7 a=030 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.148429: i2c_write: i2c-7 #0 a=030 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.148431: i2c_read: i2c-7 #1 a=030 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.172781: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.172788: smbus_reply: i2c-7 a=030 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.172790: smbus_result: i2c-7 a=030 f=0000 c=20 BYTE_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.172871: smbus_write: i2c-7 a=032 f=0000 c=0 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.172877: i2c_write: i2c-7 #0 a=032 f=0000 l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.197036: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.197044: smbus_result: i2c-7 a=032 f=0000 c=0 BYTE_DATA wr res=-11
LT_PMBusTest-2341 [001] .... 182.197065: smbus_read: i2c-7 a=032 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.197068: i2c_write: i2c-7 #0 a=032 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.197070: i2c_read: i2c-7 #1 a=032 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.242919: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.242925: smbus_reply: i2c-7 a=032 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.242927: smbus_result: i2c-7 a=032 f=0000 c=8b WORD_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.242945: smbus_read: i2c-7 a=032 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.242949: i2c_write: i2c-7 #0 a=032 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.242950: i2c_read: i2c-7 #1 a=032 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.244314: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.244321: smbus_reply: i2c-7 a=032 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.244323: smbus_result: i2c-7 a=032 f=0000 c=20 BYTE_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.244393: smbus_write: i2c-7 a=032 f=0000 c=0 BYTE_DATA l=1 [01]
LT_PMBusTest-2341 [001] .... 182.244398: i2c_write: i2c-7 #0 a=032 f=0000 l=2 [00-01]
LT_PMBusTest-2341 [001] .... 182.290769: i2c_result: i2c-7 n=0 ret=-121 *** EREMOTEIO
LT_PMBusTest-2341 [001] .... 182.290776: smbus_result: i2c-7 a=032 f=0000 c=0 BYTE_DATA wr res=-121
LT_PMBusTest-2341 [001] .... 182.290798: smbus_read: i2c-7 a=032 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.290801: i2c_write: i2c-7 #0 a=032 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.290803: i2c_read: i2c-7 #1 a=032 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.292225: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.292233: smbus_reply: i2c-7 a=032 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.292235: smbus_result: i2c-7 a=032 f=0000 c=8b WORD_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.292255: smbus_read: i2c-7 a=032 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.292258: i2c_write: i2c-7 #0 a=032 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.292260: i2c_read: i2c-7 #1 a=032 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.338664: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.338673: smbus_reply: i2c-7 a=032 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.338676: smbus_result: i2c-7 a=032 f=0000 c=20 BYTE_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.338769: smbus_write: i2c-7 a=032 f=0000 c=0 BYTE_DATA l=1 [02]
LT_PMBusTest-2341 [001] .... 182.338777: i2c_write: i2c-7 #0 a=032 f=0000 l=2 [00-02]
LT_PMBusTest-2341 [001] .... 182.339723: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.339728: smbus_result: i2c-7 a=032 f=0000 c=0 BYTE_DATA wr res=-11
LT_PMBusTest-2341 [001] .... 182.339741: smbus_read: i2c-7 a=032 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.339745: i2c_write: i2c-7 #0 a=032 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.339747: i2c_read: i2c-7 #1 a=032 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.385982: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.385991: smbus_reply: i2c-7 a=032 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.385994: smbus_result: i2c-7 a=032 f=0000 c=8b WORD_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.386020: smbus_read: i2c-7 a=032 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.386026: i2c_write: i2c-7 #0 a=032 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.386028: i2c_read: i2c-7 #1 a=032 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.386888: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.386892: smbus_reply: i2c-7 a=032 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.386894: smbus_result: i2c-7 a=032 f=0000 c=20 BYTE_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.386982: smbus_write: i2c-7 a=032 f=0000 c=0 BYTE_DATA l=1 [03]
LT_PMBusTest-2341 [001] .... 182.386987: i2c_write: i2c-7 #0 a=032 f=0000 l=2 [00-03]
LT_PMBusTest-2341 [001] .... 182.433194: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.433202: smbus_result: i2c-7 a=032 f=0000 c=0 BYTE_DATA wr res=-121
LT_PMBusTest-2341 [001] .... 182.433227: smbus_read: i2c-7 a=032 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.433232: i2c_write: i2c-7 #0 a=032 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.433235: i2c_read: i2c-7 #1 a=032 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.434462: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.434471: smbus_reply: i2c-7 a=032 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.434473: smbus_result: i2c-7 a=032 f=0000 c=8b WORD_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.434496: smbus_read: i2c-7 a=032 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.434501: i2c_write: i2c-7 #0 a=032 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.434503: i2c_read: i2c-7 #1 a=032 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.480949: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.480958: smbus_reply: i2c-7 a=032 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.480960: smbus_result: i2c-7 a=032 f=0000 c=20 BYTE_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.481054: smbus_write: i2c-7 a=033 f=0000 c=0 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.481060: i2c_write: i2c-7 #0 a=033 f=0000 l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.482065: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.482070: smbus_result: i2c-7 a=033 f=0000 c=0 BYTE_DATA wr res=-11
LT_PMBusTest-2341 [001] .... 182.482083: smbus_read: i2c-7 a=033 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.482087: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.482089: i2c_read: i2c-7 #1 a=033 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.528493: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.528502: smbus_reply: i2c-7 a=033 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.528505: smbus_result: i2c-7 a=033 f=0000 c=8b WORD_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.528532: smbus_read: i2c-7 a=033 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.528538: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.528541: i2c_read: i2c-7 #1 a=033 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.529571: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.529576: smbus_reply: i2c-7 a=033 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.529578: smbus_result: i2c-7 a=033 f=0000 c=20 BYTE_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.529668: smbus_write: i2c-7 a=033 f=0000 c=0 BYTE_DATA l=1 [01]
LT_PMBusTest-2341 [001] .... 182.529674: i2c_write: i2c-7 #0 a=033 f=0000 l=2 [00-01]
LT_PMBusTest-2341 [001] .... 182.575982: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.575990: smbus_result: i2c-7 a=033 f=0000 c=0 BYTE_DATA wr res=-121
LT_PMBusTest-2341 [001] .... 182.576012: smbus_read: i2c-7 a=033 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.576017: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.576020: i2c_read: i2c-7 #1 a=033 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.576990: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.576994: smbus_reply: i2c-7 a=033 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.576996: smbus_result: i2c-7 a=033 f=0000 c=8b WORD_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.577008: smbus_read: i2c-7 a=033 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.577011: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.577013: i2c_read: i2c-7 #1 a=033 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.623494: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.623502: smbus_reply: i2c-7 a=033 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.623504: smbus_result: i2c-7 a=033 f=0000 c=20 BYTE_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.623599: smbus_write: i2c-7 a=033 f=0000 c=0 BYTE_DATA l=1 [02]
LT_PMBusTest-2341 [001] .... 182.623606: i2c_write: i2c-7 #0 a=033 f=0000 l=2 [00-02]
LT_PMBusTest-2341 [001] .... 182.624547: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.624552: smbus_result: i2c-7 a=033 f=0000 c=0 BYTE_DATA wr res=-11
LT_PMBusTest-2341 [001] .... 182.624566: smbus_read: i2c-7 a=033 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.624570: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.624572: i2c_read: i2c-7 #1 a=033 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.670653: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.670662: smbus_reply: i2c-7 a=033 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.670664: smbus_result: i2c-7 a=033 f=0000 c=8b WORD_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.670689: smbus_read: i2c-7 a=033 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.670694: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.670696: i2c_read: i2c-7 #1 a=033 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.671786: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.671791: smbus_reply: i2c-7 a=033 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.671793: smbus_result: i2c-7 a=033 f=0000 c=20 BYTE_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.671882: smbus_write: i2c-7 a=033 f=0000 c=0 BYTE_DATA l=1 [03]
LT_PMBusTest-2341 [001] .... 182.671888: i2c_write: i2c-7 #0 a=033 f=0000 l=2 [00-03]
LT_PMBusTest-2341 [001] .... 182.718361: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.718370: smbus_result: i2c-7 a=033 f=0000 c=0 BYTE_DATA wr res=-121
LT_PMBusTest-2341 [001] .... 182.718394: smbus_read: i2c-7 a=033 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.718399: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.718401: i2c_read: i2c-7 #1 a=033 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.719433: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.719439: smbus_reply: i2c-7 a=033 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.719441: smbus_result: i2c-7 a=033 f=0000 c=8b WORD_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.719455: smbus_read: i2c-7 a=033 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.719458: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.719460: i2c_read: i2c-7 #1 a=033 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.765819: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.765827: smbus_reply: i2c-7 a=033 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.765829: smbus_result: i2c-7 a=033 f=0000 c=20 BYTE_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.765924: smbus_write: i2c-7 a=033 f=0000 c=0 BYTE_DATA l=1 [04]
LT_PMBusTest-2341 [001] .... 182.765931: i2c_write: i2c-7 #0 a=033 f=0000 l=2 [00-04]
LT_PMBusTest-2341 [001] .... 182.766863: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.766868: smbus_result: i2c-7 a=033 f=0000 c=0 BYTE_DATA wr res=-11
LT_PMBusTest-2341 [001] .... 182.766881: smbus_read: i2c-7 a=033 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.766885: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.766887: i2c_read: i2c-7 #1 a=033 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.813388: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.813397: smbus_reply: i2c-7 a=033 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.813400: smbus_result: i2c-7 a=033 f=0000 c=8b WORD_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.813426: smbus_read: i2c-7 a=033 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.813432: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.813434: i2c_read: i2c-7 #1 a=033 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.815108: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.815118: smbus_reply: i2c-7 a=033 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.815120: smbus_result: i2c-7 a=033 f=0000 c=20 BYTE_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.815223: smbus_write: i2c-7 a=033 f=0000 c=0 BYTE_DATA l=1 [05]
LT_PMBusTest-2341 [001] .... 182.815230: i2c_write: i2c-7 #0 a=033 f=0000 l=2 [00-05]
LT_PMBusTest-2341 [001] .... 182.860921: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.860929: smbus_result: i2c-7 a=033 f=0000 c=0 BYTE_DATA wr res=-121
LT_PMBusTest-2341 [001] .... 182.860951: smbus_read: i2c-7 a=033 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.860956: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.860958: i2c_read: i2c-7 #1 a=033 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.861894: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.861899: smbus_reply: i2c-7 a=033 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.861900: smbus_result: i2c-7 a=033 f=0000 c=8b WORD_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.861912: smbus_read: i2c-7 a=033 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.861915: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.861917: i2c_read: i2c-7 #1 a=033 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.908499: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.908507: smbus_reply: i2c-7 a=033 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.908509: smbus_result: i2c-7 a=033 f=0000 c=20 BYTE_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.908605: smbus_write: i2c-7 a=033 f=0000 c=0 BYTE_DATA l=1 [06]
LT_PMBusTest-2341 [001] .... 182.908612: i2c_write: i2c-7 #0 a=033 f=0000 l=2 [00-06]
LT_PMBusTest-2341 [001] .... 182.909563: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.909568: smbus_result: i2c-7 a=033 f=0000 c=0 BYTE_DATA wr res=-11
LT_PMBusTest-2341 [001] .... 182.909582: smbus_read: i2c-7 a=033 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 182.909585: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 182.909587: i2c_read: i2c-7 #1 a=033 f=0001 l=2
LT_PMBusTest-2341 [001] .... 182.956128: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 182.956138: smbus_reply: i2c-7 a=033 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 182.956140: smbus_result: i2c-7 a=033 f=0000 c=8b WORD_DATA rd res=-121
LT_PMBusTest-2341 [001] .... 182.956164: smbus_read: i2c-7 a=033 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 182.956169: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 182.956171: i2c_read: i2c-7 #1 a=033 f=0001 l=1
LT_PMBusTest-2341 [001] .... 182.957170: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 182.957175: smbus_reply: i2c-7 a=033 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 182.957177: smbus_result: i2c-7 a=033 f=0000 c=20 BYTE_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 182.957264: smbus_write: i2c-7 a=033 f=0000 c=0 BYTE_DATA l=1 [07]
LT_PMBusTest-2341 [001] .... 182.957269: i2c_write: i2c-7 #0 a=033 f=0000 l=2 [00-07]
LT_PMBusTest-2341 [001] .... 183.003610: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 183.003618: smbus_result: i2c-7 a=033 f=0000 c=0 BYTE_DATA wr res=-121
LT_PMBusTest-2341 [001] .... 183.003644: smbus_read: i2c-7 a=033 f=0000 c=8b WORD_DATA
LT_PMBusTest-2341 [001] .... 183.003649: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [8b]
LT_PMBusTest-2341 [001] .... 183.003652: i2c_read: i2c-7 #1 a=033 f=0001 l=2
LT_PMBusTest-2341 [001] .... 183.004701: i2c_result: i2c-7 n=0 ret=-11
LT_PMBusTest-2341 [001] .... 183.004706: smbus_reply: i2c-7 a=033 f=0000 c=8b WORD_DATA l=2 [00-00]
LT_PMBusTest-2341 [001] .... 183.004709: smbus_result: i2c-7 a=033 f=0000 c=8b WORD_DATA rd res=-11
LT_PMBusTest-2341 [001] .... 183.004722: smbus_read: i2c-7 a=033 f=0000 c=20 BYTE_DATA
LT_PMBusTest-2341 [001] .... 183.004725: i2c_write: i2c-7 #0 a=033 f=0000 l=1 [20]
LT_PMBusTest-2341 [001] .... 183.004726: i2c_read: i2c-7 #1 a=033 f=0001 l=1
LT_PMBusTest-2341 [001] .... 183.051096: i2c_result: i2c-7 n=0 ret=-121
LT_PMBusTest-2341 [001] .... 183.051104: smbus_reply: i2c-7 a=033 f=0000 c=20 BYTE_DATA l=1 [00]
LT_PMBusTest-2341 [001] .... 183.051106: smbus_result: i2c-7 a=033 f=0000 c=20 BYTE_DATA rd res=-121
On Jan 2, 2015, at 1:27 PM, John 'Warthog9' Hawley <warthog19 at eaglescrag.net> wrote:
> On 01/02/2015 12:03 PM, Michael Jones wrote:
>> I am having some problems getting I2C to work with Kernel 3.18.1.
>>
>> Has anyone made I2C work on MinnowboardMax with 3.18.1 release? Where works means, i2cdetect can see devices on /dev/i2c-7 or can run extras.
>
> Can, or can not? The statement is a little oddly written so I just want
> to be clear if it works or not.
>
>> In my case, I am seeing bad behavior on the bus when monitoring with a scope. An ADDRESS + R is placed on the bus, then the clock line remains high for 15ms during the ACK, followed by a STOP. I see similar behavior with my own application where ADDRESS + W does the same thing, and it looks like it retries multiple times. All with known working hardware and code that runs on a Wandboard with Yocto Linux.
>
> What code is this, it might be helpful if we try to replicate this when
> we are back in the office next week?
>
>> To test further I ran minnow-max-extras/hse/hse-i2c-eeprom.sh and it fails to write. It actually prints:
>>
>> Error: Write failed
>> Error: Write failed
>> Error: Read failed
>
> So the hse directory there refers to the High Speed Expansion, I.E. the
> connector on the bottom of the board, not the 0.1" pins on top of the
> board, so it's unlikely going to work as written.
>
> This brings up an obvious question: are you attaching to the HSE (bottom
> high-density connector) or the LSE (0.1" pins on top).
>
> It would also be helpful to know:
>
> - What devices, specifically, are you attaching to where (model numbers
> would be helpful if we try to replicate)
>
>> My code can ioctl the /dev/i2c-7 and get a reasonable return from FUNCS. I am pretty sure the driver is all in place, or I would not get back a reasonable FUNCS list.
>
> does i2cdetect show the devices on the bus at the addresses you are
> expecting?
>
>>
>> Details on my version of OS.
>>
>> Installed Ubuntu 14.04.
>>
>> Compiled new 3.18.1 kernel after merging http://www.elinux.org/images/e/e2/Minnowmax-3.18.txt
>>
>> I used the release candidate version of this kernel for some UART code which worked fine. That confirms no general IO problems.
>>
>> I am not a kernel expert, so I am at a loss as to how to debug. Is there some logging I can turn on that might give some clues about what is going on in the driver? Perhaps there is a weblink with info on debugging the i2c driver?
>
> Has this worked on previous kernels?
>
> If you are in a multi-master situation this particular bug is tickled
> pretty hard:
>
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=6927
>
> which is a hardware change / fix and will be present on the A4 boards,
> but those haven't gone to production yet.
>
> It would help immensely to know what your setup is so we can double
> check it on Monday (assuming my inboxes are not a complete disasters)
> and try it for ourselves, otherwise I'm most likely going to just test
> with a calamari and a 3.18.something kernel (though I'm pretty sure I've
> tested that and it worked, but I'm not 100% sure right now if it was
> 3.18 or 3.17)
>
> - John 'Warthog9' Hawley
> _______________________________________________
> elinux-MinnowBoard mailing list
> elinux-MinnowBoard at lists.elinux.org
> http://lists.elinux.org/mailman/listinfo/elinux-minnowboard
More information about the elinux-MinnowBoard
mailing list