mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: barebox@lists.infradead.org
Cc: Baruch Siach <baruch@tkos.co.il>
Subject: [PATCH 4/8] mx25: add support for i2c
Date: Wed,  9 Jun 2010 10:05:03 +0300	[thread overview]
Message-ID: <b6fba9ab7986aecf20f31329916ebd9d89c046ce.1276065824.git.baruch@tkos.co.il> (raw)
In-Reply-To: <cover.1276065824.git.baruch@tkos.co.il>

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 arch/arm/mach-imx/include/mach/imx25-regs.h |    1 +
 arch/arm/mach-imx/include/mach/iomux-mx25.h |    4 ++--
 arch/arm/mach-imx/speed-imx25.c             |    5 +++++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/include/mach/imx25-regs.h b/arch/arm/mach-imx/include/mach/imx25-regs.h
index 8052125..e91e7b6 100644
--- a/arch/arm/mach-imx/include/mach/imx25-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx25-regs.h
@@ -46,6 +46,7 @@
 #define IMX_M3IF_BASE		0xB8003000
 #define IMX_NFC_BASE		0xBB000000
 #define IMX_FEC_BASE		0x50038000
+#define IMX_I2C1_BASE		0x43F80000
 
 /*
  * Clock Controller Module (CCM)
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx25.h b/arch/arm/mach-imx/include/mach/iomux-mx25.h
index 379bfcb..a290a33 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx25.h
+++ b/arch/arm/mach-imx/include/mach/iomux-mx25.h
@@ -417,10 +417,10 @@
 #define MX25_PAD_HSYNC__GPIO22                             IOMUX_PAD(0x300, 0x108, 5,     0, 0, NO_PAD_CTRL)
 #define MX25_PAD_HSYNC__USBH2_DATA4                        IOMUX_PAD(0x300, 0x108, 6,     0, 0, 0xe5)
 #define MX25_PAD_HSYNC__BT_UART_SRC1                       IOMUX_PAD(0x300, 0x108, 7,     0, 0, NO_PAD_CTRL)
-#define MX25_PAD_I2C1_CLK__SCL                             IOMUX_PAD(0x348, 0x150, 0,     0, 0, NO_PAD_CTRL)
+#define MX25_PAD_I2C1_CLK__SCL                             IOMUX_PAD(0x348, 0x150, 0,     0, 0, (HYS | PKE | PUE | PUS_100K_UP))
 #define MX25_PAD_I2C1_CLK__GPIO12                          IOMUX_PAD(0x348, 0x150, 5,     0, 0, NO_PAD_CTRL)
 #define MX25_PAD_I2C1_CLK__SLCDC_DATA6                     IOMUX_PAD(0x348, 0x150, 6,     0, 0, NO_PAD_CTRL)
-#define MX25_PAD_I2C1_DAT__SDA                             IOMUX_PAD(0x34c, 0x154, 0,     0, 0, NO_PAD_CTRL)
+#define MX25_PAD_I2C1_DAT__SDA                             IOMUX_PAD(0x34c, 0x154, 0,     0, 0, (HYS | PKE | PUE | PUS_100K_UP))
 #define MX25_PAD_I2C1_DAT__GPIO13                          IOMUX_PAD(0x34c, 0x154, 5,     0, 0, NO_PAD_CTRL)
 #define MX25_PAD_I2C1_DAT__SLCDC_DATA7                     IOMUX_PAD(0x34c, 0x154, 6,     0, 0, NO_PAD_CTRL)
 #define MX25_PAD_KPP_COL0__COL0                            IOMUX_PAD(0x3b0, 0x1b8, 0,     0, 0, NO_PAD_CTRL)
diff --git a/arch/arm/mach-imx/speed-imx25.c b/arch/arm/mach-imx/speed-imx25.c
index a615017..9605674 100644
--- a/arch/arm/mach-imx/speed-imx25.c
+++ b/arch/arm/mach-imx/speed-imx25.c
@@ -77,6 +77,11 @@ unsigned long imx_get_lcdclk(void)
 	return imx_get_perclk(7);
 }
 
+unsigned long imx_get_i2cclk(void)
+{
+	return imx_get_perclk(6);
+}
+
 int imx_dump_clocks(void)
 {
 	printf("mpll:    %10d Hz\n", imx_get_mpllclk());
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2010-06-09  7:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09  7:04 [PATCH 0/8] i.MX25 3DS fixes and enhancements Baruch Siach
2010-06-09  7:05 ` [PATCH 1/8] mx25 3ds: fix build failure Baruch Siach
2010-06-09  7:05 ` [PATCH 2/8] mx25: fix typo in imx25-regs.h Baruch Siach
2010-06-09  7:05 ` [PATCH 3/8] mx25 3ds: cleanup lowlevel_init code Baruch Siach
2010-06-09  7:05 ` Baruch Siach [this message]
2010-06-09  7:05 ` [PATCH 5/8] i2c: add driver for the MC34704 PMIC Baruch Siach
2010-06-09  7:05 ` [PATCH 6/8] mx25 3ds: add support for i2c master and PMIC Baruch Siach
2010-06-14 13:01   ` Ivo Clarysse
2010-06-14 13:39     ` Baruch Siach
2010-06-09  7:05 ` [PATCH 7/8] mx25 3ds: fix fec initialization Baruch Siach
2010-06-09  7:05 ` [PATCH 8/8] mx25 3ds: add support for boot from UART Baruch Siach
2010-06-10 11:12   ` Sascha Hauer
2010-06-10 11:49     ` Baruch Siach
2010-06-10 12:12       ` Sascha Hauer
2010-06-10 12:42         ` Baruch Siach
2010-06-10 12:46           ` Baruch Siach
2010-06-10 13:56           ` Sascha Hauer
2010-06-10 16:09             ` Baruch Siach
2010-06-10 11:10 ` [PATCH 0/8] i.MX25 3DS fixes and enhancements Sascha Hauer

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=b6fba9ab7986aecf20f31329916ebd9d89c046ce.1276065824.git.baruch@tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=barebox@lists.infradead.org \
    /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