]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.1.1/plat-mxc-iomux-v3.h-implicitly-enable-pull-up-down-when-that-s-desired.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.1 / plat-mxc-iomux-v3.h-implicitly-enable-pull-up-down-when-that-s-desired.patch
CommitLineData
14818f4b
GKH
1From 6571534b600b8ca1936ff5630b9e0947f21faf16 Mon Sep 17 00:00:00 2001
2From: Paul Fertser <fercerpav@gmail.com>
3Date: Mon, 10 Oct 2011 11:19:23 +0400
4Subject: plat-mxc: iomux-v3.h: implicitly enable pull-up/down when that's desired
5
6From: Paul Fertser <fercerpav@gmail.com>
7
8commit 6571534b600b8ca1936ff5630b9e0947f21faf16 upstream.
9
10To configure pads during the initialisation a set of special constants
11is used, e.g.
12#define MX25_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x3c4, 0x1cc, 0x10, 0, 0, PAD_CTL_HYS | PAD_CTL_PUS_22K_UP)
13
14The problem is that no pull-up/down is getting activated unless both
15PAD_CTL_PUE (pull-up enable) and PAD_CTL_PKE (pull/keeper module
16enable) set. This is clearly stated in the i.MX25 datasheet and is
17confirmed by the measurements on hardware. This leads to some rather
18hard to understand bugs such as misdetecting an absent ethernet PHY (a
19real bug i had), unstable data transfer etc. This might affect mx25,
20mx35, mx50, mx51 and mx53 SoCs.
21
22It's reasonable to expect that if the pullup value is specified, the
23intention was to have it actually active, so we implicitly add the
24needed bits.
25
26Signed-off-by: Paul Fertser <fercerpav@gmail.com>
27Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29
30---
31 arch/arm/plat-mxc/include/mach/iomux-v3.h | 10 +++++-----
32 1 file changed, 5 insertions(+), 5 deletions(-)
33
34--- a/arch/arm/plat-mxc/include/mach/iomux-v3.h
35+++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h
36@@ -89,11 +89,11 @@ typedef u64 iomux_v3_cfg_t;
37 #define PAD_CTL_HYS (1 << 8)
38
39 #define PAD_CTL_PKE (1 << 7)
40-#define PAD_CTL_PUE (1 << 6)
41-#define PAD_CTL_PUS_100K_DOWN (0 << 4)
42-#define PAD_CTL_PUS_47K_UP (1 << 4)
43-#define PAD_CTL_PUS_100K_UP (2 << 4)
44-#define PAD_CTL_PUS_22K_UP (3 << 4)
45+#define PAD_CTL_PUE (1 << 6 | PAD_CTL_PKE)
46+#define PAD_CTL_PUS_100K_DOWN (0 << 4 | PAD_CTL_PUE)
47+#define PAD_CTL_PUS_47K_UP (1 << 4 | PAD_CTL_PUE)
48+#define PAD_CTL_PUS_100K_UP (2 << 4 | PAD_CTL_PUE)
49+#define PAD_CTL_PUS_22K_UP (3 << 4 | PAD_CTL_PUE)
50
51 #define PAD_CTL_ODE (1 << 3)
52