From: Troy Kisky <troy.kisky@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] mx6qsabrelite: add i2c support
Date: Tue, 24 Apr 2012 20:33:26 -0700 [thread overview]
Message-ID: <1335324807-16177-2-git-send-email-troy.kisky@boundarydevices.com> (raw)
In-Reply-To: <1335324807-16177-1-git-send-email-troy.kisky@boundarydevices.com>
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
board/freescale/mx6qsabrelite/mx6qsabrelite.c | 11 +++++++++++
include/configs/mx6qsabrelite.h | 8 ++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
index 1d09a72..8690f22 100644
--- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
+++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
@@ -50,6 +50,11 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_PUS_100K_DOWN | PAD_CTL_SPEED_MED | \
PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
+#define I2C_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
+ PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
+ PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \
+ PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+
int dram_init(void)
{
gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
@@ -67,6 +72,11 @@ iomux_v3_cfg_t uart2_pads[] = {
MX6Q_PAD_EIM_D27__UART2_RXD | MUX_PAD_CTRL(UART_PAD_CTRL),
};
+iomux_v3_cfg_t i2c3_pads[] = {
+ MX6Q_PAD_GPIO_5__I2C3_SCL | MUX_PAD_CTRL(I2C_PAD_CTRL),
+ MX6Q_PAD_GPIO_16__I2C3_SDA | MUX_PAD_CTRL(I2C_PAD_CTRL),
+};
+
iomux_v3_cfg_t usdhc3_pads[] = {
MX6Q_PAD_SD3_CLK__USDHC3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6Q_PAD_SD3_CMD__USDHC3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -282,6 +292,7 @@ int board_init(void)
#ifdef CONFIG_MXC_SPI
setup_spi();
#endif
+ imx_iomux_v3_setup_multiple_pads(i2c3_pads, ARRAY_SIZE(i2c3_pads));
return 0;
}
diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h
index f52c3c7..311494b 100644
--- a/include/configs/mx6qsabrelite.h
+++ b/include/configs/mx6qsabrelite.h
@@ -58,6 +58,14 @@
#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
#endif
+/* I2C Configs */
+#define CONFIG_CMD_I2C
+#define CONFIG_HARD_I2C
+#define CONFIG_I2C_MXC
+#define CONFIG_SYS_I2C_BASE I2C3_BASE_ADDR
+#define CONFIG_SYS_I2C_SPEED 100000
+#define CONFIG_SYS_I2C_SLAVE 0xfe
+
/* MMC Configs */
#define CONFIG_FSL_ESDHC
#define CONFIG_FSL_USDHC
--
1.7.5.4
next prev parent reply other threads:[~2012-04-25 3:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 3:33 [U-Boot] [PATCH 1/3] mxc_i2c: specify i2c base address in config file Troy Kisky
2012-04-25 3:33 ` Troy Kisky [this message]
2012-05-06 15:24 ` [U-Boot] [PATCH 2/3] mx6qsabrelite: add i2c support Stefano Babic
2012-04-25 3:33 ` [U-Boot] [PATCH 3/3] mxc_i2c: remove setting speed at each start Troy Kisky
2012-05-04 22:52 ` Troy Kisky
2012-05-05 13:05 ` Marek Vasut
2012-05-05 13:08 ` Marek Vasut
2012-05-05 20:22 ` Troy Kisky
2012-05-05 21:36 ` Marek Vasut
2012-05-05 22:26 ` Troy Kisky
2012-05-05 23:06 ` Marek Vasut
2012-05-06 15:27 ` Stefano Babic
2012-07-11 6:27 ` Dirk Behme
2012-07-13 10:38 ` Marek Vasut
2012-07-13 11:56 ` Wolfgang Denk
2012-07-13 12:11 ` Marek Vasut
2012-07-16 9:39 ` Stefano Babic
2012-05-06 15:27 ` [U-Boot] [PATCH 1/3] mxc_i2c: specify i2c base address in config file Stefano Babic
2012-07-11 6:25 ` Dirk Behme
2012-07-11 8:35 ` Heiko Schocher
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=1335324807-16177-2-git-send-email-troy.kisky@boundarydevices.com \
--to=troy.kisky@boundarydevices.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.