]> git.baikalelectronics.ru Git - uboot.git/commit
sunxi: board: Add i2c initialization for sun50i
authorStefan Mavrodiev <stefan@olimex.com>
Tue, 8 Jan 2019 10:04:30 +0000 (12:04 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 18 Jan 2019 16:49:08 +0000 (22:19 +0530)
commit76d89581ec762b406feb835fac4c8d8d4e8a413d
tree5b90f14e814a4e7cd57a27ed5db392658985d069
parent096dd774c5a8f5d813c1edec50c67e37638c574b
sunxi: board: Add i2c initialization for sun50i

To use TWI0/1/2 the user can select CONFIG_I2C#_ENABLE.
However even the controller is enabled, the mux for the pins
are not set.

This patch follows the existing mux method. Since the pads are
different, separate check is added for each i2c.

Tested with A64-SOM204 board.

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
arch/arm/include/asm/arch-sunxi/gpio.h
board/sunxi/board.c