From patchwork Thu Jan 8 11:33:17 2015
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Przemyslaw Marczak
X-Patchwork-Id: 426586
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 0713A140119
for ;
Thu, 8 Jan 2015 22:35:09 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id E8BBE4B68A;
Thu, 8 Jan 2015 12:34:41 +0100 (CET)
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 tFb61ewShkn0; Thu, 8 Jan 2015 12:34:41 +0100 (CET)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id B2A9B4B664;
Thu, 8 Jan 2015 12:34:12 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id F18BC4B652
for ; Thu, 8 Jan 2015 12:33:52 +0100 (CET)
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 URke36L9h9ZR for ;
Thu, 8 Jan 2015 12:33:52 +0100 (CET)
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 mailout3.w1.samsung.com (mailout3.w1.samsung.com
[210.118.77.13]) by theia.denx.de (Postfix) with ESMTPS id BA0A74B609
for ; Thu, 8 Jan 2015 12:33:47 +0100 (CET)
Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245])
by mailout3.w1.samsung.com
(Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit
(built Nov
17 2011)) with ESMTP id <0NHU0071NWB1MG90@mailout3.w1.samsung.com>
for u-boot@lists.denx.de; Thu, 08 Jan 2015 11:37:49 +0000 (GMT)
X-AuditID: cbfec7f5-b7fc86d0000066b7-d2-54ae6b1a810f
Received: from eusync1.samsung.com ( [203.254.199.211])
by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 06.58.26295.A1B6EA45;
Thu, 08 Jan 2015 11:33:46 +0000 (GMT)
Received: from AMDC1186.digital.local ([106.116.147.185])
by eusync1.samsung.com
(Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit
(built Aug
10 2011)) with ESMTPA id <0NHU00589W3XXT50@eusync1.samsung.com>; Thu,
08 Jan 2015 11:33:45 +0000 (GMT)
From: Przemyslaw Marczak
To: u-boot@lists.denx.de
Date: Thu, 08 Jan 2015 12:33:17 +0100
Message-id: <1420716809-16276-6-git-send-email-p.marczak@samsung.com>
X-Mailer: git-send-email 1.9.1
In-reply-to: <1420716809-16276-1-git-send-email-p.marczak@samsung.com>
References: <1420716524-15969-1-git-send-email-p.marczak@samsung.com>
<1420716809-16276-1-git-send-email-p.marczak@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFmpmluLIzCtJLcpLzFFi42I5/e/4ZV2p7HUhBqu+Klqc+vOY0WLpjD5W
ixu/2lgtXty7yGLx5uFmRouOIy2MFjsu32Cx+LZlG6PF9ONvWS3e7u1kd+DymN1wkcXj7/Pr
LB5n7+xg9OjbsooxgCWKyyYlNSezLLVI3y6BK6NrwgWWgrUCFevmvWdvYGzl62Lk5JAQMJFY
umUpO4QtJnHh3nq2LkYuDiGBpYwSV++dYYdw+pgkXr5exAJSxSZgILHn0hlmEFtEQELiV/9V
RpAiZoHfTBLNT5rZQBLCAo4Sc2YvZQSxWQRUJV48aQOL8wq4Slxc9pMVYp2cxMljk8FsTgE3
ia1rljJBbGtklJjeMoF1AiPvAkaGVYyiqaXJBcVJ6blGesWJucWleel6yfm5mxghAfd1B+PS
Y1aHGAU4GJV4eD/cXxsixJpYVlyZe4hRgoNZSYRXx3NdiBBvSmJlVWpRfnxRaU5q8SFGJg5O
qQbG/R+2zvrRuc9kxafoOcxrnTJK61ZVBVqIsD9l/nLqoKzXr2/fuDvfplrVphQVP7Vf2/rr
7ap89YiE9BtblLmKPVKfH1/PtruYz0tmf1SS4a3Dk+faSNru/lFy9O4sfqW/u1UrtX3Lvt3f
c/6Fwdzpz/dPjpvG0t+81viGNaeVzYp+vW4x1vO5SizFGYmGWsxFxYkAwGoxUxYCAAA=
Cc: Akshay Saraswat ,
Jaehoon Chung ,
Przemyslaw Marczak ,
Hyungwon Hwang
Subject: [U-Boot] [PATCH 06/18] exynos5: pinmux: check flag for i2c config
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.13
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
Some versions of Exynos5 supports High-Speed I2C,
on few interfaces, this change allows support this.
Signed-off-by: Przemyslaw Marczak
Cc: Simon Glass
Cc: Akshay Saraswat
Cc: Minkyu Kang
---
arch/arm/cpu/armv7/exynos/pinmux.c | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
index 94d0297..b2c5494 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -266,22 +266,33 @@ static void exynos5_sromc_config(int flags)
static void exynos5_i2c_config(int peripheral, int flags)
{
+ int func01, func23;
+
+ /* flags only for High-Speed I2C */
+ if (flags) {
+ func01 = 4;
+ func23 = 4;
+ } else {
+ func01 = 2;
+ func23 = 3;
+ }
+
switch (peripheral) {
case PERIPH_ID_I2C0:
- gpio_cfg_pin(EXYNOS5_GPIO_B30, S5P_GPIO_FUNC(0x2));
- gpio_cfg_pin(EXYNOS5_GPIO_B31, S5P_GPIO_FUNC(0x2));
+ gpio_cfg_pin(EXYNOS5_GPIO_B30, S5P_GPIO_FUNC(func01));
+ gpio_cfg_pin(EXYNOS5_GPIO_B31, S5P_GPIO_FUNC(func01));
break;
case PERIPH_ID_I2C1:
- gpio_cfg_pin(EXYNOS5_GPIO_B32, S5P_GPIO_FUNC(0x2));
- gpio_cfg_pin(EXYNOS5_GPIO_B33, S5P_GPIO_FUNC(0x2));
+ gpio_cfg_pin(EXYNOS5_GPIO_B32, S5P_GPIO_FUNC(func01));
+ gpio_cfg_pin(EXYNOS5_GPIO_B33, S5P_GPIO_FUNC(func01));
break;
case PERIPH_ID_I2C2:
- gpio_cfg_pin(EXYNOS5_GPIO_A06, S5P_GPIO_FUNC(0x3));
- gpio_cfg_pin(EXYNOS5_GPIO_A07, S5P_GPIO_FUNC(0x3));
+ gpio_cfg_pin(EXYNOS5_GPIO_A06, S5P_GPIO_FUNC(func23));
+ gpio_cfg_pin(EXYNOS5_GPIO_A07, S5P_GPIO_FUNC(func23));
break;
case PERIPH_ID_I2C3:
- gpio_cfg_pin(EXYNOS5_GPIO_A12, S5P_GPIO_FUNC(0x3));
- gpio_cfg_pin(EXYNOS5_GPIO_A13, S5P_GPIO_FUNC(0x3));
+ gpio_cfg_pin(EXYNOS5_GPIO_A12, S5P_GPIO_FUNC(func23));
+ gpio_cfg_pin(EXYNOS5_GPIO_A13, S5P_GPIO_FUNC(func23));
break;
case PERIPH_ID_I2C4:
gpio_cfg_pin(EXYNOS5_GPIO_A20, S5P_GPIO_FUNC(0x3));