aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/u-boot/u-boot-git/beagleboard/0048-BeagleBoard-Enable-pullups-on-i2c2.patch
blob: 25cf7b144862e98f3ac4d3f73a6119f03fa7cb5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 35e971eea9c9d9cb690da0509e0f8a48a2cb1269 Mon Sep 17 00:00:00 2001
From: Steve Kipisz <s-kipisz2@ti.com>
Date: Thu, 5 Aug 2010 10:36:07 -0500
Subject: [PATCH 48/50] BeagleBoard: Enable pullups on i2c2.

---
 board/ti/beagle/beagle.c           |    2 ++
 include/asm-arm/arch-omap3/omap3.h |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 66df719..ee6bad2 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -171,6 +171,8 @@ int misc_init_r(void)
 	struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
 	struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
 
+	/* Enable i22 pullup resisters */
+	*(ulong *)(CONTROL_PROG_IO1) &= ~(PRG_I2C2_PULLUPRESX);
 	beagle_identify();
 
 	printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n\n");
diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h
index 3957c79..1860dff 100644
--- a/include/asm-arm/arch-omap3/omap3.h
+++ b/include/asm-arm/arch-omap3/omap3.h
@@ -50,6 +50,15 @@
 /* CONTROL */
 #define OMAP34XX_CTRL_BASE		(OMAP34XX_L4_IO_BASE + 0x2000)
 
+/* Signal Integrity Parameter Control Registers */
+#define CONTROL_PROG_IO0		0x48002444
+#define CONTROL_PROG_IO1		0x48002448
+#define CONTROL_PROG_IO2		0x48002408
+#define CONTROL_PROG_IO_WKUP1		0x48002A80
+
+/* Bit definition for CONTROL_PROG_IO1 */
+#define PRG_I2C2_PULLUPRESX		0x00000001
+
 /* UART */
 #define OMAP34XX_UART1			(OMAP34XX_L4_IO_BASE + 0x6a000)
 #define OMAP34XX_UART2			(OMAP34XX_L4_IO_BASE + 0x6c000)
-- 
1.6.6.1