public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Warren <twarren.nvidia@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] Tegra30: I2C: Enable I2C driver on Cardhu
Date: Fri, 21 Dec 2012 17:16:39 -0700	[thread overview]
Message-ID: <1356135399-28339-4-git-send-email-twarren@nvidia.com> (raw)
In-Reply-To: <1356135399-28339-1-git-send-email-twarren@nvidia.com>

Tested all 5 'buses', i2c probe enumerates device addresses on all
but dev 4 (I2C4) [no devices on that bus on my Cardhu].

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

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

diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h
index 471df6e..aa725ba 100644
--- a/include/configs/cardhu.h
+++ b/include/configs/cardhu.h
@@ -38,6 +38,15 @@
 #define CONFIG_MACH_TYPE		MACH_TYPE_CARDHU
 
 #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
 
 #include "tegra-common-post.h"
diff --git a/include/configs/tegra30-common.h b/include/configs/tegra30-common.h
index 282caec..04517e1 100644
--- a/include/configs/tegra30-common.h
+++ b/include/configs/tegra30-common.h
@@ -83,4 +83,7 @@
 
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/tegra30/u-boot-spl.lds"
 
+/* Total I2C ports on Tegra30 */
+#define TEGRA_I2C_NUM_CONTROLLERS	5
+
 #endif /* _TEGRA30_COMMON_H_ */
-- 
1.7.0.4

  parent reply	other threads:[~2012-12-22  0:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-22  0:16 [U-Boot] [PATCH 0/3] Add I2C driver for Tegra30 Cardhu Tom Warren
2012-12-22  0:16 ` [U-Boot] [PATCH 1/3] Tegra30: clocks: Fix clock tables for I2C and other periphs Tom Warren
2013-01-02 20:35   ` Stephen Warren
2013-01-02 20:54     ` Tom Warren
2012-12-22  0:16 ` [U-Boot] [PATCH 2/3] Tegra30: fdt: Update DT files with I2C info for T30/Cardhu Tom Warren
2013-01-02 20:41   ` Stephen Warren
2013-01-02 20:58     ` Tom Warren
2013-01-02 21:10       ` Stephen Warren
2012-12-22  0:16 ` Tom Warren [this message]
2013-01-02 20:42   ` [U-Boot] [PATCH 3/3] Tegra30: I2C: Enable I2C driver on Cardhu Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1356135399-28339-4-git-send-email-twarren@nvidia.com \
    --to=twarren.nvidia@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox