官方镜像可以识别出i2c设备,6.10的内核输出i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0。硬件、设备树应该没有问题,6.10的.config文件i2c下多了i2c bus multiplexing support选项关闭与否都没办法使用,查看驱动代码基本一致,有没有老哥教一下怎么排查。
离线
可以对比一下老内核的驱动看看有什么变化,我用的6.1内核IIC功能正常
测试了一下发现没办法在dts中变更设备状态,写在dtsi中才能正常使用I2C
i2c0: i2c@1c27000 {
compatible = "allwinner,suniv-f1c100s-i2c",
"allwinner,sun6i-a31-i2c";
reg = <0x01c27000 0x400>;
interrupts = <7>;
clocks = <&ccu CLK_BUS_I2C0>;
resets = <&ccu RST_BUS_I2C0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pd_pins>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
};
&i2c0 {
/*pinctrl-0 = <&i2c0_pd_pins>;
pinctrl-name = "default";
status = "okay";*/
ssd1306:oled@3c{
compatible = "solomon,ssd1306fb-i2c";
reg = <0x3c>;
solomon,height = <64>;
solomon,width = <128>;
};
};
离线
@ohmyzsh
你下面的dts中pinctrl-name少了个s,正确的应该是pinctrl-names
试了一下确实是少了个s,有没有检查工具能检查出语法问题的 o.0
离线