summaryrefslogtreecommitdiff
path: root/board/sunxi
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-06-13 22:55:49 +0200
committerIan Campbell <ijc@hellion.org.uk>2014-07-18 19:41:30 +0100
commit6620377e4b8be3c232c59d673efcd673c30bc69f (patch)
treec04ee4d95f5eca88f6be5e2266701b57c190d2b4 /board/sunxi
parent0db2bbdc04c7ba41861e686acb815fce5a227a01 (diff)
downloadu-boot-imx-6620377e4b8be3c232c59d673efcd673c30bc69f.zip
u-boot-imx-6620377e4b8be3c232c59d673efcd673c30bc69f.tar.gz
u-boot-imx-6620377e4b8be3c232c59d673efcd673c30bc69f.tar.bz2
sunxi: Add i2c support
Add support for the i2c controller found on all Allwinner sunxi SoCs, this is the same controller as found on the Marvell orion5x and kirkwood SoC families, with a slightly different register layout, so this patch uses the existing mvtwsi code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> Acked-By: Prafulla Wadaskar <prafulla@marvell.com> Acked-by: Heiko Schocher <hs@denx.de> [ ijc -- updated u-boot-spl-fel.lds ]
Diffstat (limited to 'board/sunxi')
-rw-r--r--board/sunxi/board.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index b05d0b9..543b809 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -106,6 +106,13 @@ int board_mmc_init(bd_t *bis)
}
#endif
+void i2c_init_board(void)
+{
+ sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUNXI_GPB0_TWI0);
+ sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUNXI_GPB0_TWI0);
+ clock_twi_onoff(0, 1);
+}
+
#ifdef CONFIG_SPL_BUILD
void sunxi_board_init(void)
{