新手入门
- 积分
- 5
- 金钱
- 5
- 注册时间
- 2023-2-28
- 在线时间
- 0 小时
|
楼主 |
发表于 2023-2-28 17:37:23
|
显示全部楼层
设备树是这样写的,看起来也没问题,/dev/下面生成了两个I2C 虚拟设备,分别是/dev/i2c-4 和/dev/i2c-5, 但是用i2cdetect 去扫描就不正常
i2c@1 {
compatible = "i2c-gpio";
gpios = <&gpio1 29 0
&gpio1 28 0>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <0>; /* ~100 kHz */
i2c-gpio,timeout-ms = <10>;
#address-cells = <1>;
#size-cells = <0>;
};
i2c@2 {
compatible = "i2c-gpio";
gpios = <&gpio4 20 0
&gpio4 21 0>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <0>; /* ~100 kHz */
i2c-gpio,timeout-ms = <10>;
#address-cells = <1>;
#size-cells = <0>;
}; |
|