diff options
author | Vasily Khoruzhick | 2018-11-05 20:24:30 -0800 |
---|---|---|
committer | Jagan Teki | 2018-11-13 22:09:10 +0530 |
commit | 31a4ac4d79d75baeede3edfa95515fd4169ef502 (patch) | |
tree | 28843ebef799d7cfb99ce703313f39a43824f451 /board/sunxi | |
parent | 8336a43792a103c13d939b3925cb75322911f7fb (diff) |
sun50i: A64: add support for R_I2C controller
Allwinner A64 has a I2C controller, which is in the R_ MMIO zone and has
two groups of pinmuxes on PL bank, so it's called R_I2C.
Add support for this I2C controller and the pinmux which doesn't conflict
with RSB.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Vagrant Cascadian <vagrant@debian.org>
Acked-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'board/sunxi')
-rw-r--r-- | board/sunxi/board.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index b196d48674c..64ccbc7245f 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -168,10 +168,16 @@ void i2c_init_board(void) #endif #ifdef CONFIG_R_I2C_ENABLE +#ifdef CONFIG_MACH_SUN50I + clock_twi_onoff(5, 1); + sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI); + sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI); +#else clock_twi_onoff(5, 1); sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN8I_H3_GPL_R_TWI); sunxi_gpio_set_cfgpin(SUNXI_GPL(1), SUN8I_H3_GPL_R_TWI); #endif +#endif } #if defined(CONFIG_ENV_IS_IN_MMC) && defined(CONFIG_ENV_IS_IN_FAT) |