From patchwork Mon Sep 24 06:49:20 2012
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Piotr Wilczek
X-Patchwork-Id: 186307
X-Patchwork-Delegate: promsoft@gmail.com
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Received: from theia.denx.de (theia.denx.de [85.214.87.163])
by ozlabs.org (Postfix) with ESMTP id D81EF2C0084
for ;
Mon, 24 Sep 2012 16:50:40 +1000 (EST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 5474E28098;
Mon, 24 Sep 2012 08:50:39 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at theia.denx.de
Received: from theia.denx.de ([127.0.0.1])
by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id NNo4mR6qspyZ; Mon, 24 Sep 2012 08:50:38 +0200 (CEST)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id A54B42808D;
Mon, 24 Sep 2012 08:50:36 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id B07232807F
for ; Mon, 24 Sep 2012 08:49:46 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at theia.denx.de
Received: from theia.denx.de ([127.0.0.1])
by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Q+W0Wto+EcfB for ;
Mon, 24 Sep 2012 08:49:46 +0200 (CEST)
X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5
NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)
Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24])
by theia.denx.de (Postfix) with ESMTP id 1B3B028083
for ; Mon, 24 Sep 2012 08:49:46 +0200 (CEST)
Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27])
by mailout1.samsung.com
(Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit
(built Nov
17 2011)) with ESMTP id <0MAU00GL1DLQ81Q0@mailout1.samsung.com> for
u-boot@lists.denx.de; Mon, 24 Sep 2012 15:49:44 +0900 (KST)
X-AuditID: cbfee61b-b7f2b6d000000f14-40-50600288345b
Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA)
with SMTP id 21.2F.03860.88200605;
Mon, 24 Sep 2012 15:49:44 +0900 (KST)
Received: from mcdsrvbld02.digital.local ([106.116.37.23])
by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01
(7.0.4.24.0) 64bit (built Nov 17 2011))
with ESMTPA id <0MAU00IFRDMGFT70@mmp2.samsung.com> for
u-boot@lists.denx.de; Mon, 24 Sep 2012 15:49:44 +0900 (KST)
From: Piotr Wilczek
To: u-boot@lists.denx.de
Date: Mon, 24 Sep 2012 08:49:20 +0200
Message-id: <1348469362-17314-4-git-send-email-p.wilczek@samsung.com>
X-Mailer: git-send-email 1.7.10
In-reply-to: <1348469362-17314-1-git-send-email-p.wilczek@samsung.com>
References: <1348469362-17314-1-git-send-email-p.wilczek@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jQd0OpoQAgx0zpC3e7u1kd2D0OHtn
B2MAYxSXTUpqTmZZapG+XQJXxs8bJ5gLFolUvH55kbGBcapgFyMnh4SAicTD20uZIGwxiQv3
1rN1MXJxCAlMZ5Q4v+ECE4SzmEniQstkZpAqNgFtieVv3jCC2CICEhK/+q8yghQxCyxjlGho
+M0OkhAWsJfYsP4amM0ioCrxduNWFhCbV8BVYuOF1WwQ6+Qlnt7vA7M5Bdwkvjz7CbSAA2ib
q8TUackTGHkXMDKsYhRNLUguKE5KzzXSK07MLS7NS9dLzs/dxAj2+jPpHYyrGiwOMQpwMCrx
8G44Ex8gxJpYVlyZe4hRgoNZSYQ34hlQiDclsbIqtSg/vqg0J7X4EKM0B4uSOK/wp8AAIYH0
xJLU7NTUgtQimCwTB6dUA2N7d3KSRvp12Rdq4uURz5qSb2XzffPoeXlWs63z6reFp9Pc1ZdM
5rc5/+5VeMaeMIfCO+1K3UfX5vhoyj65bcSaH7x68QqH+ikOn02yj/+LTreyOqEqsui9uZTe
FsknfI/u+krJv79398aijTMXbTUzDDziNPdw4ePpYveyQueGdUld37u8570SS3FGoqEWc1Fx
IgAwyRPK9gEAAA==
Cc: Piotr Wilczek ,
Kyungmin Park
Subject: [U-Boot] [PATCH 3/5] EXYNOS: PINMUX: Add pinmux support for i2c
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: U-Boot discussion
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Sender: u-boot-bounces@lists.denx.de
Errors-To: u-boot-bounces@lists.denx.de
This patch add pinmux for I2C for Exynos4
Signed-off-by: Piotr Wilczek
Signed-off-by: Kyungmin Park
CC: Minkyu Kang
---
arch/arm/cpu/armv7/exynos/pinmux.c | 51 ++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
index 5796d56..3ebeb1d 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -302,6 +302,47 @@ static int exynos4_mmc_config(int peripheral, int flags)
return 0;
}
+static void exynos4_i2c_config(int peripheral, int flags)
+{
+ struct exynos4_gpio_part1 *gpio1 =
+ (struct exynos4_gpio_part1 *) samsung_get_base_gpio_part1();
+
+ switch (peripheral) {
+ case PERIPH_ID_I2C0:
+ s5p_gpio_cfg_pin(&gpio1->d1, 0, GPIO_FUNC(0x2));
+ s5p_gpio_cfg_pin(&gpio1->d1, 1, GPIO_FUNC(0x2));
+ break;
+ case PERIPH_ID_I2C1:
+ s5p_gpio_cfg_pin(&gpio1->d1, 2, GPIO_FUNC(0x2));
+ s5p_gpio_cfg_pin(&gpio1->d1, 3, GPIO_FUNC(0x2));
+ break;
+ case PERIPH_ID_I2C2:
+ s5p_gpio_cfg_pin(&gpio1->a0, 6, GPIO_FUNC(0x3));
+ s5p_gpio_cfg_pin(&gpio1->a0, 7, GPIO_FUNC(0x3));
+ break;
+ case PERIPH_ID_I2C3:
+ s5p_gpio_cfg_pin(&gpio1->a1, 2, GPIO_FUNC(0x3));
+ s5p_gpio_cfg_pin(&gpio1->a1, 3, GPIO_FUNC(0x3));
+ break;
+ case PERIPH_ID_I2C4:
+ s5p_gpio_cfg_pin(&gpio1->b, 2, GPIO_FUNC(0x3));
+ s5p_gpio_cfg_pin(&gpio1->b, 3, GPIO_FUNC(0x3));
+ break;
+ case PERIPH_ID_I2C5:
+ s5p_gpio_cfg_pin(&gpio1->b, 6, GPIO_FUNC(0x3));
+ s5p_gpio_cfg_pin(&gpio1->b, 7, GPIO_FUNC(0x3));
+ break;
+ case PERIPH_ID_I2C6:
+ s5p_gpio_cfg_pin(&gpio1->c1, 3, GPIO_FUNC(0x4));
+ s5p_gpio_cfg_pin(&gpio1->c1, 4, GPIO_FUNC(0x4));
+ break;
+ case PERIPH_ID_I2C7:
+ s5p_gpio_cfg_pin(&gpio1->d0, 2, GPIO_FUNC(0x3));
+ s5p_gpio_cfg_pin(&gpio1->d0, 3, GPIO_FUNC(0x3));
+ break;
+ }
+}
+
static int exynos4_pinmux_config(int peripheral, int flags)
{
switch (peripheral) {
@@ -313,6 +354,16 @@ static int exynos4_pinmux_config(int peripheral, int flags)
case PERIPH_ID_SDMMC4:
printf("SDMMC device %d not implemented\n", peripheral);
return -1;
+ case PERIPH_ID_I2C0:
+ case PERIPH_ID_I2C1:
+ case PERIPH_ID_I2C2:
+ case PERIPH_ID_I2C3:
+ case PERIPH_ID_I2C4:
+ case PERIPH_ID_I2C5:
+ case PERIPH_ID_I2C6:
+ case PERIPH_ID_I2C7:
+ exynos4_i2c_config(peripheral, flags);
+ break;
default:
debug("%s: invalid peripheral %d", __func__, peripheral);
return -1;