[T113-s3][u-boot] PG10/PG11 (TWI3) pinmux overridden before late_init
Lukas Schmid
lukas.schmid at netcube.li
Wed Jul 9 18:24:02 CEST 2025
Hi all,
I'm working on enabling TWI3 (I2C3) on the Allwinner T113-S3 (sun8iw20) in U-
Boot.
I set up the pinmux and clock for PG10/PG11 (function 3 for TWI3) using:
sunxi_gpio_set_cfgpin(SUNXI_GPG(10), SUN8I_GPG_TWI3);
sunxi_gpio_set_cfgpin(SUNXI_GPG(11), SUN8I_GPG_TWI3);
clock_twi_onoff(3, 1);
I also added the missing macro:
#define SUN8I_GPG_TWI3 3
This works fine if I call it in board_late_init(), but if I set it earlier
(e.g., i2c_init_board() or board_init()), the PG10/PG11 mux settings get
overwritten or cleared later on.
I verified the pinctrl register at 0x01C20824 (for PG10/PG11) is reset to
0xFFFFFFFF unless I reapply it in board_late_init(). Curiously, this does not
happen to nearby ports like PG0–PG7 (0x01C20820), which remain intact.
Is there some known U-Boot path that resets PG10/PG11 mux early on T113-S3?
Best regards,
Lukas Schmid
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250709/22651285/attachment.sig>
More information about the U-Boot
mailing list