I2C0 on T113-S3

45 views
Skip to first unread message

Jakob L

unread,
Jan 29, 2024, 7:01:20 AMJan 29
to linux-sunxi
Hi!
I am now having issues with i2c on T113. The pin nodes were added to sunxi-d1s-t113.dts. They are not there by default.

--- a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi
+++ b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi
@@ -52,6 +52,11 @@ pio: pinctrl@2000000 {
  #gpio-cells = <3>;
  #interrupt-cells = <3>;
 
+ i2c0_pins: i2c0-pins {
+ pins = "PB3", "PB2";
+ function = "i2c0";
+ };
+
  /omit-if-no-ref/
  can0_pins: can0-pins {
  pins = "PB2", "PB3";

and added i2c0 to my dts.

+&i2c0 {
+ pinctrl-0 = <&i2c0_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};

There are pullups on the board and the lines are actually pulled up to 3.3V.
But the i2cdetect command results in faulure. With connected i2c-slave and without.
Error message is: mv64xxx: I2C bus locked, block: 1

pinctrl-sun20i-d1.c does have the correct definitions. So that should be fine.
I also tried pins = "PB3", "PB2", because i think in other dtsi the first pin is SCL.

Anyone has a working i2c on this chip?



Jakob L

unread,
Feb 1, 2024, 8:50:57 AMFeb 1
to linux-sunxi
Sorry to have posted this here, i found somebody else having that problem on D1 and figured it might be some error in the dtsi - as it is missing pindefs.
Only thing missing above was the pinctrl-names in the i2c0 node.
pinctrl-names = "default";
Reply all
Reply to author
Forward
0 new messages