[U-Boot] [PATCH 11/12] Davinci: ea20: added I2C support
Stefano Babic
sbabic at denx.de
Wed Oct 5 11:43:38 CEST 2011
Signed-off-by: Stefano Babic <sbabic at denx.de>
CC: Sandeep Paulraj <s-paulraj at ti.com>
---
board/davinci/ea20/ea20.c | 7 +++++++
include/configs/ea20.h | 8 ++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index d581cdd..720a360 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -65,6 +65,12 @@ static const struct pinmux_config spi1_pins[] = {
{ pinmux(5), 1, 5 }
};
+/* I2C pin muxer settings */
+static const struct pinmux_config i2c_pins[] = {
+ { pinmux(4), 2, 2 },
+ { pinmux(4), 2, 3 }
+};
+
/* UART0 pin muxer settings */
static const struct pinmux_config uart_pins[] = {
{ pinmux(3), 2, 7 },
@@ -148,6 +154,7 @@ static const struct pinmux_resource pinmuxes[] = {
PINMUX_ITEM(spi1_pins),
#endif
PINMUX_ITEM(uart_pins),
+ PINMUX_ITEM(i2c_pins),
#ifdef CONFIG_NAND_DAVINCI
PINMUX_ITEM(nand_pins),
#endif
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index aeeed09..ceb84a4 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -87,6 +87,13 @@
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
/*
+ * I2C Configuration
+ */
+#define CONFIG_HARD_I2C
+#define CONFIG_DRIVER_DAVINCI_I2C
+#define CONFIG_SYS_I2C_SPEED 100000
+
+/*
* Network & Ethernet Configuration
*/
#ifdef CONFIG_DRIVER_TI_EMAC
@@ -160,6 +167,7 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_SAVES
#define CONFIG_CMD_MEMORY
+#define CONFIG_CMD_I2C
#ifndef CONFIG_DRIVER_TI_EMAC
#undef CONFIG_CMD_NET
--
1.7.1
More information about the U-Boot
mailing list