i2c:soft:multi: Enable soft I2C multibus at Trats development board
This commit enables multibus handling at Samsung's Trats development board. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Acked-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
7ca8f73a0a
commit
fd8dca83ed
|
@ -75,6 +75,21 @@ int board_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void i2c_init_board(void)
|
||||
{
|
||||
struct exynos4_gpio_part1 *gpio1 =
|
||||
(struct exynos4_gpio_part1 *)samsung_get_base_gpio_part1();
|
||||
struct exynos4_gpio_part2 *gpio2 =
|
||||
(struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2();
|
||||
|
||||
/* I2C_5 -> PMIC */
|
||||
s5p_gpio_direction_output(&gpio1->b, 7, 1);
|
||||
s5p_gpio_direction_output(&gpio1->b, 6, 1);
|
||||
/* I2C_9 -> FG */
|
||||
s5p_gpio_direction_output(&gpio2->y4, 0, 1);
|
||||
s5p_gpio_direction_output(&gpio2->y4, 1, 1);
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE) +
|
||||
|
|
|
@ -211,18 +211,28 @@
|
|||
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - GENERATED_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_CACHELINE_SIZE 32
|
||||
|
||||
#include <asm/arch/gpio.h>
|
||||
/*
|
||||
* I2C Settings
|
||||
*/
|
||||
#define CONFIG_SOFT_I2C_GPIO_SCL exynos4_gpio_part1_get_nr(b, 7)
|
||||
#define CONFIG_SOFT_I2C_GPIO_SDA exynos4_gpio_part1_get_nr(b, 6)
|
||||
|
||||
#define CONFIG_SOFT_I2C
|
||||
#define CONFIG_SOFT_I2C_READ_REPEATED_START
|
||||
#define CONFIG_SYS_I2C_INIT_BOARD
|
||||
#define CONFIG_SYS_I2C_SPEED 50000
|
||||
#define CONFIG_I2C_MULTI_BUS
|
||||
#define CONFIG_SYS_MAX_I2C_BUS 7
|
||||
#define CONFIG_SOFT_I2C_MULTI_BUS
|
||||
#define CONFIG_SYS_MAX_I2C_BUS 15
|
||||
|
||||
#include <asm/arch/gpio.h>
|
||||
|
||||
/* I2C PMIC */
|
||||
#define CONFIG_SOFT_I2C_I2C5_SCL exynos4_gpio_part1_get_nr(b, 7)
|
||||
#define CONFIG_SOFT_I2C_I2C5_SDA exynos4_gpio_part1_get_nr(b, 6)
|
||||
|
||||
/* I2C FG */
|
||||
#define CONFIG_SOFT_I2C_I2C9_SCL exynos4_gpio_part2_get_nr(y4, 1)
|
||||
#define CONFIG_SOFT_I2C_I2C9_SDA exynos4_gpio_part2_get_nr(y4, 0)
|
||||
|
||||
#define CONFIG_SOFT_I2C_GPIO_SCL get_multi_scl_pin()
|
||||
#define CONFIG_SOFT_I2C_GPIO_SDA get_multi_sda_pin()
|
||||
#define I2C_INIT multi_i2c_init()
|
||||
|
||||
#define CONFIG_PMIC
|
||||
#define CONFIG_PMIC_I2C
|
||||
|
|
Loading…
Reference in a new issue