linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] plat-mxc: iomux-v3.h: implicitly enable pull-up/down when that's desired
@ 2011-10-10  7:19 Paul Fertser
  2011-10-10  8:14 ` Baruch Siach
  2011-10-12  8:27 ` Sascha Hauer
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Fertser @ 2011-10-10  7:19 UTC (permalink / raw)
  To: linux-arm-kernel

To configure pads during the initialisation a set of special constants
is used, e.g.
#define MX25_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x3c4, 0x1cc, 0x10, 0, 0, PAD_CTL_HYS | PAD_CTL_PUS_22K_UP)

The problem is that no pull-up/down is getting activated unless both
PAD_CTL_PUE (pull-up enable) and PAD_CTL_PKE (pull/keeper module
enable) set. This is clearly stated in the i.MX25 datasheet and is
confirmed by the measurements on hardware. This leads to some rather
hard to understand bugs such as misdetecting an absent ethernet PHY (a
real bug i had), unstable data transfer etc. This might affect mx25,
mx35, mx50, mx51 and mx53 SoCs.

It's reasonable to expect that if the pullup value is specified, the
intention was to have it actually active, so we implicitly add the
needed bits.

Cc: stable at kernel.org
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
---

I'm not sure if that's really suitable for -stable so please excuse me
if it's not. The issue looks real though and if you prefer fixing it
any other way, please let me know. Sascha, if you think this's appropriate,
i'll be happy to send the same fix for barebox.

 arch/arm/plat-mxc/include/mach/iomux-v3.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h
index ebbce33..4509956 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-v3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h
@@ -89,11 +89,11 @@ typedef u64 iomux_v3_cfg_t;
 #define PAD_CTL_HYS			(1 << 8)
 
 #define PAD_CTL_PKE			(1 << 7)
-#define PAD_CTL_PUE			(1 << 6)
-#define PAD_CTL_PUS_100K_DOWN		(0 << 4)
-#define PAD_CTL_PUS_47K_UP		(1 << 4)
-#define PAD_CTL_PUS_100K_UP		(2 << 4)
-#define PAD_CTL_PUS_22K_UP		(3 << 4)
+#define PAD_CTL_PUE			(1 << 6 | PAD_CTL_PKE)
+#define PAD_CTL_PUS_100K_DOWN		(0 << 4 | PAD_CTL_PUE)
+#define PAD_CTL_PUS_47K_UP		(1 << 4 | PAD_CTL_PUE)
+#define PAD_CTL_PUS_100K_UP		(2 << 4 | PAD_CTL_PUE)
+#define PAD_CTL_PUS_22K_UP		(3 << 4 | PAD_CTL_PUE)
 
 #define PAD_CTL_ODE			(1 << 3)
 
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-13  7:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-10  7:19 [RFC][PATCH] plat-mxc: iomux-v3.h: implicitly enable pull-up/down when that's desired Paul Fertser
2011-10-10  8:14 ` Baruch Siach
2011-10-10  9:54   ` Lothar Waßmann
2011-10-10 10:01     ` Paul Fertser
2011-10-12  8:27 ` Sascha Hauer
2011-10-13  1:48   ` Shawn Guo
2011-10-13  7:12   ` Paul Fertser
2011-10-13  7:17     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).