HI, dev:
i'm using kernel linux-4.1.18 on my board(am335x). i2c0 connect PCF8563 and SGL5000。
it runing success on must time, but sometimes fail, like:
Run FAIL:
omap_i2c 44e0b000.i2c: timeout waiting for bus ready
sgtl5000: probe of 0-000a failed with error -110
rtc-pcf8563 0-0051: chip found, driver version 0.4.3
omap_i2c 44e0b000.i2c: timeout waiting for bus ready
rtc-pcf8563 0-0051: pcf8563_write_block_data: err=-110 addr=0e, data=03
rtc-pcf8563 0-0051: pcf8563_probe: write error
rtc-pcf8563: probe of 0-0051 failed with error -5
RunSUCC:
gtl5000 0-000a: sgtl5000 revision 0x11
rtc-pcf8563 0-0051: chip found, driver version 0.4.3
rtc rtc0: invalid alarm value: 2017-8-2 30:0:0
rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
On fail state, test i2c0 using Oscilloscope, SDA & SDL is low level。
i'm guess it: i2c0 pinmux set failed? or others?
how can i do ?
first end:
On Faile, i'm using devmem2 read CONTROL register, show pinmux success:
AM335x:/usr/sbin# devmem2 0x44e10988/dev/mem opened.Memory mapped at address 0xb6fcd000.Read at address 0x44E10988 (0xb6fcd988): 0x00000030AM335x:/usr/sbin# devmem2 0x44e1098c/dev/mem opened.Memory mapped at address 0xb6f10000.Read at address 0x44E1098C (0xb6f1098c): 0x00000030
Jian Zhou:
回复 first end:
I2C的管脚有上拉处理么?这里可以写中文的。
first end:
回复 Jian Zhou:
已经核对过,有对应的上拉处理。 我们感觉有可能是PCF8563或SGL5000有问题,将一块板子的PCF8563去掉,另一块板子的SGL5000去掉,还在测试,还没有重现问题。 这个问题的重现也不是很方便,测试一天,也就出现2到3次。
Jian Zhou:
回复 first end:
会不会是制版或者焊接的问题?
first end:
回复 Jian Zhou:
这个第一时间检查过了。现在已经将I2C CLOCK 降到10K了,但还是能测试出现。想不明白啊,I2C的CLK脚只有CPU才能将它拉低,感觉是AM335X没用好,但重新启动系统,一点效果都没有。复位OMAP I2C也没作用。