[U-Boot] [PATCH] cm-t35: add I2C multi-bus support

Igor Grinberg grinberg at compulab.co.il
Mon Apr 2 14:29:31 CEST 2012


From: Nikita Kiryanov <nikita at compulab.co.il>

Enable I2C multi-bus support and config I2C muxes for I2C2 and I2C3.

Signed-off-by: Nikita Kiryanov <nikita at compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
---
 board/cm_t35/cm_t35.c    |    6 ++++++
 include/configs/cm_t35.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c
index 0a04994..bc991c4 100644
--- a/board/cm_t35/cm_t35.c
+++ b/board/cm_t35/cm_t35.c
@@ -241,6 +241,12 @@ static void cm_t3x_set_common_muxconf(void)
 	/* I2C1 */
 	MUX_VAL(CP(I2C1_SCL),		(IEN  | PTU | EN  | M0)); /*I2C1_SCL*/
 	MUX_VAL(CP(I2C1_SDA),		(IEN  | PTU | EN  | M0)); /*I2C1_SDA*/
+	/* I2C2 */
+	MUX_VAL(CP(I2C2_SCL),		(IEN  | PTU | EN  | M0)); /*I2C2_SCL*/
+	MUX_VAL(CP(I2C2_SDA),		(IEN  | PTU | EN  | M0)); /*I2C2_SDA*/
+	/* I2C3 */
+	MUX_VAL(CP(I2C3_SCL),		(IEN  | PTU | EN  | M0)); /*I2C3_SCL*/
+	MUX_VAL(CP(I2C3_SDA),		(IEN  | PTU | EN  | M0)); /*I2C3_SDA*/
 
 	/* control and debug */
 	MUX_VAL(CP(SYS_32K),		(IEN  | PTD | DIS | M0)); /*SYS_32K*/
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index fe91c10..b28bd8e 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -156,6 +156,7 @@
 #define CONFIG_DRIVER_OMAP34XX_I2C
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
+#define CONFIG_I2C_MULTI_BUS
 
 /*
  * TWL4030
-- 
1.7.3.4



More information about the U-Boot mailing list