diff mbox

[U-Boot,2/2] Tegra114: I2C: Enable I2C driver on Dalmore E1611 eval board

Message ID 1359487175-21064-3-git-send-email-twarren@nvidia.com
State Superseded
Delegated to: Tom Warren
Headers show

Commit Message

Tom Warren Jan. 29, 2013, 7:19 p.m. UTC
Tested all 5 'buses', i2c probe enumerates device addresses on bus
1 and 2.

Note that this uses the tegra_i2c.c driver w/o modification.

Signed-off-by: Tom Warren <twarren@nvidia.com>
---
 include/configs/dalmore.h         |    9 +++++++++
 include/configs/tegra114-common.h |    3 +++
 2 files changed, 12 insertions(+), 0 deletions(-)

Comments

Stephen Warren Jan. 29, 2013, 8:11 p.m. UTC | #1
On 01/29/2013 12:19 PM, Tom Warren wrote:
> Tested all 5 'buses', i2c probe enumerates device addresses on bus
> 1 and 2.

Why don't the other 3 buses work?

> Note that this uses the tegra_i2c.c driver w/o modification.

The kernel patches imply some mandatory differences in clock divider
programming; see:

https://patchwork.kernel.org/patch/1936371/
Tom Warren Jan. 29, 2013, 8:42 p.m. UTC | #2
Stephen,

On Tue, Jan 29, 2013 at 1:11 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 01/29/2013 12:19 PM, Tom Warren wrote:
>> Tested all 5 'buses', i2c probe enumerates device addresses on bus
>> 1 and 2.
>
> Why don't the other 3 buses work?

No idea, but I assume because my Dalmore doesn't have sub-boards w/I2C
devices connected (gyro, accel, camera, etc.)

>
>> Note that this uses the tegra_i2c.c driver w/o modification.
>
> The kernel patches imply some mandatory differences in clock divider
> programming; see:
>
> https://patchwork.kernel.org/patch/1936371/

I'll take a look. Thanks.

Tom
diff mbox

Patch

diff --git a/include/configs/dalmore.h b/include/configs/dalmore.h
index ce32c80..b1a6e34 100644
--- a/include/configs/dalmore.h
+++ b/include/configs/dalmore.h
@@ -41,6 +41,15 @@ 
 #define CONFIG_MACH_TYPE		MACH_TYPE_DALMORE
 
 #define CONFIG_BOARD_EARLY_INIT_F
+
+/* I2C */
+#define CONFIG_TEGRA_I2C
+#define CONFIG_SYS_I2C_INIT_BOARD
+#define CONFIG_I2C_MULTI_BUS
+#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
+#define CONFIG_SYS_I2C_SPEED		100000
+#define CONFIG_CMD_I2C
+
 #define CONFIG_ENV_IS_NOWHERE
 
 #define MACH_TYPE_DALMORE	4304	/* not yet in mach-types.h */
diff --git a/include/configs/tegra114-common.h b/include/configs/tegra114-common.h
index 0033530..c2986d8 100644
--- a/include/configs/tegra114-common.h
+++ b/include/configs/tegra114-common.h
@@ -76,4 +76,7 @@ 
 
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/tegra114/u-boot-spl.lds"
 
+/* Total I2C ports on Tegra114 */
+#define TEGRA_I2C_NUM_CONTROLLERS	5
+
 #endif /* _TEGRA114_COMMON_H_ */