[PATCH v2 06/11] sunxi: Add support for I2C1 on PB pins for the V3/V3s
Paul Kocialkowski
paulk at sys-base.io
Thu Aug 7 10:32:53 CEST 2025
Hi,
Le Tue 05 Aug 25, 19:48, Paul Kocialkowski a écrit :
> From: Paul Kocialkowski <contact at paulk.fr>
>
> Both the V3 and V3s support I2C1 on PB pins, which is often used to
> connect an AXP209 PMIC on V3 boards.
Actually this appears to be wrong. I had this patch around for a while but
I was mistaken about the AXP209, which is typically connected to I2C0, not
I2C1.
So I think this patch could be dropped, it won't be directly useful for our
supported boards anyway.
All the best,
Paul
> Signed-off-by: Paul Kocialkowski <contact at paulk.fr>
> ---
> board/sunxi/board.c | 4 ++++
> include/sunxi_gpio.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index 6520636ffab5..72aa86cd752d 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -98,6 +98,10 @@ void i2c_init_board(void)
> sunxi_gpio_set_cfgpin(SUNXI_GPH(16), SUN6I_GPH_TWI1);
> sunxi_gpio_set_cfgpin(SUNXI_GPH(17), SUN6I_GPH_TWI1);
> clock_twi_onoff(1, 1);
> +#elif defined(CONFIG_MACH_SUN8I_V3_V3S)
> + sunxi_gpio_set_cfgpin(SUNXI_GPB(8), SUN8I_V3S_GPB_TWI1);
> + sunxi_gpio_set_cfgpin(SUNXI_GPB(9), SUN8I_V3S_GPB_TWI1);
> + clock_twi_onoff(1, 1);
> #elif defined(CONFIG_MACH_SUN8I)
> sunxi_gpio_set_cfgpin(SUNXI_GPH(4), SUN8I_GPH_TWI1);
> sunxi_gpio_set_cfgpin(SUNXI_GPH(5), SUN8I_GPH_TWI1);
> diff --git a/include/sunxi_gpio.h b/include/sunxi_gpio.h
> index 12b54c8dda4d..e166b9758f44 100644
> --- a/include/sunxi_gpio.h
> +++ b/include/sunxi_gpio.h
> @@ -110,6 +110,7 @@ enum sunxi_gpio_number {
> #define SUN4I_GPB_TWI1 2
> #define SUN5I_GPB_TWI1 2
> #define SUN8I_V3S_GPB_TWI0 2
> +#define SUN8I_V3S_GPB_TWI1 2
> #define SUN4I_GPB_UART0 2
> #define SUN5I_GPB_UART0 2
> #define SUN8I_GPB_UART2 2
> --
> 2.49.0
>
--
Paul Kocialkowski,
Independent contractor - sys-base - https://www.sys-base.io/
Free software developer - https://www.paulk.fr/
Expert in multimedia, graphics and embedded hardware support with Linux.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250807/cfbf3218/attachment.sig>
More information about the U-Boot
mailing list