Patchwork [U-Boot,2/2] i2c:soft:multi: Enable soft I2C multibus at Trats development board

login
register
mail settings
Submitter Łukasz Majewski
Date Aug. 28, 2012, 8:33 a.m.
Message ID <1346142797-17645-3-git-send-email-l.majewski@samsung.com>
Download mbox | patch
Permalink /patch/180380/
State Superseded
Delegated to: Heiko Schocher
Headers show

Comments

Łukasz Majewski - Aug. 28, 2012, 8:33 a.m.
This commit enables multibus handling at Trats development board.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 include/configs/trats.h |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

Patch

diff --git a/include/configs/trats.h b/include/configs/trats.h
index c6fb2e0..bb764a5 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -235,12 +235,6 @@ 
 #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
@@ -248,6 +242,19 @@ 
 #define CONFIG_I2C_MULTI_BUS
 #define CONFIG_SYS_MAX_I2C_BUS	7
 
+#include <asm/arch/gpio.h>
+
+#define CONFIG_SOFT_I2C_I2C4_SCL exynos4_gpio_part1_get_nr(b, 3)
+#define CONFIG_SOFT_I2C_I2C4_SDA exynos4_gpio_part1_get_nr(b, 2)
+
+#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)
+
+#define CONFIG_SOFT_I2C_GPIO_SCL get_multi_scl_pin()
+#define CONFIG_SOFT_I2C_GPIO_SDA get_multi_sda_pin()
+/* I2C_INIT defined to skip soft_i2c.c default one */
+#define I2C_INIT multi_i2c_init()
+
 #define CONFIG_PMIC
 #define CONFIG_PMIC_I2C
 #define CONFIG_PMIC_MAX8997