[RK3288][Android6.0] 调试笔记 --- I2C通信失败问题

Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92

使用rk3288的i2c5读写时,会出现以下error log:
root@rk3288:/ # cat /sys/bus/i2c/drivers/at24/5-0050/eeprom                                  
[   24.297924] rockchip_i2c ff170000.i2c: Addr[0x0050] wait event timeout, state: 1, is_busy: 1, error: 0, complete_what: 0x0, ipd: 0x0
[   24.302052] rockchip_i2c ff170000.i2c: I2C_CON: start bit is set
[   24.514383] rockchip_i2c ff170000.i2c: Addr[0x0050] wait event timeout, state: 2, is_busy: 1, error: 0, complete_what: 0x2, ipd: 0x20

解决方法:
[kris@:~/rk3288/kernel]$ g df arch/arm/boot/dts/rk3288-pinctrl.dtsi
diff --git a/arch/arm/boot/dts/rk3288-pinctrl.dtsi b/arch/arm/boot/dts/rk3288-pinctrl.dtsi
index a35d4d7..4a4ebc8 100755
--- a/arch/arm/boot/dts/rk3288-pinctrl.dtsi
+++ b/arch/arm/boot/dts/rk3288-pinctrl.dtsi
@@ -404,21 +404,21 @@
 
                gpio7_i2c5 {
                        i2c5_sda:i2c5-sda {
-                               rockchip,pins = ;
+                               rockchip,pins = ;
                                rockchip,pull = ;
                                rockchip,drive = ;
                                //rockchip,tristate = ;
                        };
 
                        i2c5_scl:i2c5-scl {
-                               rockchip,pins = ;
+                               rockchip,pins = ;
                                rockchip,pull = ;
                                rockchip,drive = ;
                                //rockchip,tristate = ;
                        };
 
                        i2c5_gpio: i2c5-gpio {
-                               rockchip,pins = , ;
+                               rockchip,pins = , ;
                                rockchip,drive = ;
                        };
                };

很奇怪I2C的配置居然也有两种,datasheet也没具体说明这两种i2c复用功能的区别.

[RK3288][Android6.0] 调试笔记 --- I2C通信失败问题_第1张图片

你可能感兴趣的:(子类__I2C)