From: Robert Baldyga Date: Mon, 6 Oct 2014 12:33:11 +0000 (+0200) Subject: arm: goni: add i2c_init_board() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4d38395c1585e54f23b9fd53f9694beb1931ba64;p=project%2Fbcm63xx%2Fu-boot.git arm: goni: add i2c_init_board() Add proper initialization of GPIO pins used by software i2c. Signed-off-by: Robert Baldyga Acked-by: Simon Glass --- diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index eb0f9bffae..5f76be358a 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -33,6 +33,16 @@ int board_init(void) return 0; } +#ifdef CONFIG_SYS_I2C_INIT_BOARD +void i2c_init_board(void) +{ + gpio_request(S5PC110_GPIO_J43, "i2c_clk"); + gpio_request(S5PC110_GPIO_J40, "i2c_data"); + gpio_direction_output(S5PC110_GPIO_J43, 1); + gpio_direction_output(S5PC110_GPIO_J40, 1); +} +#endif + int power_init_board(void) { int ret; diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 0c6e9c7878..fc2497a332 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -276,6 +276,8 @@ #define CONFIG_SYS_I2C_SOFT_SPEED 50000 #define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F #define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C_INIT_BOARD + #define CONFIG_SYS_MAX_I2C_BUS 7 #define CONFIG_USB_GADGET #define CONFIG_USB_GADGET_S3C_UDC_OTG