[glsdk/meta-ti-glsdk.git] / recipes-bsp / u-boot / u-boot / 0048-BeagleBoard-Enable-pullups-on-i2c2.patch
1 From 35e971eea9c9d9cb690da0509e0f8a48a2cb1269 Mon Sep 17 00:00:00 2001
2 From: Steve Kipisz <s-kipisz2@ti.com>
3 Date: Thu, 5 Aug 2010 10:36:07 -0500
4 Subject: [PATCH 48/51] BeagleBoard: Enable pullups on i2c2.
6 ---
7 board/ti/beagle/beagle.c | 2 ++
8 include/asm-arm/arch-omap3/omap3.h | 9 +++++++++
9 2 files changed, 11 insertions(+), 0 deletions(-)
11 diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
12 index 66df719..ee6bad2 100644
13 --- a/board/ti/beagle/beagle.c
14 +++ b/board/ti/beagle/beagle.c
15 @@ -171,6 +171,8 @@ int misc_init_r(void)
16 struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
17 struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
19 + /* Enable i22 pullup resisters */
20 + *(ulong *)(CONTROL_PROG_IO1) &= ~(PRG_I2C2_PULLUPRESX);
21 beagle_identify();
23 printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n\n");
24 diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h
25 index 3957c79..1860dff 100644
26 --- a/include/asm-arm/arch-omap3/omap3.h
27 +++ b/include/asm-arm/arch-omap3/omap3.h
28 @@ -50,6 +50,15 @@
29 /* CONTROL */
30 #define OMAP34XX_CTRL_BASE (OMAP34XX_L4_IO_BASE + 0x2000)
32 +/* Signal Integrity Parameter Control Registers */
33 +#define CONTROL_PROG_IO0 0x48002444
34 +#define CONTROL_PROG_IO1 0x48002448
35 +#define CONTROL_PROG_IO2 0x48002408
36 +#define CONTROL_PROG_IO_WKUP1 0x48002A80
37 +
38 +/* Bit definition for CONTROL_PROG_IO1 */
39 +#define PRG_I2C2_PULLUPRESX 0x00000001
40 +
41 /* UART */
42 #define OMAP34XX_UART1 (OMAP34XX_L4_IO_BASE + 0x6a000)
43 #define OMAP34XX_UART2 (OMAP34XX_L4_IO_BASE + 0x6c000)
44 --
45 1.6.6.1