I2c not detected device


#1

Hello.

I try to connect WM8960CGEFL ( https://statics.cirrus.com/pubs/proDatasheet/WM8960_v4.2.pdf ) to i2c on Khadas.
Device is not detected by i2cdetect (other stuff connected to the same i2c bus is detected and they work correctly).

Results of i2cdetect:

khadas@Khadas:~$ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 05 06 [   85.076712@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.082337@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x30
07 [   85.088362@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.094038@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x31
08[   85.099902@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.105528@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x32
 0[   85.111479@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.117096@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x33
9 [   85.123052@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.128759@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x34
0a[   85.134638@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.140218@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x35
 [   85.146085@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.151667@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x36
0[   85.157561@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.163136@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x37
b 0c [   85.169313@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.174950@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x50
0[   85.180831@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.186420@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x51
d [   85.192411@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.198081@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x52
0[   85.203894@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.209462@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x53
e [   85.215431@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.221030@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x54
0f [   85.227024@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.232691@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x55

[   85.238650@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.244303@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x56
10[   85.250200@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.255841@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x57
: [   85.261730@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.267342@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x58
1[   85.273203@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.278919@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x59
0 [   85.284778@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.290371@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x5a
1[   85.296244@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.301827@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x5b
1[   85.307687@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.313304@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x5c
 [   85.319172@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.324778@2] i2c i2c-1: token 1, master_no(1) 300K addr 0x5d
1[   85.330634@2] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.336276@3] i2c i2c-1: token 1, master_no(1) 300K addr 0x5e
2[   85.342131@3] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   85.347762@3] i2c i2c-1: token 1, master_no(1) 300K addr 0x5f
 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: -- -- -- -- -- -- -- -- 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f

khadas@Khadas:~$ sudo i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 05 06[  103.533578@0] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.539212@0] i2c i2c-2: token 1, master_no(2) 300K addr 0x30
 07 08 0[  103.545645@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.551278@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x31
9 [  103.557251@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.562841@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x32
0[  103.568719@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.574294@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x33
a[  103.580179@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.585771@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x34
 0b 0c 0d 0e 0f
10: 10 11 12 13[  103.591637@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
 14 15 16 17 UU 19 1a 1b 1c 1d 1[  103.600015@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x35
e 1f
20: 20 21 22 23 24 25 26 27[  103.608703@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
 28 29 2a 2b 2c 2d 2e 2f
30: -[  103.617083@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x36
- -- -- -- -- -- -- [  103.625745@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.632970@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x37
-- 38 39 3a 3b 3c 3d 3e 3f
40: 40 4[  103.639175@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
1 42 43 44 45 46 47 48 49 4a 4b [  103.647531@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x50
4c 4d 4e 4f
50: -- 51 [  103.656367@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.663783@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x52
-- [  103.669683@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.675429@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x53
-- [  103.681391@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.687077@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x54
-- [  103.692971@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.698678@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x55
-- [  103.704611@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.710328@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x56
-- [  103.716302@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.722054@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x57
-- [  103.727898@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.733610@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x58
-- [  103.739577@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.745253@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x59
-- [  103.751197@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.756907@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x5a
-- [  103.762835@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.768540@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x5b
-- [  103.774496@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.780208@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x5c
-- [  103.786132@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.791826@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x5d
-- [  103.797820@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.803550@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x5e
-- [  103.809439@1] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[  103.815123@1] i2c i2c-2: token 1, master_no(2) 300K addr 0x5f
--
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77


khadas@Khadas:~$ sudo i2cget -f -y 1 0x1a 0x5
Error: Read failed
khadas@Khadas:~$ sudo i2cget -f -y 2 0x1a 0x5
Error: Read failed

I connected WM8960CGEFL to Raspberry, and it is detected by i2cdetect.

I tested two firmware:
VIM2_Ubuntu-server-bionic_Linux-4.9_arm64_EMMC_V20181030.img
VIM2_Ubuntu-server-bionic_Linux-3.14_arm64_EMMC_V20181030.img

On the Vim1 board WM8960 is also not detected.

And the result is same.

Where is the problem?


#2

FYI:


#3

Hello.

Gouwa, your solution is for Android. I use Ubuntu.

Davidfungf has the same problem:


#4

Hello jarbash,

Have you checked this documentation?


#5

Hello.

I know how to connect devices to i2c. On the same bus I have other devices (eg. MAX17048G) and all works fine.
Problem is only with WM8960C.


#6

Have you tried other i2c sensor? I don’t have WM8960C, but I tried other I2c sersor on VIM2, like APDS9960 and it works.


#7

Hello.

I have APDS9960 and it works.

I have 5 boards with WM8960C, and all of it not detecting only WM8960C, other i2c devices is detecting and working. But if I connect WM8960C to RPI, then i2cdetect shows this device.


#8

Not sure if the WM8960C need pull-up registors :wink: