aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.io>2020-10-26 22:19:34 +0800
committerAndre Przywara <andre.przywara@arm.com>2020-11-17 00:42:21 +0000
commit8c51c65273628a3da3c18b258cecb27835e52727 (patch)
tree9d0c643a3c66bf23f694f801bcdba7de3ff4ff4a /board
parent6ffdc43cc5e6070edf91bac653cc8a0449dbe545 (diff)
sunxi: allow to use AXP20[39] attached to I2C0 on V3 series
The reference design of Allwinner V3 series uses an AXP203 or AXP209 PMIC attached to the I2C0 bus of the SoC, although the first community-available V3s board, Lichee Pi Zero, omitted it. Allow to introduce support for the PMIC on boards with it. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/board.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index e94139d6a88..708a27ed78e 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -102,6 +102,10 @@ void i2c_init_board(void)
sunxi_gpio_set_cfgpin(SUNXI_GPH(14), SUN6I_GPH_TWI0);
sunxi_gpio_set_cfgpin(SUNXI_GPH(15), SUN6I_GPH_TWI0);
clock_twi_onoff(0, 1);
+#elif defined(CONFIG_MACH_SUN8I_V3S)
+ sunxi_gpio_set_cfgpin(SUNXI_GPB(6), SUN8I_V3S_GPB_TWI0);
+ sunxi_gpio_set_cfgpin(SUNXI_GPB(7), SUN8I_V3S_GPB_TWI0);
+ clock_twi_onoff(0, 1);
#elif defined(CONFIG_MACH_SUN8I)
sunxi_gpio_set_cfgpin(SUNXI_GPH(2), SUN8I_GPH_TWI0);
sunxi_gpio_set_cfgpin(SUNXI_GPH(3), SUN8I_GPH_TWI0);