@whycan 将设备树这三行注释掉就好了,
twi_drv_used = <1>;
dmas = <&dma 45>, <&dma 45>;
dma-names = "tx", "rx";
@whycan 将设备树这三行注释掉就好了,
twi_drv_used = <1>;
dmas = <&dma 45>, <&dma 45>;
dma-names = "tx", "rx";
T113S使用i2c接口连接外置RTC初始化失败,这个是什么原因
[ 4.429716] sunxi-i2c sunxi-i2c2: sunxi-i2c2 supply twi not found, using dummy regulator
[ 4.444395] sunxi-i2c sunxi-i2c2: drv-mode: Timeout when sending 9th SCL clk
[ 4.452364] sunxi-i2c sunxi-i2c2: drv-mode: xfer failed (dev addr:0x51)
[ 4.459795] rtc-pcf8563 2-0051: pcf8563_write_block_data: err=-22 addr=0e, data=03
[ 4.468327] rtc-pcf8563 2-0051: pcf8563_probe: write error
[ 4.474816] rtc-pcf8563: probe of 2-0051 failed with error -5
[ 4.481305] sunxi-i2c sunxi-i2c2: probe success
[ 4.488591] sunxi-i2c sunxi-i2c3: sunxi-i2c3 supply twi not found, using dummy regulator
[ 4.501228] sunxi-i2c sunxi-i2c3: probe success
使用longanLinux kernel5.4设备树配置
twi2_pins_a: twi2@0 {
pins = "PG14", "PG15";
function = "twi2";
drive-strength = <10>;
};
twi2_pins_b: twi2@1 {
pins = "PG14", "PG15";
function = "gpio_in";
};
&twi2 {
clock-frequency = <400000>;
pinctrl-0 = <&twi2_pins_a>;
pinctrl-1 = <&twi2_pins_b>;
pinctrl-names = "default", "sleep";
twi_drv_used = <1>;
dmas = <&dma 45>, <&dma 45>;
dma-names = "tx", "rx";
status = "okay";
pcf8563: pcf8563@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
#clock-cells = <0>;
};
};