From da1ae5905ee84032bea187e4845a2f6743cf8ac4 Mon Sep 17 00:00:00 2001 From: Stefan Mavrodiev Date: Tue, 8 Jan 2019 12:04:30 +0200 Subject: 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 Acked-by: Maxime Ripard Reviewed-by: Jagan Teki --- board/sunxi/board.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'board') diff --git a/board/sunxi/board.c b/board/sunxi/board.c index f022f365e9..ad14837291 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(2), SUN8I_GPH_TWI0); sunxi_gpio_set_cfgpin(SUNXI_GPH(3), SUN8I_GPH_TWI0); clock_twi_onoff(0, 1); +#elif defined(CONFIG_MACH_SUN50I) + sunxi_gpio_set_cfgpin(SUNXI_GPH(0), SUN50I_GPH_TWI0); + sunxi_gpio_set_cfgpin(SUNXI_GPH(1), SUN50I_GPH_TWI0); + clock_twi_onoff(0, 1); #endif #endif @@ -120,6 +124,10 @@ void i2c_init_board(void) sunxi_gpio_set_cfgpin(SUNXI_GPH(4), SUN8I_GPH_TWI1); sunxi_gpio_set_cfgpin(SUNXI_GPH(5), SUN8I_GPH_TWI1); clock_twi_onoff(1, 1); +#elif defined(CONFIG_MACH_SUN50I) + sunxi_gpio_set_cfgpin(SUNXI_GPH(2), SUN50I_GPH_TWI1); + sunxi_gpio_set_cfgpin(SUNXI_GPH(3), SUN50I_GPH_TWI1); + clock_twi_onoff(1, 1); #endif #endif @@ -142,6 +150,10 @@ void i2c_init_board(void) sunxi_gpio_set_cfgpin(SUNXI_GPE(12), SUN8I_GPE_TWI2); sunxi_gpio_set_cfgpin(SUNXI_GPE(13), SUN8I_GPE_TWI2); clock_twi_onoff(2, 1); +#elif defined(CONFIG_MACH_SUN50I) + sunxi_gpio_set_cfgpin(SUNXI_GPE(14), SUN50I_GPE_TWI2); + sunxi_gpio_set_cfgpin(SUNXI_GPE(15), SUN50I_GPE_TWI2); + clock_twi_onoff(2, 1); #endif #endif -- cgit From 7d659573cef7f0333e4cab1916197160abff1455 Mon Sep 17 00:00:00 2001 From: Aleksandr Aleksandrov Date: Fri, 5 Oct 2018 15:55:59 +0300 Subject: board: sun50i-h5: Add Emlid Neutis N5 support Emlid Neutis N5 is a SoM based on Allwinner H5, has a WiFi & BT module, DDR3 RAM and eMMC. - add neutis-devboard target to dtb makefile - add dtsi file for Neutis N5 needs - add config file for Neutis N5 Dev board Signed-off-by: Aleksandr Aleksandrov Acked-by: Maxime Ripard Reviewed-by: Jagan Teki [jagan: update proper commit head] Signed-off-by: Jagan Teki --- board/sunxi/MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board') diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS index 9b6e0c4c21..608a86be49 100644 --- a/board/sunxi/MAINTAINERS +++ b/board/sunxi/MAINTAINERS @@ -182,6 +182,11 @@ M: Chen-Yu Tsai S: Maintained F: configs/Cubietruck_plus_defconfig +EMLID NEUTIS N5 DEV BOARD +M: Aleksandr Aleksandrov +S: Maintained +F: configs/emlid_neutis_n5_devboard_defconfig + GEMEI-G9 TABLET M: Priit Laes S: Maintained -- cgit