summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r--recipes-bsp/u-boot/u-boot.inc67
-rw-r--r--recipes-bsp/u-boot/u-boot/0001-BeagleBoard-move-ramdisk-parameters.patch38
-rw-r--r--recipes-bsp/u-boot/u-boot/0001-OMAP-mmc-add-support-for-second-and-third-mmc-chan.patch126
-rw-r--r--recipes-bsp/u-boot/u-boot/0001-OMAP3-Beagle-enable-support-for-second-and-third-m.patch56
-rw-r--r--recipes-bsp/u-boot/u-boot/0001-OMAP3-enable-i2c-bus-switching-for-Beagle-and-Overo.patch49
-rw-r--r--recipes-bsp/u-boot/u-boot/0002-OMAP3-add-board-revision-detection-for-Overo.patch187
-rw-r--r--recipes-bsp/u-boot/u-boot/0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch165
-rw-r--r--recipes-bsp/u-boot/u-boot/0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch143
-rw-r--r--recipes-bsp/u-boot/u-boot/0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch105
-rw-r--r--recipes-bsp/u-boot/u-boot/0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch70
-rw-r--r--recipes-bsp/u-boot/u-boot/0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch129
-rw-r--r--recipes-bsp/u-boot/u-boot/0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch81
-rw-r--r--recipes-bsp/u-boot/u-boot/0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch34
-rw-r--r--recipes-bsp/u-boot/u-boot/0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch25
-rw-r--r--recipes-bsp/u-boot/u-boot/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch52
-rw-r--r--recipes-bsp/u-boot/u-boot/0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch47
-rw-r--r--recipes-bsp/u-boot/u-boot/0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch25
-rw-r--r--recipes-bsp/u-boot/u-boot/0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch49
-rw-r--r--recipes-bsp/u-boot/u-boot/0015-OMAP3-mem.c-enhance-the-RAM-test.patch52
-rw-r--r--recipes-bsp/u-boot/u-boot/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch27
-rw-r--r--recipes-bsp/u-boot/u-boot/0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch68
-rw-r--r--recipes-bsp/u-boot/u-boot/0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch196
-rw-r--r--recipes-bsp/u-boot/u-boot/0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch826
-rw-r--r--recipes-bsp/u-boot/u-boot/0020-OMAP3-beagle-add-support-for-Beagle-xM.patch137
-rw-r--r--recipes-bsp/u-boot/u-boot/0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch53
-rw-r--r--recipes-bsp/u-boot/u-boot/0022-OMAP3-beagle-implement-expansionboard-detection-base.patch157
-rw-r--r--recipes-bsp/u-boot/u-boot/0023-beagleboard-display-message-about-I2C-errors-being-e.patch26
-rw-r--r--recipes-bsp/u-boot/u-boot/0024-beagleboard-fix-TCT-expansionboard-IDs.patch27
-rw-r--r--recipes-bsp/u-boot/u-boot/0025-Add-DSS-driver-for-OMAP3.patch353
-rw-r--r--recipes-bsp/u-boot/u-boot/0026-Enable-DSS-driver-for-Beagle.patch158
-rw-r--r--recipes-bsp/u-boot/u-boot/0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch24
-rw-r--r--recipes-bsp/u-boot/u-boot/0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch112
-rw-r--r--recipes-bsp/u-boot/u-boot/0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch99
-rw-r--r--recipes-bsp/u-boot/u-boot/0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch46
-rw-r--r--recipes-bsp/u-boot/u-boot/0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch61
-rw-r--r--recipes-bsp/u-boot/u-boot/0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch29
-rw-r--r--recipes-bsp/u-boot/u-boot/0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch25
-rw-r--r--recipes-bsp/u-boot/u-boot/0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch53
-rw-r--r--recipes-bsp/u-boot/u-boot/0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch24
-rw-r--r--recipes-bsp/u-boot/u-boot/0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch34
-rw-r--r--recipes-bsp/u-boot/u-boot/0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch87
-rw-r--r--recipes-bsp/u-boot/u-boot/0038-Added-configurations-for-xM-Rev-A-board.patch29
-rw-r--r--recipes-bsp/u-boot/u-boot/0038-BeagleBoard-Added-LED-driver.patch164
-rw-r--r--recipes-bsp/u-boot/u-boot/0039-Add-led-command.patch256
-rw-r--r--recipes-bsp/u-boot/u-boot/0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch42
-rw-r--r--recipes-bsp/u-boot/u-boot/0041-BeagleBoard-Enabled-LEDs.patch47
-rw-r--r--recipes-bsp/u-boot/u-boot/0042-BeagleBoard-New-command-for-status-of-USER-button.patch97
-rw-r--r--recipes-bsp/u-boot/u-boot/0043-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch35
-rw-r--r--recipes-bsp/u-boot/u-boot/0044-Beagleboard-Adjust-boot.patch115
-rw-r--r--recipes-bsp/u-boot/u-boot/0045-BeagleBoard-Enable-pullups-on-i2c2.patch46
-rw-r--r--recipes-bsp/u-boot/u-boot/0046-BeagleBoard-Add-camera-to-default-bootargs.patch50
-rw-r--r--recipes-bsp/u-boot/u-boot/fw_env.config8
-rw-r--r--recipes-bsp/u-boot/u-boot_git.bb62
53 files changed, 5073 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc
new file mode 100644
index 00000000..9a9528ee
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot.inc
@@ -0,0 +1,67 @@
1DESCRIPTION = "U-Boot - the Universal Boot Loader"
2HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
3SECTION = "bootloaders"
4PRIORITY = "optional"
5LICENSE = "GPLv2"
6PROVIDES = "virtual/bootloader"
7
8DEPENDS = "mtd-utils"
9
10PACKAGE_ARCH = "${MACHINE_ARCH}"
11PARALLEL_MAKE=""
12
13EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
14
15UBOOT_MACHINE ?= "${MACHINE}_config"
16UBOOT_BINARY ?= "u-boot.bin"
17UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
18UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
19
20do_configure () {
21 oe_runmake ${UBOOT_MACHINE}
22}
23
24do_compile () {
25 unset LDFLAGS
26 unset CFLAGS
27 unset CPPFLAGS
28 oe_runmake all
29 oe_runmake tools env
30}
31
32do_install () {
33 install -d ${D}/boot
34 install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
35 ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
36
37 if [ -e ${WORKDIR}/fw_env.config ] ; then
38 install -d ${D}${base_sbindir}
39 install -d ${D}${sysconfdir}
40 install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
41 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
42 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
43 fi
44
45}
46
47FILES_${PN} = "/boot"
48# no gnu_hash in uboot.bin, by design, so skip QA
49INSANE_SKIP_${PN} = True
50
51PACKAGES += "${PN}-fw-utils"
52FILES_${PN}-fw-utils = "${sysconfdir} ${base_sbindir}"
53# u-boot doesn't use LDFLAGS for fw files, needs to get fixed, but until then:
54INSANE_SKIP_${PN}-fw-utils = True
55
56do_deploy () {
57 install -d ${DEPLOY_DIR_IMAGE}
58 install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
59 package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
60
61 cd ${DEPLOY_DIR_IMAGE}
62 rm -f ${UBOOT_SYMLINK}
63 ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
64 package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}
65}
66do_deploy[dirs] = "${S}"
67addtask deploy before do_package_stage after do_compile
diff --git a/recipes-bsp/u-boot/u-boot/0001-BeagleBoard-move-ramdisk-parameters.patch b/recipes-bsp/u-boot/u-boot/0001-BeagleBoard-move-ramdisk-parameters.patch
new file mode 100644
index 00000000..5d6e69d2
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0001-BeagleBoard-move-ramdisk-parameters.patch
@@ -0,0 +1,38 @@
1From c8d02f2a8500f06de39681aed60ea5c9894f8087 Mon Sep 17 00:00:00 2001
2From: Jason Kridner <jkridner@beagleboard.org>
3Date: Wed, 11 Aug 2010 14:50:38 -0500
4Subject: [PATCH] BeagleBoard: move ramdisk parameters
5
6This will make it easier to reprogram the ramdisk size.
7
8Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
9---
10 include/configs/omap3_beagle.h | 5 ++---
11 1 files changed, 2 insertions(+), 3 deletions(-)
12
13diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
14index 48ad805..4f5c1d4 100644
15--- a/include/configs/omap3_beagle.h
16+++ b/include/configs/omap3_beagle.h
17@@ -217,7 +217,7 @@
18 "mmcrootfstype=ext3 rootwait\0" \
19 "nandroot=/dev/mtdblock4 rw\0" \
20 "nandrootfstype=jffs2\0" \
21- "ramroot=/dev/ram0 rw\0" \
22+ "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
23 "ramrootfstype=ext2\0" \
24 "mmcargs=setenv bootargs console=${console} " \
25 "${optargs} " \
26@@ -248,8 +248,7 @@
27 "vram=${vram} " \
28 "omapfb.mode=dvi:${dvimode} " \
29 "omapdss.def_disp=${defaultdisplay} " \
30- "root=${ramroot} rw ramdisk_size=65536 " \
31- "initrd=${rdaddr},64M " \
32+ "root=${ramroot} " \
33 "rootfstype=${ramrootfstype}\0" \
34 "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
35 "bootscript=echo Running bootscript from mmc ...; " \
36--
371.5.6.4
38
diff --git a/recipes-bsp/u-boot/u-boot/0001-OMAP-mmc-add-support-for-second-and-third-mmc-chan.patch b/recipes-bsp/u-boot/u-boot/0001-OMAP-mmc-add-support-for-second-and-third-mmc-chan.patch
new file mode 100644
index 00000000..2bda1bcd
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0001-OMAP-mmc-add-support-for-second-and-third-mmc-chan.patch
@@ -0,0 +1,126 @@
1From 7252b81ec10aea48672f66e33cb6962b98fb0782 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Thu, 29 Apr 2010 10:28:14 -0700
4Subject: [PATCH] OMAP: mmc: add support for second and third mmc channels
5
6Boards wishing to use this feature should define CONFIG_SYS_MMC_SET_DEV
7
8Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
9---
10 drivers/mmc/omap3_mmc.c | 39 +++++++++++++++++++++++++++-
11 include/asm-arm/arch-omap3/mmc_host_def.h | 15 +++++++++--
12 2 files changed, 49 insertions(+), 5 deletions(-)
13
14diff --git a/drivers/mmc/omap3_mmc.c b/drivers/mmc/omap3_mmc.c
15index 96c0e65..bf650ba 100644
16--- a/drivers/mmc/omap3_mmc.c
17+++ b/drivers/mmc/omap3_mmc.c
18@@ -52,7 +52,27 @@ const unsigned short mmc_transspeed_val[15][4] = {
19
20 mmc_card_data cur_card_data;
21 static block_dev_desc_t mmc_blk_dev;
22-static hsmmc_t *mmc_base = (hsmmc_t *)OMAP_HSMMC_BASE;
23+static hsmmc_t *mmc_base = (hsmmc_t *)OMAP_HSMMC1_BASE;
24+
25+unsigned char mmc_set_dev(int dev)
26+{
27+ switch (dev) {
28+ case 1:
29+ mmc_base = (hsmmc_t *)OMAP_HSMMC1_BASE;
30+ break;
31+ case 2:
32+ mmc_base = (hsmmc_t *)OMAP_HSMMC2_BASE;
33+ break;
34+ case 3:
35+ mmc_base = (hsmmc_t *)OMAP_HSMMC3_BASE;
36+ break;
37+ default:
38+ mmc_base = (hsmmc_t *)OMAP_HSMMC1_BASE;
39+ return 1;
40+ }
41+
42+ return 0;
43+}
44
45 block_dev_desc_t *mmc_get_dev(int dev)
46 {
47@@ -62,6 +82,7 @@ block_dev_desc_t *mmc_get_dev(int dev)
48 unsigned char mmc_board_init(void)
49 {
50 t2_t *t2_base = (t2_t *)T2_BASE;
51+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
52
53 #if defined(CONFIG_TWL4030_POWER)
54 twl4030_power_mmc_init();
55@@ -74,6 +95,17 @@ unsigned char mmc_board_init(void)
56 writel(readl(&t2_base->devconf0) | MMCSDIO1ADPCLKISEL,
57 &t2_base->devconf0);
58
59+ writel(readl(&t2_base->devconf1) | MMCSDIO2ADPCLKISEL,
60+ &t2_base->devconf1);
61+
62+ writel(readl(&prcm_base->fclken1_core) |
63+ EN_MMC1 | EN_MMC2 | EN_MMC3,
64+ &prcm_base->fclken1_core);
65+
66+ writel(readl(&prcm_base->iclken1_core) |
67+ EN_MMC1 | EN_MMC2 | EN_MMC3,
68+ &prcm_base->iclken1_core);
69+
70 return 1;
71 }
72
73@@ -512,8 +544,11 @@ unsigned long mmc_bread(int dev_num, unsigned long blknr, lbaint_t blkcnt,
74 return 1;
75 }
76
77-int mmc_legacy_init(int verbose)
78+int mmc_legacy_init(int dev)
79 {
80+ if (mmc_set_dev(dev) != 0)
81+ return 1;
82+
83 if (configure_mmc(&cur_card_data) != 1)
84 return 1;
85
86diff --git a/include/asm-arm/arch-omap3/mmc_host_def.h b/include/asm-arm/arch-omap3/mmc_host_def.h
87index aa751c9..43dd705 100644
88--- a/include/asm-arm/arch-omap3/mmc_host_def.h
89+++ b/include/asm-arm/arch-omap3/mmc_host_def.h
90@@ -29,13 +29,20 @@
91 #define T2_BASE 0x48002000
92
93 typedef struct t2 {
94- unsigned char res1[0x274];
95+ unsigned char res1[0x274]; /* 0x000 */
96 unsigned int devconf0; /* 0x274 */
97- unsigned char res2[0x2A8];
98+ unsigned char res2[0x060]; /* 0x278 */
99+ unsigned int devconf1; /* 0x2D8 */
100+ unsigned char res3[0x244]; /* 0x2DC */
101 unsigned int pbias_lite; /* 0x520 */
102 } t2_t;
103
104 #define MMCSDIO1ADPCLKISEL (1 << 24)
105+#define MMCSDIO2ADPCLKISEL (1 << 6)
106+
107+#define EN_MMC1 (1 << 24)
108+#define EN_MMC2 (1 << 25)
109+#define EN_MMC3 (1 << 30)
110
111 #define PBIASLITEPWRDNZ0 (1 << 1)
112 #define PBIASSPEEDCTRL0 (1 << 2)
113@@ -44,7 +51,9 @@ typedef struct t2 {
114 /*
115 * OMAP HSMMC register definitions
116 */
117-#define OMAP_HSMMC_BASE 0x4809C000
118+#define OMAP_HSMMC1_BASE 0x4809C000
119+#define OMAP_HSMMC2_BASE 0x480B4000
120+#define OMAP_HSMMC3_BASE 0x480AD000
121
122 typedef struct hsmmc {
123 unsigned char res1[0x10];
124--
1251.5.6.4
126
diff --git a/recipes-bsp/u-boot/u-boot/0001-OMAP3-Beagle-enable-support-for-second-and-third-m.patch b/recipes-bsp/u-boot/u-boot/0001-OMAP3-Beagle-enable-support-for-second-and-third-m.patch
new file mode 100644
index 00000000..21f1f13e
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0001-OMAP3-Beagle-enable-support-for-second-and-third-m.patch
@@ -0,0 +1,56 @@
1From 629a01965677e680ffa1fe76579ace7f69dd45b9 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Fri, 7 May 2010 07:40:26 -0700
4Subject: [PATCH] OMAP3: Beagle: enable support for second and third mmc channels
5
6Based on 629a01965677e680ffa1fe76579ace7f69dd45b9, but removed BOOTDELAY change.
7
8---
9 include/configs/omap3_beagle.h | 8 +++++---
10 1 files changed, 5 insertions(+), 3 deletions(-)
11
12diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
13index f2d0f53..74d4159 100644
14--- a/include/configs/omap3_beagle.h
15+++ b/include/configs/omap3_beagle.h
16@@ -95,6 +95,7 @@
17 115200}
18 #define CONFIG_MMC 1
19 #define CONFIG_OMAP3_MMC 1
20+#define CONFIG_SYS_MMC_SET_DEV 1
21 #define CONFIG_DOS_PARTITION 1
22
23 /* DDR - I use Micron DDR */
24@@ -186,6 +187,7 @@
25 "vram=12M\0" \
26 "dvimode=1024x768MR-16@60\0" \
27 "defaultdisplay=dvi\0" \
28+ "mmcdev=1\0" \
29 "mmcroot=/dev/mmcblk0p2 rw\0" \
30 "mmcrootfstype=ext3 rootwait\0" \
31 "nandroot=/dev/mtdblock4 rw\0" \
32@@ -204,10 +206,10 @@
33 "omapdss.def_disp=${defaultdisplay} " \
34 "root=${nandroot} " \
35 "rootfstype=${nandrootfstype}\0" \
36- "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
37+ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
38 "bootscript=echo Running bootscript from mmc ...; " \
39 "source ${loadaddr}\0" \
40- "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
41+ "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
42 "mmcboot=echo Booting from mmc ...; " \
43 "run mmcargs; " \
44 "bootm ${loadaddr}\0" \
45@@ -217,7 +219,7 @@
46 "bootm ${loadaddr}\0" \
47
48 #define CONFIG_BOOTCOMMAND \
49- "if mmc init; then " \
50+ "if mmc init ${mmcdev}; then " \
51 "if run loadbootscript; then " \
52 "run bootscript; " \
53 "else " \
54--
551.5.6.4
56
diff --git a/recipes-bsp/u-boot/u-boot/0001-OMAP3-enable-i2c-bus-switching-for-Beagle-and-Overo.patch b/recipes-bsp/u-boot/u-boot/0001-OMAP3-enable-i2c-bus-switching-for-Beagle-and-Overo.patch
new file mode 100644
index 00000000..c718191a
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0001-OMAP3-enable-i2c-bus-switching-for-Beagle-and-Overo.patch
@@ -0,0 +1,49 @@
1From 9c1581dd7f6057d5d25d6b2dcf8bacef95d526d2 Mon Sep 17 00:00:00 2001
2From: Syed Mohammed Khasim <khasim@ti.com>
3Date: Mon, 18 Jan 2010 18:11:14 +0530
4Subject: [PATCH] Enable I2C bus switching
5
6OMAP3 supports Multiple I2C channels, this patch allows
7us to use i2c dev <bus no> command to switch between busses.
8
9Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
10Acked-by: Heiko Schocher <hs@denx.de>
11(cherry picked from commit 9bb1c3501c8f098dac6e224c99e409ebf92b0ab9)
12---
13 drivers/i2c/omap24xx_i2c.c | 5 +++++
14 include/configs/omap3_beagle.h | 6 ++++++
15 2 files changed, 11 insertions(+), 0 deletions(-)
16
17diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
18index f00468d..0af230d 100644
19--- a/drivers/i2c/omap24xx_i2c.c
20+++ b/drivers/i2c/omap24xx_i2c.c
21@@ -435,3 +435,8 @@ int i2c_set_bus_num(unsigned int bus)
22
23 return 0;
24 }
25+
26+int i2c_get_bus_num(void)
27+{
28+ return (int) current_bus;
29+}
30diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
31index ad73a66..1a76004 100644
32--- a/include/configs/omap3_beagle.h
33+++ b/include/configs/omap3_beagle.h
34@@ -113,6 +113,12 @@
35 /* DDR - I use Micron DDR */
36 #define CONFIG_OMAP3_MICRON_DDR 1
37
38+/* Enable Multi Bus support for I2C */
39+#define CONFIG_I2C_MULTI_BUS 1
40+
41+/* Probe all devices */
42+#define CONFIG_SYS_I2C_NOPROBES {0x0, 0x0}
43+
44 /* USB */
45 #define CONFIG_MUSB_UDC 1
46 #define CONFIG_USB_OMAP3 1
47--
481.6.1
49
diff --git a/recipes-bsp/u-boot/u-boot/0002-OMAP3-add-board-revision-detection-for-Overo.patch b/recipes-bsp/u-boot/u-boot/0002-OMAP3-add-board-revision-detection-for-Overo.patch
new file mode 100644
index 00000000..255d7257
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0002-OMAP3-add-board-revision-detection-for-Overo.patch
@@ -0,0 +1,187 @@
1From 59c9245c9a52954c8c084e257bbe55443201614b Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Wed, 10 Feb 2010 14:40:56 -0800
4Subject: [PATCH 02/37] OMAP3: add board revision detection for Overo
5
6---
7 board/overo/overo.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++
8 board/overo/overo.h | 43 +++++++++++++++++++++---
9 2 files changed, 127 insertions(+), 6 deletions(-)
10
11diff --git a/board/overo/overo.c b/board/overo/overo.c
12index e85be7d..3df1a12 100644
13--- a/board/overo/overo.c
14+++ b/board/overo/overo.c
15@@ -61,11 +61,101 @@ int board_init(void)
16 }
17
18 /*
19+ * Routine: get_sdio2_config
20+ * Description: Return information about the wifi module connection
21+ * Returns 0 if the module connects though a level translator
22+ * Returns 1 if the module connects directly
23+ */
24+int get_sdio2_config(void) {
25+ int sdio_direct;
26+
27+ if (!omap_request_gpio(130) && !omap_request_gpio(139)){
28+
29+ omap_set_gpio_direction(130, 0);
30+ omap_set_gpio_direction(139, 1);
31+
32+ sdio_direct = 1;
33+ omap_set_gpio_dataout(130, 0);
34+ if (omap_get_gpio_datain(139) == 0) {
35+ omap_set_gpio_dataout(130, 1);
36+ if (omap_get_gpio_datain(139) == 1)
37+ sdio_direct = 0;
38+ }
39+
40+ omap_free_gpio(130);
41+ omap_free_gpio(139);
42+ } else {
43+ printf("Error: unable to acquire sdio2 clk GPIOs\n");
44+ sdio_direct=-1;
45+ }
46+
47+ return sdio_direct;
48+}
49+
50+/*
51+ * Routine: get_board_revision
52+ * Description: Returns the board revision
53+ */
54+int get_board_revision(void) {
55+ int revision;
56+
57+ if (!omap_request_gpio(126) && !omap_request_gpio(127) &&
58+ !omap_request_gpio(128) && !omap_request_gpio(129)){
59+
60+ omap_set_gpio_direction(126, 1);
61+ omap_set_gpio_direction(127, 1);
62+ omap_set_gpio_direction(128, 1);
63+ omap_set_gpio_direction(129, 1);
64+
65+ revision = 0;
66+ if (omap_get_gpio_datain(126) == 0)
67+ revision += 1;
68+ if (omap_get_gpio_datain(127) == 0)
69+ revision += 2;
70+ if (omap_get_gpio_datain(128) == 0)
71+ revision += 4;
72+ if (omap_get_gpio_datain(129) == 0)
73+ revision += 8;
74+
75+ omap_free_gpio(126);
76+ omap_free_gpio(127);
77+ omap_free_gpio(128);
78+ omap_free_gpio(129);
79+ } else {
80+ printf("Error: unable to acquire board revision GPIOs\n");
81+ revision=-1;
82+ }
83+
84+ return revision;
85+}
86+
87+/*
88 * Routine: misc_init_r
89 * Description: Configure board specific parts
90 */
91 int misc_init_r(void)
92 {
93+ printf("Board revision: ");
94+ switch (get_board_revision()) {
95+ case 0:
96+ case 1:
97+ switch (get_sdio2_config()) {
98+ case 0:
99+ printf(" 0\n");
100+ MUX_OVERO_SDIO2_TRANSCEIVER();
101+ break;
102+ case 1:
103+ printf(" 1\n");
104+ MUX_OVERO_SDIO2_DIRECT();
105+ break;
106+ default:
107+ printf(" unknown\n");
108+ }
109+ break;
110+ default:
111+ printf(" unsupported\n");
112+ }
113+
114 twl4030_power_init();
115 twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
116
117diff --git a/board/overo/overo.h b/board/overo/overo.h
118index 1873523..e120e09 100644
119--- a/board/overo/overo.h
120+++ b/board/overo/overo.h
121@@ -206,12 +206,12 @@ const omap3_sysinfo sysinfo = {
122 MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN | M0)) /*MMC1_DAT1*/\
123 MUX_VAL(CP(MMC1_DAT2), (IEN | PTU | EN | M0)) /*MMC1_DAT2*/\
124 MUX_VAL(CP(MMC1_DAT3), (IEN | PTU | EN | M0)) /*MMC1_DAT3*/\
125- MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M0)) /*MMC1_DAT4*/\
126- MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M0)) /*MMC1_DAT5*/\
127- MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)) /*MMC1_DAT6*/\
128- MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M0)) /*MMC1_DAT7*/\
129+ MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M4)) /*GPIO_126*/\
130+ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M4)) /*GPIO_127*/\
131+ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M4)) /*GPIO_128*/\
132+ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M4)) /*GPIO_129*/\
133 /*Wireless LAN */\
134- MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\
135+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\
136 MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\
137 MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\
138 MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\
139@@ -220,7 +220,7 @@ const omap3_sysinfo sysinfo = {
140 MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT0*/\
141 MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT1*/\
142 MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M1)) /*MMC2_DIR_CMD*/\
143- MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M1)) /*MMC2_CLKIN*/\
144+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\
145 /*Bluetooth*/\
146 MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M1)) /*UART2_CTS*/\
147 MUX_VAL(CP(MCBSP3_DR), (IDIS | PTD | DIS | M1)) /*UART2_RTS*/\
148@@ -387,5 +387,36 @@ const omap3_sysinfo sysinfo = {
149 MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
150 MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
151
152+#define MUX_OVERO_SDIO2_DIRECT() \
153+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\
154+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\
155+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\
156+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\
157+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\
158+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\
159+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M0)) /*MMC2_DAT4*/\
160+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M0)) /*MMC2_DAT5*/\
161+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M0)) /*MMC2_DAT6*/\
162+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M0)) /*MMC2_DAT7*/\
163+ MUX_VAL(CP(MMC1_DAT4), (IEN | PTD | EN | M4)) /*GPIO_126*/\
164+ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M4)) /*GPIO_127*/\
165+ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M4)) /*GPIO_128*/\
166+ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M4)) /*GPIO_129*/
167+
168+#define MUX_OVERO_SDIO2_TRANSCEIVER() \
169+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\
170+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\
171+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\
172+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\
173+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\
174+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\
175+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT0*/\
176+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT1*/\
177+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M1)) /*MMC2_DIR_CMD*/\
178+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M1)) /*MMC2_CLKIN*/\
179+ MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M4)) /*GPIO_126*/\
180+ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M4)) /*GPIO_127*/\
181+ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M4)) /*GPIO_128*/\
182+ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M4)) /*GPIO_129*/
183
184 #endif
185--
1861.6.6.1
187
diff --git a/recipes-bsp/u-boot/u-boot/0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch b/recipes-bsp/u-boot/u-boot/0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch
new file mode 100644
index 00000000..d12ff7a1
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch
@@ -0,0 +1,165 @@
1From 9db5da6e8a0d6fb973b71902525ad3298faa39d9 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Wed, 10 Feb 2010 14:51:48 -0800
4Subject: [PATCH 03/37] OMAP3: update Beagle revision detection to recognize C4 boards
5
6---
7 board/ti/beagle/beagle.c | 77 +++++++++++++++++++++++++++-------------------
8 board/ti/beagle/beagle.h | 7 +++-
9 2 files changed, 51 insertions(+), 33 deletions(-)
10
11diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
12index 3b4c9e7..ba16dd7 100644
13--- a/board/ti/beagle/beagle.c
14+++ b/board/ti/beagle/beagle.c
15@@ -38,7 +38,7 @@
16 #include <asm/mach-types.h>
17 #include "beagle.h"
18
19-static int beagle_revision_c;
20+static int beagle_revision;
21
22 /*
23 * Routine: board_init
24@@ -60,41 +60,38 @@ int board_init(void)
25 /*
26 * Routine: beagle_get_revision
27 * Description: Return the revision of the BeagleBoard this code is running on.
28- * If it is a revision Ax/Bx board, this function returns 0,
29- * on a revision C board you will get a 1.
30 */
31 int beagle_get_revision(void)
32 {
33- return beagle_revision_c;
34+ return beagle_revision;
35 }
36
37 /*
38 * Routine: beagle_identify
39- * Description: Detect if we are running on a Beagle revision Ax/Bx or
40- * Cx. This can be done by GPIO_171. If this is low, we are
41- * running on a revision C board.
42+ * Description: Detect if we are running on a Beagle revision Ax/Bx,
43+ * C1/2/3, C4 or D. This can be done by reading
44+ * the level of GPIO173, GPIO172 and GPIO171. This should
45+ * result in
46+ * GPIO173, GPIO172, GPIO171: 1 1 1 => Ax/Bx
47+ * GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3
48+ * GPIO173, GPIO172, GPIO171: 1 0 1 => C4
49+ * GPIO173, GPIO172, GPIO171: 0 0 0 => D
50 */
51 void beagle_identify(void)
52 {
53- beagle_revision_c = 0;
54- if (!omap_request_gpio(171)) {
55- unsigned int val;
56-
57- omap_set_gpio_direction(171, 1);
58- val = omap_get_gpio_datain(171);
59- omap_free_gpio(171);
60-
61- if (val)
62- beagle_revision_c = 0;
63- else
64- beagle_revision_c = 1;
65- }
66-
67- printf("Board revision ");
68- if (beagle_revision_c)
69- printf("C\n");
70- else
71- printf("Ax/Bx\n");
72+ omap_request_gpio(171);
73+ omap_request_gpio(172);
74+ omap_request_gpio(173);
75+ omap_set_gpio_direction(171, 1);
76+ omap_set_gpio_direction(172, 1);
77+ omap_set_gpio_direction(173, 1);
78+
79+ beagle_revision = omap_get_gpio_datain(173) << 2 |
80+ omap_get_gpio_datain(172) << 1 |
81+ omap_get_gpio_datain(171);
82+ omap_free_gpio(171);
83+ omap_free_gpio(172);
84+ omap_free_gpio(173);
85 }
86
87 /*
88@@ -106,9 +103,31 @@ int misc_init_r(void)
89 struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
90 struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
91
92+ beagle_identify();
93+
94 twl4030_power_init();
95 twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
96
97+ printf("Board revision ");
98+ switch (beagle_revision) {
99+ case REVISION_AXBX:
100+ printf("Ax/Bx\n");
101+ break;
102+ case REVISION_CX:
103+ printf("C1/C2/C3\n");
104+ MUX_BEAGLE_C();
105+ break;
106+ case REVISION_C4:
107+ printf("C4\n");
108+ MUX_BEAGLE_C();
109+ break;
110+ case REVISION_D:
111+ printf("D\n");
112+ break;
113+ default:
114+ printf("unknown 0x%02x\n", beagle_revision);
115+ }
116+
117 /* Configure GPIOs to output */
118 writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe);
119 writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
120@@ -120,8 +139,6 @@ int misc_init_r(void)
121 writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
122 GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);
123
124- beagle_identify();
125-
126 dieid_num_r();
127
128 return 0;
129@@ -136,8 +153,4 @@ int misc_init_r(void)
130 void set_muxconf_regs(void)
131 {
132 MUX_BEAGLE();
133-
134- if (beagle_revision_c) {
135- MUX_BEAGLE_C();
136- }
137 }
138diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
139index 7fe6275..d95fd78 100644
140--- a/board/ti/beagle/beagle.h
141+++ b/board/ti/beagle/beagle.h
142@@ -34,6 +34,11 @@ const omap3_sysinfo sysinfo = {
143 };
144
145 #define BOARD_REVISION_MASK (0x1 << 11)
146+/* BeagleBoard revisions */
147+#define REVISION_AXBX 0x7
148+#define REVISION_CX 0x6
149+#define REVISION_C4 0x5
150+#define REVISION_D 0x0
151
152 /*
153 * IEN - Input Enable
154@@ -264,7 +269,7 @@ const omap3_sysinfo sysinfo = {
155 MUX_VAL(CP(HDQ_SIO), (IDIS | PTU | EN | M4)) /*GPIO_170*/\
156 MUX_VAL(CP(MCSPI1_CLK), (IEN | PTU | EN | M4)) /*GPIO_171*/\
157 MUX_VAL(CP(MCSPI1_SIMO), (IEN | PTU | EN | M4)) /*GPIO_172*/\
158- MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI*/\
159+ MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTU | EN | M4)) /*GPIO_173*/\
160 MUX_VAL(CP(MCSPI1_CS0), (IEN | PTD | EN | M0)) /*McSPI1_CS0*/\
161 MUX_VAL(CP(MCSPI1_CS1), (IDIS | PTD | EN | M0)) /*McSPI1_CS1*/\
162 MUX_VAL(CP(MCSPI1_CS2), (IDIS | PTD | DIS | M4)) /*GPIO_176*/\
163--
1641.6.6.1
165
diff --git a/recipes-bsp/u-boot/u-boot/0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch b/recipes-bsp/u-boot/u-boot/0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch
new file mode 100644
index 00000000..549b3fbd
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch
@@ -0,0 +1,143 @@
1From efc587fb24a5246f5a436a057320687a1b7847c6 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Wed, 10 Feb 2010 15:23:19 -0800
4Subject: [PATCH 04/37] OMAP3: Set VAUX2 to 1.8V for EHCI PHY on Beagle Rev C4 boards
5
6---
7 board/ti/beagle/beagle.c | 5 +++++
8 drivers/power/twl4030.c | 45 +++++++++++++++++++++++++--------------------
9 include/twl4030.h | 15 +++++++++++++++
10 3 files changed, 45 insertions(+), 20 deletions(-)
11
12diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
13index ba16dd7..b4ea7e6 100644
14--- a/board/ti/beagle/beagle.c
15+++ b/board/ti/beagle/beagle.c
16@@ -120,6 +120,11 @@ int misc_init_r(void)
17 case REVISION_C4:
18 printf("C4\n");
19 MUX_BEAGLE_C();
20+ /* Set VAUX2 to 1.8V for EHCI PHY */
21+ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
22+ TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
23+ TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
24+ TWL4030_PM_RECEIVER_DEV_GRP_P1);
25 break;
26 case REVISION_D:
27 printf("D\n");
28diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
29index eb066cb..f354834 100644
30--- a/drivers/power/twl4030.c
31+++ b/drivers/power/twl4030.c
32@@ -59,57 +59,62 @@ void twl4030_power_reset_init(void)
33 }
34 }
35
36-
37-/*
38- * Power Init
39- */
40-#define DEV_GRP_P1 0x20
41-#define VAUX3_VSEL_28 0x03
42-#define DEV_GRP_ALL 0xE0
43-#define VPLL2_VSEL_18 0x05
44-#define VDAC_VSEL_18 0x03
45-
46 void twl4030_power_init(void)
47 {
48 unsigned char byte;
49
50 /* set VAUX3 to 2.8V */
51- byte = DEV_GRP_P1;
52+ byte = TWL4030_PM_RECEIVER_DEV_GRP_P1;
53 twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
54 TWL4030_PM_RECEIVER_VAUX3_DEV_GRP);
55- byte = VAUX3_VSEL_28;
56+ byte = TWL4030_PM_RECEIVER_VAUX3_VSEL_28;
57 twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
58 TWL4030_PM_RECEIVER_VAUX3_DEDICATED);
59
60 /* set VPLL2 to 1.8V */
61- byte = DEV_GRP_ALL;
62+ byte = TWL4030_PM_RECEIVER_DEV_GRP_ALL;
63 twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
64 TWL4030_PM_RECEIVER_VPLL2_DEV_GRP);
65- byte = VPLL2_VSEL_18;
66+ byte = TWL4030_PM_RECEIVER_VPLL2_VSEL_18;
67 twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
68 TWL4030_PM_RECEIVER_VPLL2_DEDICATED);
69
70 /* set VDAC to 1.8V */
71- byte = DEV_GRP_P1;
72+ byte = TWL4030_PM_RECEIVER_DEV_GRP_P1;
73 twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
74 TWL4030_PM_RECEIVER_VDAC_DEV_GRP);
75- byte = VDAC_VSEL_18;
76+ byte = TWL4030_PM_RECEIVER_VDAC_VSEL_18;
77 twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
78 TWL4030_PM_RECEIVER_VDAC_DEDICATED);
79 }
80
81-#define VMMC1_VSEL_30 0x02
82-
83 void twl4030_power_mmc_init(void)
84 {
85 unsigned char byte;
86
87- byte = DEV_GRP_P1;
88+ byte = TWL4030_PM_RECEIVER_DEV_GRP_P1;
89 twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
90 TWL4030_PM_RECEIVER_VMMC1_DEV_GRP);
91
92 /* 3 Volts */
93- byte = VMMC1_VSEL_30;
94+ byte = TWL4030_PM_RECEIVER_VMMC1_VSEL_30;
95 twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
96 TWL4030_PM_RECEIVER_VMMC1_DEDICATED);
97 }
98+
99+/*
100+ * Generic function to select Device Group and Voltage
101+ */
102+void twl4030_pmrecv_vsel_cfg(u8 vsel_reg, u8 vsel_val,
103+ u8 dev_grp, u8 dev_grp_sel)
104+{
105+ /* Select the Device Group */
106+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, dev_grp_sel,
107+ dev_grp);
108+
109+ /* Select the Voltage */
110+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, vsel_val,
111+ vsel_reg);
112+}
113+
114+
115diff --git a/include/twl4030.h b/include/twl4030.h
116index 2b2f5ae..cc99403 100644
117--- a/include/twl4030.h
118+++ b/include/twl4030.h
119@@ -471,6 +471,21 @@
120 #define TWL4030_USB_PHY_CLK_CTRL_STS 0xFF
121
122 /*
123+ * Voltage Selection in PM Receiver Module
124+ */
125+#define TWL4030_PM_RECEIVER_VAUX2_VSEL_18 0x05
126+#define TWL4030_PM_RECEIVER_VAUX3_VSEL_28 0x03
127+#define TWL4030_PM_RECEIVER_VPLL2_VSEL_18 0x05
128+#define TWL4030_PM_RECEIVER_VDAC_VSEL_18 0x03
129+#define TWL4030_PM_RECEIVER_VMMC1_VSEL_30 0x02
130+
131+/*
132+ * Device Selection in PM Receiver Module
133+ */
134+#define TWL4030_PM_RECEIVER_DEV_GRP_P1 0x20
135+#define TWL4030_PM_RECEIVER_DEV_GRP_ALL 0xE0
136+
137+/*
138 * Convience functions to read and write from TWL4030
139 *
140 * chip_no is the i2c address, it must be one of the chip addresses
141--
1421.6.6.1
143
diff --git a/recipes-bsp/u-boot/u-boot/0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch b/recipes-bsp/u-boot/u-boot/0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch
new file mode 100644
index 00000000..783fe279
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch
@@ -0,0 +1,105 @@
1From 27072274450ea8de1994744782397452b99814cc Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Wed, 3 Feb 2010 12:26:30 -0800
4Subject: [PATCH 05/37] OMAP3: add entry for rev 3.1.2, check and display max cpu clock for rev > 3.0
5
6---
7 cpu/arm_cortexa8/omap3/sys_info.c | 24 ++++++++++++++++++++++--
8 include/asm-arm/arch-omap3/cpu.h | 8 +++++++-
9 include/asm-arm/arch-omap3/omap3.h | 3 ++-
10 3 files changed, 31 insertions(+), 4 deletions(-)
11
12diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c
13index 08fb32e..e227f67 100644
14--- a/cpu/arm_cortexa8/omap3/sys_info.c
15+++ b/cpu/arm_cortexa8/omap3/sys_info.c
16@@ -39,7 +39,10 @@ static char *rev_s[CPU_3XX_MAX_REV] = {
17 "2.0",
18 "2.1",
19 "3.0",
20- "3.1"};
21+ "3.1",
22+ "UNKNOWN",
23+ "UNKNOWN",
24+ "3.1.2"};
25
26 /*****************************************************************
27 * dieid_num_r(void) - read and set die ID
28@@ -104,6 +107,16 @@ u32 get_cpu_rev(void)
29 }
30 }
31
32+/*****************************************************************
33+ * get_sku_id(void) - read sku_id to get info on max clock rate
34+ *****************************************************************/
35+u32 get_sku_id(void)
36+{
37+ struct ctrl_id *id_base = (struct ctrl_id *)OMAP34XX_ID_L4_IO_BASE;
38+ return (readl(&id_base->sku_id) & SKUID_CLK_MASK);
39+}
40+
41+
42 /****************************************************
43 * is_mem_sdr() - return 1 if mem type in use is SDR
44 ****************************************************/
45@@ -291,9 +304,16 @@ int print_cpuinfo (void)
46 sec_s = "?";
47 }
48
49- printf("OMAP%s-%s ES%s, CPU-OPP2 L3-165MHz\n",
50+ printf("OMAP%s-%s ES%s, CPU-OPP2, L3-165MHz, ",
51 cpu_s, sec_s, rev_s[get_cpu_rev()]);
52
53+ printf("Max clock-");
54+ if ((get_cpu_rev() >= CPU_3XX_ES31) && (get_sku_id() == SKUID_CLK_720MHZ))
55+ printf("720Mhz\n");
56+ else printf("600Mhz\n");
57+
58+
59+
60 return 0;
61 }
62 #endif /* CONFIG_DISPLAY_CPUINFO */
63diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h
64index aa8de32..f769571 100644
65--- a/include/asm-arm/arch-omap3/cpu.h
66+++ b/include/asm-arm/arch-omap3/cpu.h
67@@ -72,7 +72,8 @@ struct ctrl_id {
68 u8 res1[0x4];
69 u32 idcode; /* 0x04 */
70 u32 prod_id; /* 0x08 */
71- u8 res2[0x0C];
72+ u32 sku_id; /* 0x0c */
73+ u8 res2[0x08];
74 u32 die_id_0; /* 0x18 */
75 u32 die_id_1; /* 0x1C */
76 u32 die_id_2; /* 0x20 */
77@@ -89,6 +90,11 @@ struct ctrl_id {
78 #define HS_DEVICE 0x2
79 #define GP_DEVICE 0x3
80
81+/* device speed */
82+#define SKUID_CLK_MASK 0xf
83+#define SKUID_CLK_600MHZ 0x0
84+#define SKUID_CLK_720MHZ 0x8
85+
86 #define GPMC_BASE (OMAP34XX_GPMC_BASE)
87 #define GPMC_CONFIG_CS0 0x60
88 #define GPMC_CONFIG_CS0_BASE (GPMC_BASE + GPMC_CONFIG_CS0)
89diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h
90index 12815f6..1349b8b 100644
91--- a/include/asm-arm/arch-omap3/omap3.h
92+++ b/include/asm-arm/arch-omap3/omap3.h
93@@ -176,7 +176,8 @@ struct gpio {
94 #define CPU_3XX_ES21 2
95 #define CPU_3XX_ES30 3
96 #define CPU_3XX_ES31 4
97-#define CPU_3XX_MAX_REV (CPU_3XX_ES31 + 1)
98+#define CPU_3XX_ES312 7
99+#define CPU_3XX_MAX_REV 8
100
101 #define CPU_3XX_ID_SHIFT 28
102
103--
1041.6.6.1
105
diff --git a/recipes-bsp/u-boot/u-boot/0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch b/recipes-bsp/u-boot/u-boot/0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch
new file mode 100644
index 00000000..de3b4845
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch
@@ -0,0 +1,70 @@
1From 1b082bb4a8ba5b7bee727baf3cd048e1785c8abd Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Wed, 3 Feb 2010 14:39:14 -0800
4Subject: [PATCH 06/37] OMAP3: add mpurate boot arg for overo and beagle
5
6allows one to set the omap clock rate via "setenv mpurate 720" for example
7---
8 include/configs/omap3_beagle.h | 3 +++
9 include/configs/omap3_overo.h | 3 +++
10 2 files changed, 6 insertions(+), 0 deletions(-)
11
12diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
13index 87e3dd0..ce347cd 100644
14--- a/include/configs/omap3_beagle.h
15+++ b/include/configs/omap3_beagle.h
16@@ -182,6 +182,7 @@
17 "loadaddr=0x82000000\0" \
18 "usbtty=cdc_acm\0" \
19 "console=ttyS2,115200n8\0" \
20+ "mpurate=500\0" \
21 "vram=12M\0" \
22 "dvimode=1024x768MR-16@60\0" \
23 "defaultdisplay=dvi\0" \
24@@ -190,6 +191,7 @@
25 "nandroot=/dev/mtdblock4 rw\0" \
26 "nandrootfstype=jffs2\0" \
27 "mmcargs=setenv bootargs console=${console} " \
28+ "mpurate=${mpurate} " \
29 "vram=${vram} " \
30 "omapfb.mode=dvi:${dvimode} " \
31 "omapfb.debug=y " \
32@@ -197,6 +199,7 @@
33 "root=${mmcroot} " \
34 "rootfstype=${mmcrootfstype}\0" \
35 "nandargs=setenv bootargs console=${console} " \
36+ "mpurate=${mpurate} " \
37 "vram=${vram} " \
38 "omapfb.mode=dvi:${dvimode} " \
39 "omapfb.debug=y " \
40diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
41index 0d24758..295cce6 100644
42--- a/include/configs/omap3_overo.h
43+++ b/include/configs/omap3_overo.h
44@@ -152,6 +152,7 @@
45 #define CONFIG_EXTRA_ENV_SETTINGS \
46 "loadaddr=0x82000000\0" \
47 "console=ttyS2,115200n8\0" \
48+ "mpurate=500\0" \
49 "vram=12M\0" \
50 "dvimode=1024x768MR-16@60\0" \
51 "defaultdisplay=dvi\0" \
52@@ -160,6 +161,7 @@
53 "nandroot=/dev/mtdblock4 rw\0" \
54 "nandrootfstype=jffs2\0" \
55 "mmcargs=setenv bootargs console=${console} " \
56+ "mpurate=${mpurate} " \
57 "vram=${vram} " \
58 "omapfb.mode=dvi:${dvimode} " \
59 "omapfb.debug=y " \
60@@ -167,6 +169,7 @@
61 "root=${mmcroot} " \
62 "rootfstype=${mmcrootfstype}\0" \
63 "nandargs=setenv bootargs console=${console} " \
64+ "mpurate=${mpurate} " \
65 "vram=${vram} " \
66 "omapfb.mode=dvi:${dvimode} " \
67 "omapfb.debug=y " \
68--
691.6.6.1
70
diff --git a/recipes-bsp/u-boot/u-boot/0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch b/recipes-bsp/u-boot/u-boot/0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch
new file mode 100644
index 00000000..13da414c
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch
@@ -0,0 +1,129 @@
1From 129dccd106ea5862f3ff25c368102bf656472f7f Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Fri, 12 Feb 2010 12:17:48 -0800
4Subject: [PATCH 07/37] OMAP3: detect expansion board type/version using eeprom contents
5
6---
7 board/overo/overo.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++
8 1 files changed, 92 insertions(+), 0 deletions(-)
9
10diff --git a/board/overo/overo.c b/board/overo/overo.c
11index 3df1a12..2838a1f 100644
12--- a/board/overo/overo.c
13+++ b/board/overo/overo.c
14@@ -39,6 +39,31 @@
15 #include <asm/mach-types.h>
16 #include "overo.h"
17
18+static struct {
19+ unsigned int device_vendor;
20+ unsigned char revision;
21+ unsigned char content;
22+ unsigned char data[6];
23+} expansion_config;
24+
25+#define TWL4030_I2C_BUS 0
26+
27+#define EXPANSION_EEPROM_I2C_BUS 2
28+#define EXPANSION_EEPROM_I2C_ADDRESS 0x50
29+
30+#define GUMSTIX_VENDORID 0x0200
31+
32+#define GUMSTIX_SUMMIT 0x01000200
33+#define GUMSTIX_TOBI 0x02000200
34+#define GUMSTIX_TOBI_DUO 0x03000200
35+#define GUMSTIX_PALO35 0x04000200
36+#define GUMSTIX_PALO43 0x05000200
37+#define GUMSTIX_CHESTNUT43 0x06000200
38+#define GUMSTIX_PINTO 0x07000200
39+
40+#define GUMSTIX_NO_EEPROM 0xfffffffe
41+#define GUMSTIX_UNKNOWN 0xffffffff
42+
43 #if defined(CONFIG_CMD_NET)
44 static void setup_net_chip(void);
45 #endif
46@@ -130,6 +155,31 @@ int get_board_revision(void) {
47 }
48
49 /*
50+ * Routine: get_expansion_id
51+ * Description: This function checks for expansion board by checking I2C
52+ * bus 2 for the availability of an AT24C01B serial EEPROM.
53+ * returns the device_vendor field from the EEPROM
54+ */
55+unsigned int get_expansion_id(void)
56+{
57+ i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS);
58+
59+ /* return GUMSTIX_NO_EEPROM if eeprom doesn't respond */
60+ if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1)
61+ return GUMSTIX_NO_EEPROM;
62+
63+ /* read configuration data */
64+ i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config,
65+ sizeof(expansion_config));
66+
67+ if ( (expansion_config.device_vendor & 0xffff) != GUMSTIX_VENDORID )
68+ return GUMSTIX_UNKNOWN;
69+ else
70+ return expansion_config.device_vendor;
71+}
72+
73+
74+/*
75 * Routine: misc_init_r
76 * Description: Configure board specific parts
77 */
78@@ -156,6 +206,48 @@ int misc_init_r(void)
79 printf(" unsupported\n");
80 }
81
82+ switch (get_expansion_id()) {
83+ case GUMSTIX_SUMMIT:
84+ printf("Recognized Summit expansion board (rev %d %s)\n",
85+ expansion_config.revision, expansion_config.data);
86+ setenv("defaultdisplay", "dvi");
87+ break;
88+ case GUMSTIX_TOBI:
89+ printf("Recognized Tobi expansion board (rev %d %s)\n",
90+ expansion_config.revision, expansion_config.data);
91+ setenv("defaultdisplay", "dvi");
92+ break;
93+ case GUMSTIX_TOBI_DUO:
94+ printf("Recognized Tobi Duo expansion board (rev %d %s)\n",
95+ expansion_config.revision, expansion_config.data);
96+ break;
97+ case GUMSTIX_PALO35:
98+ printf("Recognized Palo 35 expansion board (rev %d %s)\n",
99+ expansion_config.revision, expansion_config.data);
100+ setenv("defaultdisplay", "lcd35");
101+ break;
102+ case GUMSTIX_PALO43:
103+ printf("Recognized Palo 43 expansion board (rev %d %s)\n",
104+ expansion_config.revision, expansion_config.data);
105+ setenv("defaultdisplay", "lcd43");
106+ break;
107+ case GUMSTIX_CHESTNUT43:
108+ printf("Recognized Chestnut 43 expansion board (rev %d %s)\n",
109+ expansion_config.revision, expansion_config.data);
110+ setenv("defaultdisplay", "lcd43");
111+ break;
112+ case GUMSTIX_PINTO:
113+ printf("Recognized Pinto expansion board (rev %d %s)\n",
114+ expansion_config.revision, expansion_config.data);
115+ break;
116+ case GUMSTIX_NO_EEPROM:
117+ printf("No EEPROM on expansion board\n");
118+ break;
119+ case GUMSTIX_UNKNOWN:
120+ printf("Unrecognized expansion board\n");
121+ }
122+
123+ i2c_set_bus_num(TWL4030_I2C_BUS);
124 twl4030_power_init();
125 twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
126
127--
1281.6.6.1
129
diff --git a/recipes-bsp/u-boot/u-boot/0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch b/recipes-bsp/u-boot/u-boot/0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch
new file mode 100644
index 00000000..c7aea042
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch
@@ -0,0 +1,81 @@
1From 4fb2bbcae8f283c46e762aa93b25cbbd55bab8b6 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 16 Feb 2010 09:58:01 -0800
4Subject: [PATCH 08/37] OMAP3: Overo: enable config eeprom to set u-boot env variable
5
6---
7 board/overo/overo.c | 21 +++++++++++++--------
8 1 files changed, 13 insertions(+), 8 deletions(-)
9
10diff --git a/board/overo/overo.c b/board/overo/overo.c
11index 2838a1f..f6093d2 100644
12--- a/board/overo/overo.c
13+++ b/board/overo/overo.c
14@@ -43,7 +43,9 @@ static struct {
15 unsigned int device_vendor;
16 unsigned char revision;
17 unsigned char content;
18- unsigned char data[6];
19+ unsigned char fab_revision[8];
20+ unsigned char env_var[16];
21+ unsigned char env_setting[64];
22 } expansion_config;
23
24 #define TWL4030_I2C_BUS 0
25@@ -209,36 +211,36 @@ int misc_init_r(void)
26 switch (get_expansion_id()) {
27 case GUMSTIX_SUMMIT:
28 printf("Recognized Summit expansion board (rev %d %s)\n",
29- expansion_config.revision, expansion_config.data);
30+ expansion_config.revision, expansion_config.fab_revision);
31 setenv("defaultdisplay", "dvi");
32 break;
33 case GUMSTIX_TOBI:
34 printf("Recognized Tobi expansion board (rev %d %s)\n",
35- expansion_config.revision, expansion_config.data);
36+ expansion_config.revision, expansion_config.fab_revision);
37 setenv("defaultdisplay", "dvi");
38 break;
39 case GUMSTIX_TOBI_DUO:
40 printf("Recognized Tobi Duo expansion board (rev %d %s)\n",
41- expansion_config.revision, expansion_config.data);
42+ expansion_config.revision, expansion_config.fab_revision);
43 break;
44 case GUMSTIX_PALO35:
45 printf("Recognized Palo 35 expansion board (rev %d %s)\n",
46- expansion_config.revision, expansion_config.data);
47+ expansion_config.revision, expansion_config.fab_revision);
48 setenv("defaultdisplay", "lcd35");
49 break;
50 case GUMSTIX_PALO43:
51 printf("Recognized Palo 43 expansion board (rev %d %s)\n",
52- expansion_config.revision, expansion_config.data);
53+ expansion_config.revision, expansion_config.fab_revision);
54 setenv("defaultdisplay", "lcd43");
55 break;
56 case GUMSTIX_CHESTNUT43:
57 printf("Recognized Chestnut 43 expansion board (rev %d %s)\n",
58- expansion_config.revision, expansion_config.data);
59+ expansion_config.revision, expansion_config.fab_revision);
60 setenv("defaultdisplay", "lcd43");
61 break;
62 case GUMSTIX_PINTO:
63 printf("Recognized Pinto expansion board (rev %d %s)\n",
64- expansion_config.revision, expansion_config.data);
65+ expansion_config.revision, expansion_config.fab_revision);
66 break;
67 case GUMSTIX_NO_EEPROM:
68 printf("No EEPROM on expansion board\n");
69@@ -247,6 +249,9 @@ int misc_init_r(void)
70 printf("Unrecognized expansion board\n");
71 }
72
73+ if (expansion_config.content == 1)
74+ setenv(expansion_config.env_var, expansion_config.env_setting);
75+
76 i2c_set_bus_num(TWL4030_I2C_BUS);
77 twl4030_power_init();
78 twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
79--
801.6.6.1
81
diff --git a/recipes-bsp/u-boot/u-boot/0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch b/recipes-bsp/u-boot/u-boot/0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch
new file mode 100644
index 00000000..b690a6c8
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch
@@ -0,0 +1,34 @@
1From 0ddd7f44f04b47d16d33a6b232b288ebdb1c9992 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 16 Feb 2010 10:00:45 -0800
4Subject: [PATCH 09/37] OMAP3: Overo: enable input on MMC1_CLK and MMC3_CLK pinmux
5
6---
7 board/overo/overo.h | 4 ++--
8 1 files changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/board/overo/overo.h b/board/overo/overo.h
11index e120e09..ff936dd 100644
12--- a/board/overo/overo.h
13+++ b/board/overo/overo.h
14@@ -200,7 +200,7 @@ const omap3_sysinfo sysinfo = {
15 MUX_VAL(CP(MCBSP2_DR), (IEN | PTD | DIS | M0)) /*McBSP2_DR*/\
16 MUX_VAL(CP(MCBSP2_DX), (IDIS | PTD | DIS | M0)) /*McBSP2_DX*/\
17 /*Expansion card */\
18- MUX_VAL(CP(MMC1_CLK), (IDIS | PTU | EN | M0)) /*MMC1_CLK*/\
19+ MUX_VAL(CP(MMC1_CLK), (IEN | PTU | EN | M0)) /*MMC1_CLK*/\
20 MUX_VAL(CP(MMC1_CMD), (IEN | PTU | EN | M0)) /*MMC1_CMD*/\
21 MUX_VAL(CP(MMC1_DAT0), (IEN | PTU | EN | M0)) /*MMC1_DAT0*/\
22 MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN | M0)) /*MMC1_DAT1*/\
23@@ -301,7 +301,7 @@ const omap3_sysinfo sysinfo = {
24 MUX_VAL(CP(SYS_OFF_MODE), (IEN | PTD | DIS | M0)) /*SYS_OFF_MODE*/\
25 MUX_VAL(CP(SYS_CLKOUT1), (IEN | PTD | DIS | M0)) /*SYS_CLKOUT1*/\
26 MUX_VAL(CP(SYS_CLKOUT2), (IEN | PTU | EN | M4)) /*GPIO_186*/\
27- MUX_VAL(CP(ETK_CLK_ES2), (IDIS | PTU | EN | M2)) /*MMC3_CLK*/\
28+ MUX_VAL(CP(ETK_CLK_ES2), (IEN | PTU | EN | M2)) /*MMC3_CLK*/\
29 MUX_VAL(CP(ETK_CTL_ES2), (IEN | PTU | EN | M2)) /*MMC3_CMD*/\
30 MUX_VAL(CP(ETK_D0_ES2), (IEN | PTU | EN | M4)) /*GPIO_14*/\
31 MUX_VAL(CP(ETK_D1_ES2), (IEN | PTD | EN | M4)) /*GPIO_15 - X_GATE*/\
32--
331.6.6.1
34
diff --git a/recipes-bsp/u-boot/u-boot/0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch b/recipes-bsp/u-boot/u-boot/0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch
new file mode 100644
index 00000000..53e12b3e
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch
@@ -0,0 +1,25 @@
1From 405a5a151c8d42f157dc48731f6e607675156774 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 16 Feb 2010 10:03:14 -0800
4Subject: [PATCH 10/37] OMAP3: Overo: set CONFIG_SYS_I2C_SPEED to 400Khz
5
6---
7 include/configs/omap3_overo.h | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
11index 295cce6..fdbeb67 100644
12--- a/include/configs/omap3_overo.h
13+++ b/include/configs/omap3_overo.h
14@@ -112,7 +112,7 @@
15
16 #define CONFIG_SYS_NO_FLASH
17 #define CONFIG_HARD_I2C 1
18-#define CONFIG_SYS_I2C_SPEED 100000
19+#define CONFIG_SYS_I2C_SPEED 400000
20 #define CONFIG_SYS_I2C_SLAVE 1
21 #define CONFIG_SYS_I2C_BUS 0
22 #define CONFIG_SYS_I2C_BUS_SELECT 1
23--
241.6.6.1
25
diff --git a/recipes-bsp/u-boot/u-boot/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch b/recipes-bsp/u-boot/u-boot/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch
new file mode 100644
index 00000000..6a3a5d93
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch
@@ -0,0 +1,52 @@
1From 991f54c9da846ab9571c256adf42d8d80d044bdc Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 16 Feb 2010 10:04:30 -0800
4Subject: [PATCH 11/37] OMAP3: trim excessively long delays in i2c driver
5
6---
7 drivers/i2c/omap24xx_i2c.c | 8 ++++----
8 1 files changed, 4 insertions(+), 4 deletions(-)
9
10diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
11index 30a8b4c..ba47fc4 100644
12--- a/drivers/i2c/omap24xx_i2c.c
13+++ b/drivers/i2c/omap24xx_i2c.c
14@@ -148,7 +148,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
15 if (status & I2C_STAT_XRDY) {
16 /* Important: have to use byte access */
17 writeb (regoffset, &i2c_base->data);
18- udelay (20000);
19+ udelay (2000);
20 if (readw (&i2c_base->stat) & I2C_STAT_NACK) {
21 i2c_error = 1;
22 }
23@@ -160,7 +160,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
24 /* free bus, otherwise we can't use a combined transction */
25 writew (0, &i2c_base->con);
26 while (readw (&i2c_base->stat) || (readw (&i2c_base->con) & I2C_CON_MST)) {
27- udelay (10000);
28+ udelay (1000);
29 /* Have to clear pending interrupt to clear I2C_STAT */
30 writew (0xFFFF, &i2c_base->stat);
31 }
32@@ -181,7 +181,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
33 #else
34 *value = readw (&i2c_base->data);
35 #endif
36- udelay (20000);
37+ udelay (2000);
38 } else {
39 i2c_error = 1;
40 }
41@@ -190,7 +190,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
42 writew (I2C_CON_EN, &i2c_base->con);
43 while (readw (&i2c_base->stat)
44 || (readw (&i2c_base->con) & I2C_CON_MST)) {
45- udelay (10000);
46+ udelay (1000);
47 writew (0xFFFF, &i2c_base->stat);
48 }
49 }
50--
511.6.6.1
52
diff --git a/recipes-bsp/u-boot/u-boot/0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch b/recipes-bsp/u-boot/u-boot/0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch
new file mode 100644
index 00000000..b554d254
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch
@@ -0,0 +1,47 @@
1From ad1a2c047554deae2e1608d025c4f6891cf8f116 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Fri, 26 Feb 2010 12:40:26 -0800
4Subject: [PATCH 12/37] OMAP3: Overo: allow expansion boards with any vendor ID
5
6---
7 board/overo/overo.c | 10 +++-------
8 1 files changed, 3 insertions(+), 7 deletions(-)
9
10diff --git a/board/overo/overo.c b/board/overo/overo.c
11index f6093d2..ec186ec 100644
12--- a/board/overo/overo.c
13+++ b/board/overo/overo.c
14@@ -63,8 +63,7 @@ static struct {
15 #define GUMSTIX_CHESTNUT43 0x06000200
16 #define GUMSTIX_PINTO 0x07000200
17
18-#define GUMSTIX_NO_EEPROM 0xfffffffe
19-#define GUMSTIX_UNKNOWN 0xffffffff
20+#define GUMSTIX_NO_EEPROM 0xffffffff
21
22 #if defined(CONFIG_CMD_NET)
23 static void setup_net_chip(void);
24@@ -174,10 +173,7 @@ unsigned int get_expansion_id(void)
25 i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config,
26 sizeof(expansion_config));
27
28- if ( (expansion_config.device_vendor & 0xffff) != GUMSTIX_VENDORID )
29- return GUMSTIX_UNKNOWN;
30- else
31- return expansion_config.device_vendor;
32+ return expansion_config.device_vendor;
33 }
34
35
36@@ -245,7 +241,7 @@ int misc_init_r(void)
37 case GUMSTIX_NO_EEPROM:
38 printf("No EEPROM on expansion board\n");
39 break;
40- case GUMSTIX_UNKNOWN:
41+ default:
42 printf("Unrecognized expansion board\n");
43 }
44
45--
461.6.6.1
47
diff --git a/recipes-bsp/u-boot/u-boot/0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch b/recipes-bsp/u-boot/u-boot/0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch
new file mode 100644
index 00000000..4bbddcbd
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch
@@ -0,0 +1,25 @@
1From 305e2cb16f4f6e8c7f13120e6a98bb1e999c764f Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Fri, 26 Feb 2010 12:42:30 -0800
4Subject: [PATCH 13/37] OMAP3: Overo: change address of expansion eeprom to 0x51 so as to not conflict with EDID address
5
6---
7 board/overo/overo.c | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/board/overo/overo.c b/board/overo/overo.c
11index ec186ec..f96e7ff 100644
12--- a/board/overo/overo.c
13+++ b/board/overo/overo.c
14@@ -51,7 +51,7 @@ static struct {
15 #define TWL4030_I2C_BUS 0
16
17 #define EXPANSION_EEPROM_I2C_BUS 2
18-#define EXPANSION_EEPROM_I2C_ADDRESS 0x50
19+#define EXPANSION_EEPROM_I2C_ADDRESS 0x51
20
21 #define GUMSTIX_VENDORID 0x0200
22
23--
241.6.6.1
25
diff --git a/recipes-bsp/u-boot/u-boot/0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch b/recipes-bsp/u-boot/u-boot/0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch
new file mode 100644
index 00000000..2936dffc
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch
@@ -0,0 +1,49 @@
1From 63de99ce613bbfce792ee46d14b324273e6a0d29 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 23 Mar 2010 09:04:50 -0700
4Subject: [PATCH 14/37] OMAP3: board.c: don't attempt to set up second RAM bank, assume x-load has already done this
5
6---
7 cpu/arm_cortexa8/omap3/board.c | 19 +++++++++----------
8 1 files changed, 9 insertions(+), 10 deletions(-)
9
10diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c
11index 7b78fa4..0126152 100644
12--- a/cpu/arm_cortexa8/omap3/board.c
13+++ b/cpu/arm_cortexa8/omap3/board.c
14@@ -232,6 +232,7 @@ void s_init(void)
15
16 per_clocks_enable();
17
18+ /* FIXME: u-boot's sdrc setup is broken */
19 if (!in_sdram)
20 sdrc_init();
21 }
22@@ -281,16 +282,14 @@ int dram_init(void)
23 {
24 DECLARE_GLOBAL_DATA_PTR;
25 unsigned int size0 = 0, size1 = 0;
26-
27- /*
28- * If a second bank of DDR is attached to CS1 this is
29- * where it can be started. Early init code will init
30- * memory on CS0.
31- */
32- if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
33- do_sdrc_init(CS1, NOT_EARLY);
34- make_cs1_contiguous();
35- }
36+ struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE;
37+ struct sdrc_actim *sdrc_actim_base = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE;
38+
39+ /* x-load sets up the second bank but */
40+ /* doesn't test to see if it is there */
41+ /* do so now, disable if not present */
42+ if (!mem_ok(CS1))
43+ writel(0, &sdrc_base->cs[1].mcfg);
44
45 size0 = get_sdr_cs_size(CS0);
46 size1 = get_sdr_cs_size(CS1);
47--
481.6.6.1
49
diff --git a/recipes-bsp/u-boot/u-boot/0015-OMAP3-mem.c-enhance-the-RAM-test.patch b/recipes-bsp/u-boot/u-boot/0015-OMAP3-mem.c-enhance-the-RAM-test.patch
new file mode 100644
index 00000000..ce3c3b85
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0015-OMAP3-mem.c-enhance-the-RAM-test.patch
@@ -0,0 +1,52 @@
1From f2e3d22fb1963d08844edee45f7d7d6beba32152 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 23 Mar 2010 09:06:49 -0700
4Subject: [PATCH 15/37] OMAP3: mem.c: enhance the RAM test
5
6---
7 cpu/arm_cortexa8/omap3/mem.c | 28 +++++++++++++++-------------
8 1 files changed, 15 insertions(+), 13 deletions(-)
9
10diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c
11index dfb7e4c..b828097 100644
12--- a/cpu/arm_cortexa8/omap3/mem.c
13+++ b/cpu/arm_cortexa8/omap3/mem.c
14@@ -106,21 +106,23 @@ void make_cs1_contiguous(void)
15 *******************************************************/
16 u32 mem_ok(u32 cs)
17 {
18- u32 val1, val2, addr;
19+ u32 i, val1, val2, addr, size;
20 u32 pattern = 0x12345678;
21
22- addr = OMAP34XX_SDRC_CS0 + get_sdr_cs_offset(cs);
23-
24- writel(0x0, addr + 0x400); /* clear pos A */
25- writel(pattern, addr); /* pattern to pos B */
26- writel(0x0, addr + 4); /* remove pattern off the bus */
27- val1 = readl(addr + 0x400); /* get pos A value */
28- val2 = readl(addr); /* get val2 */
29+ size = get_sdr_cs_offset(cs);
30+ addr = OMAP34XX_SDRC_CS0 + size;
31+
32+ for (i = 0; i < size; i+=1024) {
33+ writel(pattern - i, addr + i);
34+ }
35
36- if ((val1 != 0) || (val2 != pattern)) /* see if pos A val changed */
37- return 0;
38- else
39- return 1;
40+ for (i = 0; i < size; i+=1024) {
41+ val1 = readl(addr + i);
42+ if (val1 != (pattern - i)) {
43+ return 0;
44+ }
45+ }
46+ return 1;
47 }
48
49 /********************************************************
50--
511.6.6.1
52
diff --git a/recipes-bsp/u-boot/u-boot/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch b/recipes-bsp/u-boot/u-boot/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch
new file mode 100644
index 00000000..5e83125e
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch
@@ -0,0 +1,27 @@
1From 794e4aa6a5aa5fbe71b08bfe8f5f5f65078fbc68 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 23 Mar 2010 09:12:16 -0700
4Subject: [PATCH 16/37] env_nand.c: fail gracefully if no nand is present
5
6---
7 common/env_nand.c | 4 ++++
8 1 files changed, 4 insertions(+), 0 deletions(-)
9
10diff --git a/common/env_nand.c b/common/env_nand.c
11index a15a950..325f112 100644
12--- a/common/env_nand.c
13+++ b/common/env_nand.c
14@@ -268,6 +268,10 @@ int readenv (size_t offset, u_char * buf)
15
16 u_char *char_ptr;
17
18+ /* fail if no nand detected */
19+ if (nand_info[0].type == 0)
20+ return 1;
21+
22 blocksize = nand_info[0].erasesize;
23 len = min(blocksize, CONFIG_ENV_SIZE);
24
25--
261.6.6.1
27
diff --git a/recipes-bsp/u-boot/u-boot/0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch b/recipes-bsp/u-boot/u-boot/0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch
new file mode 100644
index 00000000..ad5a2131
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch
@@ -0,0 +1,68 @@
1From 34622e1e89b615c999480ab48ec004c16f8ca2d5 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 23 Mar 2010 09:15:29 -0700
4Subject: [PATCH 17/37] OMAP3: add definitions to support sysinfo cpu and cpu family detection
5
6---
7 include/asm-arm/arch-omap3/cpu.h | 6 ------
8 include/asm-arm/arch-omap3/omap3.h | 29 +++++++++++++++++++++++++++++
9 2 files changed, 29 insertions(+), 6 deletions(-)
10
11diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h
12index f769571..d9eec7e 100644
13--- a/include/asm-arm/arch-omap3/cpu.h
14+++ b/include/asm-arm/arch-omap3/cpu.h
15@@ -60,12 +60,6 @@ struct ctrl {
16 #endif /* __ASSEMBLY__ */
17 #endif /* __KERNEL_STRICT_NAMES */
18
19-/* cpu type */
20-#define OMAP3503 0x5c00
21-#define OMAP3515 0x1c00
22-#define OMAP3525 0x4c00
23-#define OMAP3530 0x0c00
24-
25 #ifndef __KERNEL_STRICT_NAMES
26 #ifndef __ASSEMBLY__
27 struct ctrl_id {
28diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h
29index 1349b8b..3957c79 100644
30--- a/include/asm-arm/arch-omap3/omap3.h
31+++ b/include/asm-arm/arch-omap3/omap3.h
32@@ -184,4 +184,33 @@ struct gpio {
33 #define WIDTH_8BIT 0x0000
34 #define WIDTH_16BIT 0x1000 /* bit pos for 16 bit in gpmc */
35
36+/*
37+ * Hawkeye values
38+ */
39+#define HAWKEYE_OMAP34XX 0xb7ae
40+#define HAWKEYE_AM35XX 0xb868
41+#define HAWKEYE_OMAP36XX 0xb891
42+
43+#define HAWKEYE_SHIFT 12
44+
45+/*
46+ * Define CPU families
47+ */
48+#define CPU_OMAP34XX 0x3400 /* OMAP34xx/OMAP35 devices */
49+#define CPU_AM35XX 0x3500 /* AM35xx devices */
50+#define CPU_OMAP36XX 0x3600 /* OMAP36xx devices */
51+
52+/*
53+ * Control status register values corresponding to cpu variants
54+ */
55+#define OMAP3503 0x5c00
56+#define OMAP3515 0x1c00
57+#define OMAP3525 0x4c00
58+#define OMAP3530 0x0c00
59+
60+#define AM3505 0x5c00
61+#define AM3517 0x1c00
62+
63+#define OMAP3730 0x0c00
64+
65 #endif
66--
671.6.6.1
68
diff --git a/recipes-bsp/u-boot/u-boot/0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch b/recipes-bsp/u-boot/u-boot/0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch
new file mode 100644
index 00000000..65f606b4
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch
@@ -0,0 +1,196 @@
1From 8480eb0272865078290146031e09eb70baed3f6e Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 23 Mar 2010 09:17:59 -0700
4Subject: [PATCH 18/37] OMAP3 sys_info: update cpu detection for 36XX/37XX
5
6---
7 cpu/arm_cortexa8/omap3/sys_info.c | 137 ++++++++++++++++++++++++++++---------
8 1 files changed, 105 insertions(+), 32 deletions(-)
9
10diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c
11index e227f67..e32a846 100644
12--- a/cpu/arm_cortexa8/omap3/sys_info.c
13+++ b/cpu/arm_cortexa8/omap3/sys_info.c
14@@ -79,32 +79,72 @@ u32 get_cpu_type(void)
15 }
16
17 /******************************************
18- * get_cpu_rev(void) - extract version info
19+ * get_cpu_id(void) - extract cpu id
20+ * returns 0 for ES1.0, cpuid otherwise
21 ******************************************/
22-u32 get_cpu_rev(void)
23+u32 get_cpu_id(void)
24 {
25- u32 cpuid = 0;
26 struct ctrl_id *id_base;
27+ u32 cpuid = 0;
28
29 /*
30 * On ES1.0 the IDCODE register is not exposed on L4
31 * so using CPU ID to differentiate between ES1.0 and > ES1.0.
32 */
33 __asm__ __volatile__("mrc p15, 0, %0, c0, c0, 0":"=r"(cpuid));
34- if ((cpuid & 0xf) == 0x0)
35- return CPU_3XX_ES10;
36- else {
37+ if ((cpuid & 0xf) == 0x0) {
38+ return 0;
39+ } else {
40 /* Decode the IDs on > ES1.0 */
41 id_base = (struct ctrl_id *) OMAP34XX_ID_L4_IO_BASE;
42
43- cpuid = (readl(&id_base->idcode) >> CPU_3XX_ID_SHIFT) & 0xf;
44+ cpuid = readl(&id_base->idcode);
45+ }
46
47- /* Some early ES2.0 seem to report ID 0, fix this */
48- if(cpuid == 0)
49- cpuid = CPU_3XX_ES20;
50+ return cpuid;
51+}
52
53- return cpuid;
54+/******************************************
55+ * get_cpu_family(void) - extract cpu info
56+ ******************************************/
57+u32 get_cpu_family(void)
58+{
59+ u16 hawkeye;
60+ u32 cpu_family;
61+ u32 cpuid = get_cpu_id();
62+
63+ if (cpuid == 0)
64+ return CPU_OMAP34XX;
65+
66+ hawkeye = (cpuid >> HAWKEYE_SHIFT) & 0xffff;
67+ switch(hawkeye) {
68+ case HAWKEYE_OMAP34XX:
69+ cpu_family = CPU_OMAP34XX;
70+ break;
71+ case HAWKEYE_AM35XX:
72+ cpu_family = CPU_AM35XX;
73+ break;
74+ case HAWKEYE_OMAP36XX:
75+ cpu_family = CPU_OMAP36XX;
76+ break;
77+ default:
78+ cpu_family = CPU_OMAP34XX;
79 }
80+
81+ return cpu_family;
82+}
83+
84+/******************************************
85+ * get_cpu_rev(void) - extract version info
86+ ******************************************/
87+u32 get_cpu_rev(void)
88+{
89+ u32 cpuid = get_cpu_id();
90+
91+ if (cpuid == 0)
92+ return CPU_3XX_ES10;
93+ else
94+ return (cpuid >> CPU_3XX_ID_SHIFT) & 0xf;
95 }
96
97 /*****************************************************************
98@@ -267,24 +307,57 @@ u32 get_device_type(void)
99 */
100 int print_cpuinfo (void)
101 {
102- char *cpu_s, *sec_s;
103-
104- switch (get_cpu_type()) {
105- case OMAP3503:
106- cpu_s = "3503";
107- break;
108- case OMAP3515:
109- cpu_s = "3515";
110+ char *cpu_family_s, *cpu_s, *sec_s;
111+
112+ switch(get_cpu_family()) {
113+ case CPU_OMAP34XX:
114+ cpu_family_s = "OMAP";
115+ switch (get_cpu_type()) {
116+ case OMAP3503:
117+ cpu_s = "3503";
118+ break;
119+ case OMAP3515:
120+ cpu_s = "3515";
121+ break;
122+ case OMAP3525:
123+ cpu_s = "3525";
124+ break;
125+ case OMAP3530:
126+ cpu_s = "3530";
127+ break;
128+ default:
129+ cpu_s = "35XX";
130+ break;
131+ }
132 break;
133- case OMAP3525:
134- cpu_s = "3525";
135+ case CPU_AM35XX:
136+ cpu_family_s = "AM";
137+ switch (get_cpu_type()) {
138+ case AM3505:
139+ cpu_s = "3505";
140+ break;
141+ case AM3517:
142+ cpu_s = "3517";
143+ break;
144+ default:
145+ cpu_s = "35XX";
146+ break;
147+ }
148 break;
149- case OMAP3530:
150- cpu_s = "3530";
151+ case CPU_OMAP36XX:
152+ cpu_family_s = "OMAP";
153+ switch (get_cpu_type()) {
154+ case OMAP3730:
155+ cpu_s = "3630/3730";
156+ break;
157+ default:
158+ cpu_s = "36XX/37XX";
159+ break;
160+ }
161 break;
162 default:
163+ cpu_family_s = "OMAP";
164 cpu_s = "35XX";
165- break;
166 }
167
168 switch (get_device_type()) {
169@@ -304,16 +377,16 @@ int print_cpuinfo (void)
170 sec_s = "?";
171 }
172
173- printf("OMAP%s-%s ES%s, CPU-OPP2, L3-165MHz, ",
174- cpu_s, sec_s, rev_s[get_cpu_rev()]);
175+ printf("%s%s-%s ES%s, CPU-OPP2, L3-165MHz, ",
176+ cpu_family_s, cpu_s, sec_s, rev_s[get_cpu_rev()]);
177
178- printf("Max clock-");
179- if ((get_cpu_rev() >= CPU_3XX_ES31) && (get_sku_id() == SKUID_CLK_720MHZ))
180- printf("720Mhz\n");
181- else printf("600Mhz\n");
182+ if (get_cpu_family() == CPU_OMAP34XX)
183+ if ((get_cpu_rev() >= CPU_3XX_ES31) &&
184+ (get_sku_id() == SKUID_CLK_720MHZ))
185+ printf("Max clock-720Mhz\n");
186+ else printf("Max clock-600Mhz\n");
187+ else printf("\n");
188
189-
190-
191 return 0;
192 }
193 #endif /* CONFIG_DISPLAY_CPUINFO */
194--
1951.6.6.1
196
diff --git a/recipes-bsp/u-boot/u-boot/0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch b/recipes-bsp/u-boot/u-boot/0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch
new file mode 100644
index 00000000..e5dbec62
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch
@@ -0,0 +1,826 @@
1From 0bf419a0faa8c9dc73d7a84f93d7fcb89be3ea21 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 23 Mar 2010 09:20:56 -0700
4Subject: [PATCH 19/37] OMAP3: clocks: update clock setup for 36XX/37XX
5
6---
7 cpu/arm_cortexa8/omap3/clock.c | 559 +++++++++++++++++++++--------
8 cpu/arm_cortexa8/omap3/lowlevel_init.S | 69 ++++
9 include/asm-arm/arch-omap3/clocks.h | 17 +
10 include/asm-arm/arch-omap3/clocks_omap3.h | 27 ++
11 4 files changed, 525 insertions(+), 147 deletions(-)
12
13diff --git a/cpu/arm_cortexa8/omap3/clock.c b/cpu/arm_cortexa8/omap3/clock.c
14index 6330c9e..538a183 100644
15--- a/cpu/arm_cortexa8/omap3/clock.c
16+++ b/cpu/arm_cortexa8/omap3/clock.c
17@@ -47,17 +47,12 @@ u32 get_osc_clk_speed(void)
18 struct s32ktimer *s32k_base = (struct s32ktimer *)SYNC_32KTIMER_BASE;
19
20 val = readl(&prm_base->clksrc_ctrl);
21-
22 if (val & SYSCLKDIV_2)
23 cdiv = 2;
24- else if (val & SYSCLKDIV_1)
25- cdiv = 1;
26 else
27- /*
28- * Should never reach here! (Assume divider as 1)
29- */
30 cdiv = 1;
31
32+
33 /* enable timer2 */
34 val = readl(&prcm_base->clksel_wkup) | CLKSEL_GPT1;
35
36@@ -67,7 +62,6 @@ u32 get_osc_clk_speed(void)
37 /* Enable I and F Clocks for GPT1 */
38 val = readl(&prcm_base->iclken_wkup) | EN_GPT1 | EN_32KSYNC;
39 writel(val, &prcm_base->iclken_wkup);
40-
41 val = readl(&prcm_base->fclken_wkup) | EN_GPT1;
42 writel(val, &prcm_base->fclken_wkup);
43
44@@ -87,13 +81,10 @@ u32 get_osc_clk_speed(void)
45
46 /* wait for 40 cycles */
47 while (readl(&s32k_base->s32k_cr) < (start + 20)) ;
48+
49 cend = readl(&gpt1_base->tcrr); /* get end sys_clk count */
50 cdiff = cend - cstart; /* get elapsed ticks */
51-
52- if (cdiv == 2)
53- {
54- cdiff *= 2;
55- }
56+ cdiff *= cdiv;
57
58 /* based on number of ticks assign speed */
59 if (cdiff > 19000)
60@@ -135,65 +126,25 @@ void get_sys_clkin_sel(u32 osc_clk, u32 *sys_clkin_sel)
61 }
62 }
63
64+/*
65+ * OMAP3530 specific functions
66+ */
67+
68 /******************************************************************************
69- * prcm_init() - inits clocks for PRCM as defined in clocks.h
70- * called from SRAM, or Flash (using temp SRAM stack).
71+ * Initialize CORE DPLL for OMAP34x/35x
72 *****************************************************************************/
73-void prcm_init(void)
74+static void dpll3_init_34xx(u32 sil_index, u32 clk_index)
75 {
76+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
77+ dpll_param *ptr = (dpll_param *) get_core_dpll_param();
78 void (*f_lock_pll) (u32, u32, u32, u32);
79 int xip_safe, p0, p1, p2, p3;
80- u32 osc_clk = 0, sys_clkin_sel;
81- u32 clk_index, sil_index = 0;
82- struct prm *prm_base = (struct prm *)PRM_BASE;
83- struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
84- dpll_param *dpll_param_p;
85-
86- f_lock_pll = (void *) ((u32) &_end_vect - (u32) &_start +
87- SRAM_VECT_CODE);
88
89 xip_safe = is_running_in_sram();
90
91- /*
92- * Gauge the input clock speed and find out the sys_clkin_sel
93- * value corresponding to the input clock.
94- */
95- osc_clk = get_osc_clk_speed();
96- get_sys_clkin_sel(osc_clk, &sys_clkin_sel);
97+ /* Moving to the right sysclk and ES rev base */
98+ ptr = ptr + (3 * clk_index) + sil_index;
99
100- /* set input crystal speed */
101- sr32(&prm_base->clksel, 0, 3, sys_clkin_sel);
102-
103- /* If the input clock is greater than 19.2M always divide/2 */
104- if (sys_clkin_sel > 2) {
105- /* input clock divider */
106- sr32(&prm_base->clksrc_ctrl, 6, 2, 2);
107- clk_index = sys_clkin_sel / 2;
108- } else {
109- /* input clock divider */
110- sr32(&prm_base->clksrc_ctrl, 6, 2, 1);
111- clk_index = sys_clkin_sel;
112- }
113-
114- /*
115- * The DPLL tables are defined according to sysclk value and
116- * silicon revision. The clk_index value will be used to get
117- * the values for that input sysclk from the DPLL param table
118- * and sil_index will get the values for that SysClk for the
119- * appropriate silicon rev.
120- */
121- if (get_cpu_rev())
122- sil_index = 1;
123-
124- /* Unlock MPU DPLL (slows things down, and needed later) */
125- sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOW_POWER_BYPASS);
126- wait_on_value(ST_MPU_CLK, 0, &prcm_base->idlest_pll_mpu, LDELAY);
127-
128- /* Getting the base address of Core DPLL param table */
129- dpll_param_p = (dpll_param *) get_core_dpll_param();
130-
131- /* Moving it to the right sysclk and ES rev base */
132- dpll_param_p = dpll_param_p + 3 * clk_index + sil_index;
133 if (xip_safe) {
134 /*
135 * CORE DPLL
136@@ -208,34 +159,38 @@ void prcm_init(void)
137 * work. write another value and then default value.
138 */
139
140- /* m3x2 */
141- sr32(&prcm_base->clksel1_emu, 16, 5, CORE_M3X2 + 1);
142- /* m3x2 */
143+ /* CM_CLKSEL1_EMU[DIV_DPLL3] */
144+ sr32(&prcm_base->clksel1_emu, 16, 5, (CORE_M3X2 + 1)) ;
145 sr32(&prcm_base->clksel1_emu, 16, 5, CORE_M3X2);
146- /* Set M2 */
147- sr32(&prcm_base->clksel1_pll, 27, 2, dpll_param_p->m2);
148- /* Set M */
149- sr32(&prcm_base->clksel1_pll, 16, 11, dpll_param_p->m);
150- /* Set N */
151- sr32(&prcm_base->clksel1_pll, 8, 7, dpll_param_p->n);
152- /* 96M Src */
153+
154+ /* M2 (CORE_DPLL_CLKOUT_DIV): CM_CLKSEL1_PLL[27:31] */
155+ sr32(&prcm_base->clksel1_pll, 27, 5, ptr->m2);
156+
157+ /* M (CORE_DPLL_MULT): CM_CLKSEL1_PLL[16:26] */
158+ sr32(&prcm_base->clksel1_pll, 16, 11, ptr->m);
159+
160+ /* N (CORE_DPLL_DIV): CM_CLKSEL1_PLL[8:14] */
161+ sr32(&prcm_base->clksel1_pll, 8, 7, ptr->n);
162+
163+ /* Source is the CM_96M_FCLK: CM_CLKSEL1_PLL[6] */
164 sr32(&prcm_base->clksel1_pll, 6, 1, 0);
165- /* ssi */
166+
167+ /* SSI */
168 sr32(&prcm_base->clksel_core, 8, 4, CORE_SSI_DIV);
169- /* fsusb */
170+ /* FSUSB */
171 sr32(&prcm_base->clksel_core, 4, 2, CORE_FUSB_DIV);
172- /* l4 */
173+ /* L4 */
174 sr32(&prcm_base->clksel_core, 2, 2, CORE_L4_DIV);
175- /* l3 */
176+ /* L3 */
177 sr32(&prcm_base->clksel_core, 0, 2, CORE_L3_DIV);
178- /* gfx */
179- sr32(&prcm_base->clksel_gfx, 0, 3, GFX_DIV);
180- /* reset mgr */
181+ /* GFX */
182+ sr32(&prcm_base->clksel_gfx, 0, 3, GFX_DIV);
183+ /* RESET MGR */
184 sr32(&prcm_base->clksel_wkup, 1, 2, WKUP_RSM);
185- /* FREQSEL */
186- sr32(&prcm_base->clken_pll, 4, 4, dpll_param_p->fsel);
187- /* lock mode */
188- sr32(&prcm_base->clken_pll, 0, 3, PLL_LOCK);
189+ /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */
190+ sr32(&prcm_base->clken_pll, 4, 4, ptr->fsel);
191+ /* LOCK MODE */
192+ sr32(&prcm_base->clken_pll, 0, 3, PLL_LOCK);
193
194 wait_on_value(ST_CORE_CLK, 1, &prcm_base->idlest_ckgen,
195 LDELAY);
196@@ -244,102 +199,411 @@ void prcm_init(void)
197 * if running from flash, jump to small relocated code
198 * area in SRAM.
199 */
200+ f_lock_pll = (void *) ((u32) &_end_vect - (u32) &_start +
201+ SRAM_VECT_CODE);
202+
203 p0 = readl(&prcm_base->clken_pll);
204 sr32(&p0, 0, 3, PLL_FAST_RELOCK_BYPASS);
205- sr32(&p0, 4, 4, dpll_param_p->fsel); /* FREQSEL */
206+ /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */
207+ sr32(&p0, 4, 4, ptr->fsel);
208
209 p1 = readl(&prcm_base->clksel1_pll);
210- sr32(&p1, 27, 2, dpll_param_p->m2); /* Set M2 */
211- sr32(&p1, 16, 11, dpll_param_p->m); /* Set M */
212- sr32(&p1, 8, 7, dpll_param_p->n); /* Set N */
213- sr32(&p1, 6, 1, 0); /* set source for 96M */
214+ /* M2 (CORE_DPLL_CLKOUT_DIV): CM_CLKSEL1_PLL[27:31] */
215+ sr32(&p1, 27, 5, ptr->m2);
216+ /* M (CORE_DPLL_MULT): CM_CLKSEL1_PLL[16:26] */
217+ sr32(&p1, 16, 11, ptr->m);
218+ /* N (CORE_DPLL_DIV): CM_CLKSEL1_PLL[8:14] */
219+ sr32(&p1, 8, 7, ptr->n);
220+ /* Source is the CM_96M_FCLK: CM_CLKSEL1_PLL[6] */
221+ sr32(&p1, 6, 1, 0);
222
223 p2 = readl(&prcm_base->clksel_core);
224- sr32(&p2, 8, 4, CORE_SSI_DIV); /* ssi */
225- sr32(&p2, 4, 2, CORE_FUSB_DIV); /* fsusb */
226- sr32(&p2, 2, 2, CORE_L4_DIV); /* l4 */
227- sr32(&p2, 0, 2, CORE_L3_DIV); /* l3 */
228+ /* SSI */
229+ sr32(&p2, 8, 4, CORE_SSI_DIV);
230+ /* FSUSB */
231+ sr32(&p2, 4, 2, CORE_FUSB_DIV);
232+ /* L4 */
233+ sr32(&p2, 2, 2, CORE_L4_DIV);
234+ /* L3 */
235+ sr32(&p2, 0, 2, CORE_L3_DIV);
236
237 p3 = (u32)&prcm_base->idlest_ckgen;
238
239 (*f_lock_pll) (p0, p1, p2, p3);
240 }
241+}
242
243- /* PER DPLL */
244- sr32(&prcm_base->clken_pll, 16, 3, PLL_STOP);
245- wait_on_value(ST_PERIPH_CLK, 0, &prcm_base->idlest_ckgen, LDELAY);
246-
247- /* Getting the base address to PER DPLL param table */
248-
249- /* Set N */
250- dpll_param_p = (dpll_param *) get_per_dpll_param();
251+/******************************************************************************
252+ * Initialize PER DPLL for OMAP34x/35x
253+ *****************************************************************************/
254+static void dpll4_init_34xx(u32 sil_index, u32 clk_index)
255+{
256+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
257+ dpll_param *ptr = (dpll_param *) get_per_dpll_param();
258
259 /* Moving it to the right sysclk base */
260- dpll_param_p = dpll_param_p + clk_index;
261+ ptr = ptr + clk_index;
262+
263+ /* EN_PERIPH_DPLL: CM_CLKEN_PLL[16:18] */
264+ sr32(&prcm_base->clken_pll, 16, 3, PLL_STOP);
265+ wait_on_value(ST_PERIPH_CLK, 0, &prcm_base->idlest_ckgen, LDELAY);
266
267 /*
268 * Errata 1.50 Workaround for OMAP3 ES1.0 only
269 * If using default divisors, write default divisor + 1
270 * and then the actual divisor value
271 */
272- sr32(&prcm_base->clksel1_emu, 24, 5, PER_M6X2 + 1); /* set M6 */
273- sr32(&prcm_base->clksel1_emu, 24, 5, PER_M6X2); /* set M6 */
274- sr32(&prcm_base->clksel_cam, 0, 5, PER_M5X2 + 1); /* set M5 */
275- sr32(&prcm_base->clksel_cam, 0, 5, PER_M5X2); /* set M5 */
276- sr32(&prcm_base->clksel_dss, 0, 5, PER_M4X2 + 1); /* set M4 */
277- sr32(&prcm_base->clksel_dss, 0, 5, PER_M4X2); /* set M4 */
278- sr32(&prcm_base->clksel_dss, 8, 5, PER_M3X2 + 1); /* set M3 */
279- sr32(&prcm_base->clksel_dss, 8, 5, PER_M3X2); /* set M3 */
280- sr32(&prcm_base->clksel3_pll, 0, 5, dpll_param_p->m2 + 1); /* set M2 */
281- sr32(&prcm_base->clksel3_pll, 0, 5, dpll_param_p->m2); /* set M2 */
282+ /* M6 */
283+ sr32(&prcm_base->clksel1_emu, 24, 5, (PER_M6X2 + 1));
284+ sr32(&prcm_base->clksel1_emu, 24, 5, PER_M6X2);
285+ /* M5 */
286+ sr32(&prcm_base->clksel_cam, 0, 5, (PER_M5X2 + 1));
287+ sr32(&prcm_base->clksel_cam, 0, 5, PER_M5X2);
288+ /* M4 */
289+ sr32(&prcm_base->clksel_dss, 0, 5, (PER_M4X2 + 1));
290+ sr32(&prcm_base->clksel_dss, 0, 5, PER_M4X2);
291+ /* M3 */
292+ sr32(&prcm_base->clksel_dss, 8, 5, (PER_M3X2 + 1));
293+ sr32(&prcm_base->clksel_dss, 8, 5, PER_M3X2);
294+ /* M2 (DIV_96M): CM_CLKSEL3_PLL[0:4] */
295+ sr32(&prcm_base->clksel3_pll, 0, 5, (ptr->m2 + 1));
296+ sr32(&prcm_base->clksel3_pll, 0, 5, ptr->m2);
297 /* Workaround end */
298
299- sr32(&prcm_base->clksel2_pll, 8, 11, dpll_param_p->m); /* set m */
300- sr32(&prcm_base->clksel2_pll, 0, 7, dpll_param_p->n); /* set n */
301- sr32(&prcm_base->clken_pll, 20, 4, dpll_param_p->fsel); /* FREQSEL */
302- sr32(&prcm_base->clken_pll, 16, 3, PLL_LOCK); /* lock mode */
303+ /* M (PERIPH_DPLL_MULT): CM_CLKSEL2_PLL[8:18] */
304+ sr32(&prcm_base->clksel2_pll, 8, 11, ptr->m);
305+
306+ /* N (PERIPH_DPLL_DIV): CM_CLKSEL2_PLL[0:6] */
307+ sr32(&prcm_base->clksel2_pll, 0, 7, ptr->n);
308+
309+ /* FREQSEL (PERIPH_DPLL_FREQSEL): CM_CLKEN_PLL[20:23] */
310+ sr32(&prcm_base->clken_pll, 20, 4, ptr->fsel);
311+
312+ /* LOCK MODE (EN_PERIPH_DPLL): CM_CLKEN_PLL[16:18] */
313+ sr32(&prcm_base->clken_pll, 16, 3, PLL_LOCK);
314 wait_on_value(ST_PERIPH_CLK, 2, &prcm_base->idlest_ckgen, LDELAY);
315+}
316
317- /* Getting the base address to MPU DPLL param table */
318- dpll_param_p = (dpll_param *) get_mpu_dpll_param();
319+static void mpu_init_34xx(u32 sil_index, u32 clk_index)
320+{
321+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
322+ dpll_param *ptr = (dpll_param *) get_mpu_dpll_param();
323
324- /* Moving it to the right sysclk and ES rev base */
325- dpll_param_p = dpll_param_p + 3 * clk_index + sil_index;
326+ /* Moving to the right sysclk and ES rev base */
327+ ptr = ptr + (3 * clk_index) + sil_index;
328
329 /* MPU DPLL (unlocked already) */
330
331- /* Set M2 */
332- sr32(&prcm_base->clksel2_pll_mpu, 0, 5, dpll_param_p->m2);
333- /* Set M */
334- sr32(&prcm_base->clksel1_pll_mpu, 8, 11, dpll_param_p->m);
335- /* Set N */
336- sr32(&prcm_base->clksel1_pll_mpu, 0, 7, dpll_param_p->n);
337- /* FREQSEL */
338- sr32(&prcm_base->clken_pll_mpu, 4, 4, dpll_param_p->fsel);
339- /* lock mode */
340- sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOCK);
341- wait_on_value(ST_MPU_CLK, 1, &prcm_base->idlest_pll_mpu, LDELAY);
342-
343- /* Getting the base address to IVA DPLL param table */
344- dpll_param_p = (dpll_param *) get_iva_dpll_param();
345-
346- /* Moving it to the right sysclk and ES rev base */
347- dpll_param_p = dpll_param_p + 3 * clk_index + sil_index;
348-
349- /* IVA DPLL (set to 12*20=240MHz) */
350+ /* M2 (MPU_DPLL_CLKOUT_DIV) : CM_CLKSEL2_PLL_MPU[0:4] */
351+ sr32(&prcm_base->clksel2_pll_mpu, 0, 5, ptr->m2);
352+
353+ /* M (MPU_DPLL_MULT) : CM_CLKSEL2_PLL_MPU[8:18] */
354+ sr32(&prcm_base->clksel1_pll_mpu, 8, 11, ptr->m);
355+
356+ /* N (MPU_DPLL_DIV) : CM_CLKSEL2_PLL_MPU[0:6] */
357+ sr32(&prcm_base->clksel1_pll_mpu, 0, 7, ptr->n);
358+
359+ /* FREQSEL (MPU_DPLL_FREQSEL) : CM_CLKEN_PLL_MPU[4:7] */
360+ sr32(&prcm_base->clken_pll_mpu, 4, 4, ptr->fsel);
361+}
362+
363+static void iva_init_34xx(u32 sil_index, u32 clk_index)
364+{
365+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
366+ dpll_param *ptr = (dpll_param *) get_iva_dpll_param();
367+
368+ /* Moving to the right sysclk and ES rev base */
369+ ptr = ptr + (3 * clk_index) + sil_index;
370+
371+ /* IVA DPLL */
372+ /* EN_IVA2_DPLL : CM_CLKEN_PLL_IVA2[0:2] */
373 sr32(&prcm_base->clken_pll_iva2, 0, 3, PLL_STOP);
374 wait_on_value(ST_IVA2_CLK, 0, &prcm_base->idlest_pll_iva2, LDELAY);
375- /* set M2 */
376- sr32(&prcm_base->clksel2_pll_iva2, 0, 5, dpll_param_p->m2);
377- /* set M */
378- sr32(&prcm_base->clksel1_pll_iva2, 8, 11, dpll_param_p->m);
379- /* set N */
380- sr32(&prcm_base->clksel1_pll_iva2, 0, 7, dpll_param_p->n);
381- /* FREQSEL */
382- sr32(&prcm_base->clken_pll_iva2, 4, 4, dpll_param_p->fsel);
383- /* lock mode */
384+
385+ /* M2 (IVA2_DPLL_CLKOUT_DIV) : CM_CLKSEL2_PLL_IVA2[0:4] */
386+ sr32(&prcm_base->clksel2_pll_iva2, 0, 5, ptr->m2);
387+
388+ /* M (IVA2_DPLL_MULT) : CM_CLKSEL1_PLL_IVA2[8:18] */
389+ sr32(&prcm_base->clksel1_pll_iva2, 8, 11, ptr->m);
390+
391+ /* N (IVA2_DPLL_DIV) : CM_CLKSEL1_PLL_IVA2[0:6] */
392+ sr32(&prcm_base->clksel1_pll_iva2, 0, 7, ptr->n);
393+
394+ /* FREQSEL (IVA2_DPLL_FREQSEL) : CM_CLKEN_PLL_IVA2[4:7] */
395+ sr32(&prcm_base->clken_pll_iva2, 4, 4, ptr->fsel);
396+
397+ /* LOCK MODE (EN_IVA2_DPLL) : CM_CLKEN_PLL_IVA2[0:2] */
398 sr32(&prcm_base->clken_pll_iva2, 0, 3, PLL_LOCK);
399+
400 wait_on_value(ST_IVA2_CLK, 1, &prcm_base->idlest_pll_iva2, LDELAY);
401+}
402+
403+/*
404+ * OMAP3630 specific functions
405+ */
406+
407+/******************************************************************************
408+ * Initialize PER DPLL for OMAP36x/37x
409+ *****************************************************************************/
410+static void dpll3_init_36xx(u32 sil_index, u32 clk_index)
411+{
412+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
413+ dpll_param *ptr = (dpll_param *) get_36x_core_dpll_param();
414+ void (*f_lock_pll) (u32, u32, u32, u32);
415+ int xip_safe, p0, p1, p2, p3;
416+
417+ xip_safe = is_running_in_sram();
418+
419+ /* Moving it to the right sysclk base */
420+ ptr += clk_index;
421+
422+ if (xip_safe) {
423+ /* CORE DPLL */
424+
425+ /* Select relock bypass: CM_CLKEN_PLL[0:2] */
426+ sr32(&prcm_base->clken_pll, 0, 3, PLL_FAST_RELOCK_BYPASS);
427+ wait_on_value(ST_CORE_CLK, 0, &prcm_base->idlest_ckgen,
428+ LDELAY);
429+
430+ /* CM_CLKSEL1_EMU[DIV_DPLL3] */
431+ sr32(&prcm_base->clksel1_emu, 16, 5, CORE_M3X2);
432+
433+ /* M2 (CORE_DPLL_CLKOUT_DIV): CM_CLKSEL1_PLL[27:31] */
434+ sr32(&prcm_base->clksel1_pll, 27, 5, ptr->m2);
435+
436+ /* M (CORE_DPLL_MULT): CM_CLKSEL1_PLL[16:26] */
437+ sr32(&prcm_base->clksel1_pll, 16, 11, ptr->m);
438+
439+ /* N (CORE_DPLL_DIV): CM_CLKSEL1_PLL[8:14] */
440+ sr32(&prcm_base->clksel1_pll, 8, 7, ptr->n);
441+
442+ /* Source is the CM_96M_FCLK: CM_CLKSEL1_PLL[6] */
443+ sr32(&prcm_base->clksel1_pll, 6, 1, 0);
444+
445+ /* SSI */
446+ sr32(&prcm_base->clksel_core, 8, 4, CORE_SSI_DIV);
447+ /* FSUSB */
448+ sr32(&prcm_base->clksel_core, 4, 2, CORE_FUSB_DIV);
449+ /* L4 */
450+ sr32(&prcm_base->clksel_core, 2, 2, CORE_L4_DIV);
451+ /* L3 */
452+ sr32(&prcm_base->clksel_core, 0, 2, CORE_L3_DIV);
453+ /* GFX */
454+ sr32(&prcm_base->clksel_gfx, 0, 3, GFX_DIV);
455+ /* RESET MGR */
456+ sr32(&prcm_base->clksel_wkup, 1, 2, WKUP_RSM);
457+ /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */
458+ sr32(&prcm_base->clken_pll, 4, 4, ptr->fsel);
459+ /* LOCK MODE */
460+ sr32(&prcm_base->clken_pll, 0, 3, PLL_LOCK);
461+
462+ wait_on_value(ST_CORE_CLK, 1, &prcm_base->idlest_ckgen,
463+ LDELAY);
464+ } else if (is_running_in_flash()) {
465+ /*
466+ * if running from flash, jump to small relocated code
467+ * area in SRAM.
468+ */
469+ f_lock_pll = (void *) ((u32) &_end_vect - (u32) &_start +
470+ SRAM_VECT_CODE);
471+
472+ p0 = readl(&prcm_base->clken_pll);
473+ sr32(&p0, 0, 3, PLL_FAST_RELOCK_BYPASS);
474+ /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */
475+ sr32(&p0, 4, 4, ptr->fsel);
476+
477+ p1 = readl(&prcm_base->clksel1_pll);
478+ /* M2 (CORE_DPLL_CLKOUT_DIV): CM_CLKSEL1_PLL[27:31] */
479+ sr32(&p1, 27, 5, ptr->m2);
480+ /* M (CORE_DPLL_MULT): CM_CLKSEL1_PLL[16:26] */
481+ sr32(&p1, 16, 11, ptr->m);
482+ /* N (CORE_DPLL_DIV): CM_CLKSEL1_PLL[8:14] */
483+ sr32(&p1, 8, 7, ptr->n);
484+ /* Source is the CM_96M_FCLK: CM_CLKSEL1_PLL[6] */
485+ sr32(&p1, 6, 1, 0);
486+
487+ p2 = readl(&prcm_base->clksel_core);
488+ /* SSI */
489+ sr32(&p2, 8, 4, CORE_SSI_DIV);
490+ /* FSUSB */
491+ sr32(&p2, 4, 2, CORE_FUSB_DIV);
492+ /* L4 */
493+ sr32(&p2, 2, 2, CORE_L4_DIV);
494+ /* L3 */
495+ sr32(&p2, 0, 2, CORE_L3_DIV);
496+
497+ p3 = (u32)&prcm_base->idlest_ckgen;
498+
499+ (*f_lock_pll) (p0, p1, p2, p3);
500+ }
501+}
502+
503+static void dpll4_init_36xx(u32 sil_index, u32 clk_index)
504+{
505+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
506+ struct dpll_per_36x_param *ptr;
507+
508+ ptr = (struct dpll_per_36x_param *)get_36x_per_dpll_param();
509+
510+ /* Moving it to the right sysclk base */
511+ ptr += clk_index;
512+
513+ /* EN_PERIPH_DPLL: CM_CLKEN_PLL[16:18] */
514+ sr32(&prcm_base->clken_pll, 16, 3, PLL_STOP);
515+ wait_on_value(ST_PERIPH_CLK, 0, &prcm_base->idlest_ckgen, LDELAY);
516+
517+ /* M6 (DIV_DPLL4): CM_CLKSEL1_EMU[24:29] */
518+ sr32(&prcm_base->clksel1_emu, 24, 6, ptr->m6);
519+
520+ /* M5 (CLKSEL_CAM): CM_CLKSEL1_EMU[0:5] */
521+ sr32(&prcm_base->clksel_cam, 0, 6, ptr->m5);
522+
523+ /* M4 (CLKSEL_DSS1): CM_CLKSEL_DSS[0:5] */
524+ sr32(&prcm_base->clksel_dss, 0, 6, ptr->m4);
525+
526+ /* M3 (CLKSEL_DSS1): CM_CLKSEL_DSS[8:13] */
527+ sr32(&prcm_base->clksel_dss, 8, 6, ptr->m3);
528+
529+ /* M2 (DIV_96M): CM_CLKSEL3_PLL[0:4] */
530+ sr32(&prcm_base->clksel3_pll, 0, 5, ptr->m2);
531+
532+ /* M (PERIPH_DPLL_MULT): CM_CLKSEL2_PLL[8:19] */
533+ sr32(&prcm_base->clksel2_pll, 8, 12, ptr->m);
534+
535+ /* N (PERIPH_DPLL_DIV): CM_CLKSEL2_PLL[0:6] */
536+ sr32(&prcm_base->clksel2_pll, 0, 7, ptr->n);
537+
538+ /* M2DIV (CLKSEL_96M): CM_CLKSEL_CORE[12:13] */
539+ sr32(&prcm_base->clksel_core, 12, 2, ptr->m2div);
540+
541+ /* LOCK MODE (EN_PERIPH_DPLL): CM_CLKEN_PLL[16:18] */
542+ sr32(&prcm_base->clken_pll, 16, 3, PLL_LOCK);
543+ wait_on_value(ST_PERIPH_CLK, 2, &prcm_base->idlest_ckgen, LDELAY);
544+}
545+
546+static void mpu_init_36xx(u32 sil_index, u32 clk_index)
547+{
548+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
549+ dpll_param *ptr = (dpll_param *) get_36x_mpu_dpll_param();
550+
551+ /* Moving to the right sysclk */
552+ ptr += clk_index;
553+
554+ /* MPU DPLL (unlocked already */
555+
556+ /* M2 (MPU_DPLL_CLKOUT_DIV) : CM_CLKSEL2_PLL_MPU[0:4] */
557+ sr32(&prcm_base->clksel2_pll_mpu, 0, 5, ptr->m2);
558+
559+ /* M (MPU_DPLL_MULT) : CM_CLKSEL2_PLL_MPU[8:18] */
560+ sr32(&prcm_base->clksel1_pll_mpu, 8, 11, ptr->m);
561+
562+ /* N (MPU_DPLL_DIV) : CM_CLKSEL2_PLL_MPU[0:6] */
563+ sr32(&prcm_base->clksel1_pll_mpu, 0, 7, ptr->n);
564+}
565+
566+static void iva_init_36xx(u32 sil_index, u32 clk_index)
567+{
568+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
569+ dpll_param *ptr = (dpll_param *)get_36x_iva_dpll_param();
570+
571+ /* Moving to the right sysclk */
572+ ptr += clk_index;
573+
574+ /* IVA DPLL */
575+ /* EN_IVA2_DPLL : CM_CLKEN_PLL_IVA2[0:2] */
576+ sr32(&prcm_base->clken_pll_iva2, 0, 3, PLL_STOP);
577+ wait_on_value(ST_IVA2_CLK, 0, &prcm_base->idlest_pll_iva2, LDELAY);
578+
579+ /* M2 (IVA2_DPLL_CLKOUT_DIV) : CM_CLKSEL2_PLL_IVA2[0:4] */
580+ sr32(&prcm_base->clksel2_pll_iva2, 0, 5, ptr->m2);
581+
582+ /* M (IVA2_DPLL_MULT) : CM_CLKSEL1_PLL_IVA2[8:18] */
583+ sr32(&prcm_base->clksel1_pll_iva2, 8, 11, ptr->m);
584+
585+ /* N (IVA2_DPLL_DIV) : CM_CLKSEL1_PLL_IVA2[0:6] */
586+ sr32(&prcm_base->clksel1_pll_iva2, 0, 7, ptr->n);
587+
588+ /* LOCK (MODE (EN_IVA2_DPLL) : CM_CLKEN_PLL_IVA2[0:2] */
589+ sr32(&prcm_base->clken_pll_iva2, 0, 3, PLL_LOCK);
590+
591+ wait_on_value(ST_IVA2_CLK, 1, &prcm_base->idlest_pll_iva2, LDELAY);
592+}
593+
594+/******************************************************************************
595+ * prcm_init() - inits clocks for PRCM as defined in clocks.h
596+ * called from SRAM, or Flash (using temp SRAM stack).
597+ *****************************************************************************/
598+void prcm_init(void)
599+{
600+ u32 osc_clk = 0, sys_clkin_sel;
601+ u32 clk_index, sil_index = 0;
602+ struct prm *prm_base = (struct prm *)PRM_BASE;
603+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
604+
605+ /*
606+ * Gauge the input clock speed and find out the sys_clkin_sel
607+ * value corresponding to the input clock.
608+ */
609+ osc_clk = get_osc_clk_speed();
610+ get_sys_clkin_sel(osc_clk, &sys_clkin_sel);
611+
612+ /* set input crystal speed */
613+ sr32(&prm_base->clksel, 0, 3, sys_clkin_sel);
614+
615+ /* If the input clock is greater than 19.2M always divide/2 */
616+ if (sys_clkin_sel > 2) {
617+ /* input clock divider */
618+ sr32(&prm_base->clksrc_ctrl, 6, 2, 2);
619+ clk_index = sys_clkin_sel / 2;
620+ } else {
621+ /* input clock divider */
622+ sr32(&prm_base->clksrc_ctrl, 6, 2, 1);
623+ clk_index = sys_clkin_sel;
624+ }
625+
626+ if (get_cpu_family() == CPU_OMAP36XX) {
627+ /* Unlock MPU DPLL (slows things down, and needed later) */
628+ sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOW_POWER_BYPASS);
629+ wait_on_value(ST_MPU_CLK, 0, &prcm_base->idlest_pll_mpu,
630+ LDELAY);
631+
632+ dpll3_init_36xx(0, clk_index);
633+ dpll4_init_36xx(0, clk_index);
634+ iva_init_36xx(0, clk_index);
635+ mpu_init_36xx(0, clk_index);
636+
637+ /* Lock MPU DPLL to set frequency */
638+ sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOCK);
639+ wait_on_value(ST_MPU_CLK, 1, &prcm_base->idlest_pll_mpu,
640+ LDELAY);
641+ } else {
642+ /*
643+ * The DPLL tables are defined according to sysclk value and
644+ * silicon revision. The clk_index value will be used to get
645+ * the values for that input sysclk from the DPLL param table
646+ * and sil_index will get the values for that SysClk for the
647+ * appropriate silicon rev.
648+ */
649+ if (((get_cpu_family() == CPU_OMAP34XX)
650+ && (get_cpu_rev() >= CPU_3XX_ES20)) ||
651+ (get_cpu_family() == CPU_AM35XX))
652+ sil_index = 1;
653+
654+ /* Unlock MPU DPLL (slows things down, and needed later) */
655+ sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOW_POWER_BYPASS);
656+ wait_on_value(ST_MPU_CLK, 0, &prcm_base->idlest_pll_mpu,
657+ LDELAY);
658+
659+ dpll3_init_34xx(sil_index, clk_index);
660+ dpll4_init_34xx(sil_index, clk_index);
661+ iva_init_34xx(sil_index, clk_index);
662+ mpu_init_34xx(sil_index, clk_index);
663+
664+ /* Lock MPU DPLL to set frequency */
665+ sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOCK);
666+ wait_on_value(ST_MPU_CLK, 1, &prcm_base->idlest_pll_mpu,
667+ LDELAY);
668+ }
669
670 /* Set up GPTimers to sys_clk source only */
671 sr32(&prcm_base->clksel_per, 0, 8, 0xff);
672@@ -414,3 +678,4 @@ void per_clocks_enable(void)
673
674 sdelay(1000);
675 }
676+
677diff --git a/cpu/arm_cortexa8/omap3/lowlevel_init.S b/cpu/arm_cortexa8/omap3/lowlevel_init.S
678index 73063ec..2045e4e 100644
679--- a/cpu/arm_cortexa8/omap3/lowlevel_init.S
680+++ b/cpu/arm_cortexa8/omap3/lowlevel_init.S
681@@ -359,3 +359,72 @@ per_dpll_param:
682 get_per_dpll_param:
683 adr r0, per_dpll_param
684 mov pc, lr
685+
686+/*
687+ * Tables for 36x/37x devices
688+ *
689+ */
690+mpu_36x_dpll_param:
691+/* 12MHz */
692+.word 50, 0, 0, 1
693+/* 13MHz */
694+.word 600, 12, 0, 1
695+/* 19.2MHz */
696+.word 125, 3, 0, 1
697+/* 26MHz */
698+.word 300, 12, 0, 1
699+/* 38.4MHz */
700+.word 125, 7, 0, 1
701+
702+iva_36x_dpll_param:
703+/* 12MHz */
704+.word 130, 2, 0, 1
705+/* 13MHz */
706+.word 40, 0, 0, 1
707+/* 19.2MHz */
708+.word 325, 11, 0, 1
709+/* 26MHz */
710+.word 20, 0, 0, 1
711+/* 38.4MHz */
712+.word 325, 23, 0, 1
713+
714+core_36x_dpll_param:
715+/* 12MHz */
716+.word 100, 2, 0, 1
717+/* 13MHz */
718+.word 400, 12, 0, 1
719+/* 19.2MHz */
720+.word 375, 17, 0, 1
721+/* 26MHz */
722+.word 200, 12, 0, 1
723+/* 38.4MHz */
724+.word 375, 35, 0, 1
725+
726+per_36x_dpll_param:
727+/* SYSCLK M N M2 M3 M4 M5 M6 m2DIV */
728+.word 12000, 360, 4, 9, 16, 5, 4, 3, 1
729+.word 13000, 864, 12, 9, 16, 9, 4, 3, 1
730+.word 19200, 360, 7, 9, 16, 5, 4, 3, 1
731+.word 26000, 432, 12, 9, 16, 9, 4, 3, 1
732+.word 38400, 360, 15, 9, 16, 5, 4, 3, 1
733+
734+.globl get_36x_mpu_dpll_param
735+get_36x_mpu_dpll_param:
736+ adr r0, mpu_36x_dpll_param
737+ mov pc, lr
738+
739+.globl get_36x_iva_dpll_param
740+get_36x_iva_dpll_param:
741+ adr r0, iva_36x_dpll_param
742+ mov pc, lr
743+
744+.globl get_36x_core_dpll_param
745+get_36x_core_dpll_param:
746+ adr r0, core_36x_dpll_param
747+ mov pc, lr
748+
749+.globl get_36x_per_dpll_param
750+get_36x_per_dpll_param:
751+ adr r0, per_36x_dpll_param
752+ mov pc, lr
753+
754diff --git a/include/asm-arm/arch-omap3/clocks.h b/include/asm-arm/arch-omap3/clocks.h
755index 71a0cb6..a5f2d08 100644
756--- a/include/asm-arm/arch-omap3/clocks.h
757+++ b/include/asm-arm/arch-omap3/clocks.h
758@@ -51,12 +51,29 @@ typedef struct {
759 unsigned int m2;
760 } dpll_param;
761
762+struct dpll_per_36x_param {
763+ unsigned int sys_clk;
764+ unsigned int m;
765+ unsigned int n;
766+ unsigned int m2;
767+ unsigned int m3;
768+ unsigned int m4;
769+ unsigned int m5;
770+ unsigned int m6;
771+ unsigned int m2div;
772+};
773+
774 /* Following functions are exported from lowlevel_init.S */
775 extern dpll_param *get_mpu_dpll_param(void);
776 extern dpll_param *get_iva_dpll_param(void);
777 extern dpll_param *get_core_dpll_param(void);
778 extern dpll_param *get_per_dpll_param(void);
779
780+extern dpll_param *get_36x_mpu_dpll_param(void);
781+extern dpll_param *get_36x_iva_dpll_param(void);
782+extern dpll_param *get_36x_core_dpll_param(void);
783+extern dpll_param *get_36x_per_dpll_param(void);
784+
785 extern void *_end_vect, *_start;
786
787 #endif
788diff --git a/include/asm-arm/arch-omap3/clocks_omap3.h b/include/asm-arm/arch-omap3/clocks_omap3.h
789index 661407b..30ef690 100644
790--- a/include/asm-arm/arch-omap3/clocks_omap3.h
791+++ b/include/asm-arm/arch-omap3/clocks_omap3.h
792@@ -282,4 +282,31 @@
793 #define PER_FSEL_38P4 0x07
794 #define PER_M2_38P4 0x09
795
796+/* 36XX PER DPLL */
797+
798+#define PER_36XX_M_12 0x1B0
799+#define PER_36XX_N_12 0x05
800+#define PER_36XX_FSEL_12 0x07
801+#define PER_36XX_M2_12 0x09
802+
803+#define PER_36XX_M_13 0x360
804+#define PER_36XX_N_13 0x0C
805+#define PER_36XX_FSEL_13 0x03
806+#define PER_36XX_M2_13 0x09
807+
808+#define PER_36XX_M_19P2 0x1C2
809+#define PER_36XX_N_19P2 0x09
810+#define PER_36XX_FSEL_19P2 0x07
811+#define PER_36XX_M2_19P2 0x09
812+
813+#define PER_36XX_M_26 0x1B0
814+#define PER_36XX_N_26 0x0C
815+#define PER_36XX_FSEL_26 0x07
816+#define PER_36XX_M2_26 0x09
817+
818+#define PER_36XX_M_38P4 0x1C2
819+#define PER_36XX_N_38P4 0x13
820+#define PER_36XX_FSEL_38P4 0x07
821+#define PER_36XX_M2_38P4 0x09
822+
823 #endif /* endif _CLOCKS_OMAP3_H_ */
824--
8251.6.6.1
826
diff --git a/recipes-bsp/u-boot/u-boot/0020-OMAP3-beagle-add-support-for-Beagle-xM.patch b/recipes-bsp/u-boot/u-boot/0020-OMAP3-beagle-add-support-for-Beagle-xM.patch
new file mode 100644
index 00000000..e6ae0dc7
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0020-OMAP3-beagle-add-support-for-Beagle-xM.patch
@@ -0,0 +1,137 @@
1From 27c6c30dbb5de0c0ed30ceaf69bb0e9f12149c03 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 23 Mar 2010 09:21:49 -0700
4Subject: [PATCH 20/37] OMAP3: beagle: add support for Beagle xM
5
6---
7 board/ti/beagle/beagle.c | 23 +++++++++++++++--------
8 board/ti/beagle/beagle.h | 34 ++++++++++++++++++++++++++++++----
9 include/configs/omap3_beagle.h | 1 +
10 3 files changed, 46 insertions(+), 12 deletions(-)
11
12diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
13index b4ea7e6..d357588 100644
14--- a/board/ti/beagle/beagle.c
15+++ b/board/ti/beagle/beagle.c
16@@ -75,7 +75,7 @@ int beagle_get_revision(void)
17 * GPIO173, GPIO172, GPIO171: 1 1 1 => Ax/Bx
18 * GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3
19 * GPIO173, GPIO172, GPIO171: 1 0 1 => C4
20- * GPIO173, GPIO172, GPIO171: 0 0 0 => D
21+ * GPIO173, GPIO172, GPIO171: 0 0 0 => XM
22 */
23 void beagle_identify(void)
24 {
25@@ -108,29 +108,36 @@ int misc_init_r(void)
26 twl4030_power_init();
27 twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
28
29- printf("Board revision ");
30 switch (beagle_revision) {
31 case REVISION_AXBX:
32- printf("Ax/Bx\n");
33+ printf("Beagle Rev Ax/Bx\n");
34 break;
35 case REVISION_CX:
36- printf("C1/C2/C3\n");
37+ printf("Beagle Rev C1/C2/C3\n");
38 MUX_BEAGLE_C();
39 break;
40 case REVISION_C4:
41- printf("C4\n");
42+ printf("Beagle Rev C4\n");
43 MUX_BEAGLE_C();
44 /* Set VAUX2 to 1.8V for EHCI PHY */
45 twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
46 TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
47 TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
48 TWL4030_PM_RECEIVER_DEV_GRP_P1);
49+ setenv("mpurate", "720");
50 break;
51- case REVISION_D:
52- printf("D\n");
53+ case REVISION_XM:
54+ printf("Beagle xM Rev A\n");
55+ MUX_BEAGLE_XM();
56+ /* Set VAUX2 to 1.8V for EHCI PHY */
57+ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
58+ TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
59+ TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
60+ TWL4030_PM_RECEIVER_DEV_GRP_P1);
61+ setenv("mpurate", "720");
62 break;
63 default:
64- printf("unknown 0x%02x\n", beagle_revision);
65+ printf("Beagle unknown 0x%02x\n", beagle_revision);
66 }
67
68 /* Configure GPIOs to output */
69diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
70index d95fd78..fd06d46 100644
71--- a/board/ti/beagle/beagle.h
72+++ b/board/ti/beagle/beagle.h
73@@ -38,7 +38,7 @@ const omap3_sysinfo sysinfo = {
74 #define REVISION_AXBX 0x7
75 #define REVISION_CX 0x6
76 #define REVISION_C4 0x5
77-#define REVISION_D 0x0
78+#define REVISION_XM 0x0
79
80 /*
81 * IEN - Input Enable
82@@ -379,11 +379,37 @@ const omap3_sysinfo sysinfo = {
83 MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
84
85 #define MUX_BEAGLE_C() \
86- MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\
87- MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\
88- MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\
89+ MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\
90+ MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\
91+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\
92 MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN | M0)) /*UART2_CTS*/\
93 MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\
94 MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/
95
96+#define MUX_BEAGLE_XM() \
97+ MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\
98+ MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\
99+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\
100+ MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN | M0)) /*UART2_CTS*/\
101+ MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\
102+ MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/\
103+ MUX_VAL(CP(DSS_DATA0), (IDIS | PTD | DIS | M7)) /*safe_mode*/\
104+ MUX_VAL(CP(DSS_DATA1), (IDIS | PTD | DIS | M7)) /*safe_mode*/\
105+ MUX_VAL(CP(DSS_DATA2), (IDIS | PTD | DIS | M7)) /*safe_mode*/\
106+ MUX_VAL(CP(DSS_DATA3), (IDIS | PTD | DIS | M7)) /*safe_mode*/\
107+ MUX_VAL(CP(DSS_DATA4), (IDIS | PTD | DIS | M7)) /*safe_mode*/\
108+ MUX_VAL(CP(DSS_DATA5), (IDIS | PTD | DIS | M7)) /*safe_mode*/\
109+ MUX_VAL(CP(DSS_DATA18), (IDIS | PTD | DIS | M3)) /*DSS_DATA0*/\
110+ MUX_VAL(CP(DSS_DATA19), (IDIS | PTD | DIS | M3)) /*DSS_DATA1*/\
111+ MUX_VAL(CP(DSS_DATA20), (IDIS | PTD | DIS | M3)) /*DSS_DATA2*/\
112+ MUX_VAL(CP(DSS_DATA21), (IDIS | PTD | DIS | M3)) /*DSS_DATA3*/\
113+ MUX_VAL(CP(DSS_DATA22), (IDIS | PTD | DIS | M3)) /*DSS_DATA4*/\
114+ MUX_VAL(CP(DSS_DATA23), (IDIS | PTD | DIS | M3)) /*DSS_DATA5*/\
115+ MUX_VAL(CP(SYS_BOOT0), (IDIS | PTD | DIS | M3)) /*DSS_DATA18*/\
116+ MUX_VAL(CP(SYS_BOOT1), (IDIS | PTD | DIS | M3)) /*DSS_DATA19*/\
117+ MUX_VAL(CP(SYS_BOOT3), (IDIS | PTD | DIS | M3)) /*DSS_DATA20*/\
118+ MUX_VAL(CP(SYS_BOOT4), (IDIS | PTD | DIS | M3)) /*DSS_DATA21*/\
119+ MUX_VAL(CP(SYS_BOOT5), (IDIS | PTD | DIS | M3)) /*DSS_DATA22*/\
120+ MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS | M3)) /*DSS_DATA23*/
121+
122 #endif
123diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
124index ce347cd..bba36df 100644
125--- a/include/configs/omap3_beagle.h
126+++ b/include/configs/omap3_beagle.h
127@@ -157,6 +157,7 @@
128 /*
129 * Board NAND Info.
130 */
131+#define CONFIG_SYS_NAND_QUIET_TEST 1
132 #define CONFIG_NAND_OMAP_GPMC
133 #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
134 /* to access nand */
135--
1361.6.6.1
137
diff --git a/recipes-bsp/u-boot/u-boot/0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch b/recipes-bsp/u-boot/u-boot/0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch
new file mode 100644
index 00000000..01aedc87
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch
@@ -0,0 +1,53 @@
1From e26b222adeea78777a89e9b0d0aefed67cde7d55 Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Thu, 25 Mar 2010 06:54:47 -0700
4Subject: [PATCH 21/37] OMAP3: Beagle, Overo: remove omapfb.debug=y from default env
5
6---
7 include/configs/omap3_beagle.h | 2 --
8 include/configs/omap3_overo.h | 2 --
9 2 files changed, 0 insertions(+), 4 deletions(-)
10
11diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
12index bba36df..c156cea 100644
13--- a/include/configs/omap3_beagle.h
14+++ b/include/configs/omap3_beagle.h
15@@ -195,7 +195,6 @@
16 "mpurate=${mpurate} " \
17 "vram=${vram} " \
18 "omapfb.mode=dvi:${dvimode} " \
19- "omapfb.debug=y " \
20 "omapdss.def_disp=${defaultdisplay} " \
21 "root=${mmcroot} " \
22 "rootfstype=${mmcrootfstype}\0" \
23@@ -203,7 +202,6 @@
24 "mpurate=${mpurate} " \
25 "vram=${vram} " \
26 "omapfb.mode=dvi:${dvimode} " \
27- "omapfb.debug=y " \
28 "omapdss.def_disp=${defaultdisplay} " \
29 "root=${nandroot} " \
30 "rootfstype=${nandrootfstype}\0" \
31diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
32index fdbeb67..418e2ea 100644
33--- a/include/configs/omap3_overo.h
34+++ b/include/configs/omap3_overo.h
35@@ -164,7 +164,6 @@
36 "mpurate=${mpurate} " \
37 "vram=${vram} " \
38 "omapfb.mode=dvi:${dvimode} " \
39- "omapfb.debug=y " \
40 "omapdss.def_disp=${defaultdisplay} " \
41 "root=${mmcroot} " \
42 "rootfstype=${mmcrootfstype}\0" \
43@@ -172,7 +171,6 @@
44 "mpurate=${mpurate} " \
45 "vram=${vram} " \
46 "omapfb.mode=dvi:${dvimode} " \
47- "omapfb.debug=y " \
48 "omapdss.def_disp=${defaultdisplay} " \
49 "root=${nandroot} " \
50 "rootfstype=${nandrootfstype}\0" \
51--
521.6.6.1
53
diff --git a/recipes-bsp/u-boot/u-boot/0022-OMAP3-beagle-implement-expansionboard-detection-base.patch b/recipes-bsp/u-boot/u-boot/0022-OMAP3-beagle-implement-expansionboard-detection-base.patch
new file mode 100644
index 00000000..91d09abe
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0022-OMAP3-beagle-implement-expansionboard-detection-base.patch
@@ -0,0 +1,157 @@
1From 851d35fab7f93400a1d714524b5e986206d9b0c4 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 25 Mar 2010 16:07:23 +0100
4Subject: [PATCH 22/37] OMAP3: beagle: implement expansionboard detection based on board/overo.c code
5
6---
7 board/ti/beagle/beagle.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++
8 board/ti/beagle/beagle.h | 25 +++++++++++++-
9 2 files changed, 101 insertions(+), 2 deletions(-)
10
11diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
12index d357588..8c5b88c 100644
13--- a/board/ti/beagle/beagle.c
14+++ b/board/ti/beagle/beagle.c
15@@ -38,6 +38,31 @@
16 #include <asm/mach-types.h>
17 #include "beagle.h"
18
19+static struct {
20+ unsigned int device_vendor;
21+ unsigned char revision;
22+ unsigned char content;
23+ unsigned char fab_revision[8];
24+ unsigned char env_var[16];
25+ unsigned char env_setting[64];
26+} expansion_config;
27+
28+#define TWL4030_I2C_BUS 0
29+
30+#define EXPANSION_EEPROM_I2C_BUS 1
31+#define EXPANSION_EEPROM_I2C_ADDRESS 0x50
32+
33+#define TINCANTOOLS_VENDORID 0x0100
34+#define GUMSTIX_VENDORID 0x0200
35+#define SPECIALCOMP_VENDORID 0x0300
36+
37+#define TINCANTOOLS_ZIPPY 0x01000100
38+#define TINCANTOOLS_ZIPPY2 0x02000100
39+#define TINCANTOOLS_TRAINER 0x03000100
40+#define TINCANTOOLS_SHOWDOG 0x04000100
41+
42+#define BEAGLE_NO_EEPROM 0xffffffff
43+
44 static int beagle_revision;
45
46 /*
47@@ -95,6 +120,27 @@ void beagle_identify(void)
48 }
49
50 /*
51+ * Routine: get_expansion_id
52+ * Description: This function checks for expansion board by checking I2C
53+ * bus 2 for the availability of an AT24C01B serial EEPROM.
54+ * returns the device_vendor field from the EEPROM
55+ */
56+unsigned int get_expansion_id(void)
57+{
58+ i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS);
59+
60+ /* return BEAGLE_NO_EEPROM if eeprom doesn't respond */
61+ if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1)
62+ return BEAGLE_NO_EEPROM;
63+
64+ /* read configuration data */
65+ i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config,
66+ sizeof(expansion_config));
67+
68+ return expansion_config.device_vendor;
69+}
70+
71+/*
72 * Routine: misc_init_r
73 * Description: Configure board specific parts
74 */
75@@ -104,6 +150,38 @@ int misc_init_r(void)
76 struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
77
78 beagle_identify();
79+ switch (get_expansion_id()) {
80+ case TINCANTOOLS_ZIPPY:
81+ printf("Recognized Tincantools Zippy expansion board (rev %d %s)\n",
82+ expansion_config.revision, expansion_config.fab_revision);
83+ MUX_TINCANTOOLS_ZIPPY();
84+ break;
85+ case TINCANTOOLS_ZIPPY2:
86+ printf("Recognized Tincantools Zippy2 expansion board (rev %d %s)\n",
87+ expansion_config.revision, expansion_config.fab_revision);
88+ MUX_TINCANTOOLS_ZIPPY();
89+ break;
90+ case TINCANTOOLS_TRAINER:
91+ printf("Recognized Tincantools Trainer expansion board (rev %d %s)\n",
92+ expansion_config.revision, expansion_config.fab_revision);
93+ break;
94+ case TINCANTOOLS_SHOWDOG:
95+ printf("Recognized Tincantools Showdow expansion board (rev %d %s)\n",
96+ expansion_config.revision, expansion_config.fab_revision);
97+ /* Place holder for DSS2 definition for showdog lcd */
98+ setenv("defaultdisplay", "showdoglcd");
99+ break;
100+ case BEAGLE_NO_EEPROM:
101+ printf("No EEPROM on expansion board\n");
102+ break;
103+ default:
104+ printf("Unrecognized expansion board: %x\n", expansion_config.device_vendor);
105+ }
106+
107+ if (expansion_config.content == 1)
108+ setenv(expansion_config.env_var, expansion_config.env_setting);
109+
110+ i2c_set_bus_num(TWL4030_I2C_BUS);
111
112 twl4030_power_init();
113 twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
114diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
115index fd06d46..ec4f831 100644
116--- a/board/ti/beagle/beagle.h
117+++ b/board/ti/beagle/beagle.h
118@@ -260,8 +260,8 @@ const omap3_sysinfo sysinfo = {
119 MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7*/\
120 MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)) /*I2C1_SCL*/\
121 MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)) /*I2C1_SDA*/\
122- MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M4)) /*GPIO_168*/\
123- MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/\
124+ MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M0)) /*I2C2_SCL*/\
125+ MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M0)) /*I2C2_SDA*/\
126 MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN | M0)) /*I2C3_SCL*/\
127 MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN | M0)) /*I2C3_SDA*/\
128 MUX_VAL(CP(I2C4_SCL), (IEN | PTU | EN | M0)) /*I2C4_SCL*/\
129@@ -412,4 +412,25 @@ const omap3_sysinfo sysinfo = {
130 MUX_VAL(CP(SYS_BOOT5), (IDIS | PTD | DIS | M3)) /*DSS_DATA22*/\
131 MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS | M3)) /*DSS_DATA23*/
132
133+#define MUX_TINCANTOOLS_ZIPPY() \
134+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\
135+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\
136+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\
137+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\
138+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\
139+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\
140+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT0*/\
141+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT1*/\
142+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M1)) /*MMC2_DIR_CMD*/\
143+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M1)) /*MMC2_CLKIN*/\
144+ MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | EN | M1)) /*MCSPI4_CLK*/\
145+ MUX_VAL(CP(MCBSP1_FSR), (IEN | PTU | EN | M4)) /*GPIO_157*/\
146+ MUX_VAL(CP(MCBSP1_DX), (IEN | PTD | EN | M1)) /*MCSPI4_SIMO*/\
147+ MUX_VAL(CP(MCBSP1_DR), (IEN | PTD | DIS | M1)) /*MCSPI4_SOMI*/\
148+ MUX_VAL(CP(MCBSP1_FSX), (IEN | PTD | EN | M1)) /*MCSPI4_CS0*/\
149+ MUX_VAL(CP(MCBSP1_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_162*/\
150+ MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\
151+ MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\
152+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\
153+
154 #endif
155--
1561.6.6.1
157
diff --git a/recipes-bsp/u-boot/u-boot/0023-beagleboard-display-message-about-I2C-errors-being-e.patch b/recipes-bsp/u-boot/u-boot/0023-beagleboard-display-message-about-I2C-errors-being-e.patch
new file mode 100644
index 00000000..d7ac7131
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0023-beagleboard-display-message-about-I2C-errors-being-e.patch
@@ -0,0 +1,26 @@
1From 4b07f3a9f045453e5e7b5950e721ed35d9bd308a Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Wed, 31 Mar 2010 14:24:25 +0200
4Subject: [PATCH 23/37] beagleboard: display message about I2C errors being expected when no expansion boards are present
5
6---
7 board/ti/beagle/beagle.c | 3 +++
8 1 files changed, 3 insertions(+), 0 deletions(-)
9
10diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
11index 8c5b88c..c9c9a58 100644
12--- a/board/ti/beagle/beagle.c
13+++ b/board/ti/beagle/beagle.c
14@@ -150,6 +150,9 @@ int misc_init_r(void)
15 struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
16
17 beagle_identify();
18+
19+ printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n");
20+
21 switch (get_expansion_id()) {
22 case TINCANTOOLS_ZIPPY:
23 printf("Recognized Tincantools Zippy expansion board (rev %d %s)\n",
24--
251.6.6.1
26
diff --git a/recipes-bsp/u-boot/u-boot/0024-beagleboard-fix-TCT-expansionboard-IDs.patch b/recipes-bsp/u-boot/u-boot/0024-beagleboard-fix-TCT-expansionboard-IDs.patch
new file mode 100644
index 00000000..dc5e69a2
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0024-beagleboard-fix-TCT-expansionboard-IDs.patch
@@ -0,0 +1,27 @@
1From a4fa85edf5ff6aa6a06f437acc8694dd866f6618 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Sun, 11 Apr 2010 12:14:43 +0200
4Subject: [PATCH 24/37] beagleboard: fix TCT expansionboard IDs
5
6---
7 board/ti/beagle/beagle.c | 4 ++--
8 1 files changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
11index c9c9a58..7cb6d1f 100644
12--- a/board/ti/beagle/beagle.c
13+++ b/board/ti/beagle/beagle.c
14@@ -58,8 +58,8 @@ static struct {
15
16 #define TINCANTOOLS_ZIPPY 0x01000100
17 #define TINCANTOOLS_ZIPPY2 0x02000100
18-#define TINCANTOOLS_TRAINER 0x03000100
19-#define TINCANTOOLS_SHOWDOG 0x04000100
20+#define TINCANTOOLS_TRAINER 0x04000100
21+#define TINCANTOOLS_SHOWDOG 0x03000100
22
23 #define BEAGLE_NO_EEPROM 0xffffffff
24
25--
261.6.6.1
27
diff --git a/recipes-bsp/u-boot/u-boot/0025-Add-DSS-driver-for-OMAP3.patch b/recipes-bsp/u-boot/u-boot/0025-Add-DSS-driver-for-OMAP3.patch
new file mode 100644
index 00000000..da517b25
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0025-Add-DSS-driver-for-OMAP3.patch
@@ -0,0 +1,353 @@
1From 10bffe78f0ef6cb450ecea717dce8d636982bc86 Mon Sep 17 00:00:00 2001
2From: Syed Mohammed Khasim <khasim@ti.com>
3Date: Tue, 12 Jan 2010 23:57:28 +0530
4Subject: [PATCH 25/37] Add DSS driver for OMAP3
5
6Supports dynamic panel configuration
7Supports dynamic tv standard selection
8Adds support for DSS register access through generic APIs
9
10Incorporated DSS register access using structures.
11
12Previous discussions are here
13http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html
14
15Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
16---
17 drivers/video/Makefile | 1 +
18 drivers/video/omap3_dss.c | 130 ++++++++++++++++++++++++++++
19 include/asm-arm/arch-omap3/dss.h | 173 ++++++++++++++++++++++++++++++++++++++
20 3 files changed, 304 insertions(+), 0 deletions(-)
21 create mode 100644 drivers/video/omap3_dss.c
22 create mode 100644 include/asm-arm/arch-omap3/dss.h
23
24diff --git a/drivers/video/Makefile b/drivers/video/Makefile
25index a5e339a..44d7ae8 100644
26--- a/drivers/video/Makefile
27+++ b/drivers/video/Makefile
28@@ -38,6 +38,7 @@ COBJS-$(CONFIG_SED156X) += sed156x.o
29 COBJS-$(CONFIG_VIDEO_SM501) += sm501.o
30 COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o
31 COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o
32+COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o
33 COBJS-y += videomodes.o
34
35 COBJS := $(COBJS-y)
36diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c
37new file mode 100644
38index 0000000..69c705a
39--- /dev/null
40+++ b/drivers/video/omap3_dss.c
41@@ -0,0 +1,130 @@
42+/*
43+ * (C) Copyright 2010
44+ * Texas Instruments, <www.ti.com>
45+ * Syed Mohammed Khasim <khasim@ti.com>
46+ *
47+ * Referred to Linux DSS driver files for OMAP3
48+ *
49+ * See file CREDITS for list of people who contributed to this
50+ * project.
51+ *
52+ * This program is free software; you can redistribute it and/or
53+ * modify it under the terms of the GNU General Public License as
54+ * published by the Free Software Foundation's version 2 of
55+ * the License.
56+ *
57+ * This program is distributed in the hope that it will be useful,
58+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
59+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60+ * GNU General Public License for more details.
61+ *
62+ * You should have received a copy of the GNU General Public License
63+ * along with this program; if not, write to the Free Software
64+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
65+ * MA 02111-1307 USA
66+ */
67+
68+#include <common.h>
69+#include <asm/io.h>
70+#include <asm/arch/dss.h>
71+
72+/*
73+ * Configure VENC for a given Mode (NTSC / PAL)
74+ */
75+void omap3_dss_venc_config(const struct venc_regs *venc_cfg,
76+ u32 height, u32 width)
77+{
78+ struct venc_regs *venc = (struct venc_regs *) OMAP3_VENC_BASE;
79+ struct dss_regs *dss = (struct dss_regs *) OMAP3_DSS_BASE;
80+ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE;
81+
82+ writel(venc_cfg->status, &venc->status);
83+ writel(venc_cfg->f_control, &venc->f_control);
84+ writel(venc_cfg->vidout_ctrl, &venc->vidout_ctrl);
85+ writel(venc_cfg->sync_ctrl, &venc->sync_ctrl);
86+ writel(venc_cfg->llen, &venc->llen);
87+ writel(venc_cfg->flens, &venc->flens);
88+ writel(venc_cfg->hfltr_ctrl, &venc->hfltr_ctrl);
89+ writel(venc_cfg->cc_carr_wss_carr, &venc->cc_carr_wss_carr);
90+ writel(venc_cfg->c_phase, &venc->c_phase);
91+ writel(venc_cfg->gain_u, &venc->gain_u);
92+ writel(venc_cfg->gain_v, &venc->gain_v);
93+ writel(venc_cfg->gain_y, &venc->gain_y);
94+ writel(venc_cfg->black_level, &venc->black_level);
95+ writel(venc_cfg->blank_level, &venc->blank_level);
96+ writel(venc_cfg->x_color, &venc->x_color);
97+ writel(venc_cfg->m_control, &venc->m_control);
98+ writel(venc_cfg->bstamp_wss_data, &venc->bstamp_wss_data);
99+ writel(venc_cfg->s_carr, &venc->s_carr);
100+ writel(venc_cfg->line21, &venc->line21);
101+ writel(venc_cfg->ln_sel, &venc->ln_sel);
102+ writel(venc_cfg->l21__wc_ctl, &venc->l21__wc_ctl);
103+ writel(venc_cfg->htrigger_vtrigger, &venc->htrigger_vtrigger);
104+ writel(venc_cfg->savid__eavid, &venc->savid__eavid);
105+ writel(venc_cfg->flen__fal, &venc->flen__fal);
106+ writel(venc_cfg->lal__phase_reset, &venc->lal__phase_reset);
107+ writel(venc_cfg->hs_int_start_stop_x,
108+ &venc->hs_int_start_stop_x);
109+ writel(venc_cfg->hs_ext_start_stop_x,
110+ &venc->hs_ext_start_stop_x);
111+ writel(venc_cfg->vs_int_start_x, &venc->vs_int_start_x);
112+ writel(venc_cfg->vs_int_stop_x__vs_int_start_y,
113+ &venc->vs_int_stop_x__vs_int_start_y);
114+ writel(venc_cfg->vs_int_stop_y__vs_ext_start_x,
115+ &venc->vs_int_stop_y__vs_ext_start_x);
116+ writel(venc_cfg->vs_ext_stop_x__vs_ext_start_y,
117+ &venc->vs_ext_stop_x__vs_ext_start_y);
118+ writel(venc_cfg->vs_ext_stop_y, &venc->vs_ext_stop_y);
119+ writel(venc_cfg->avid_start_stop_x, &venc->avid_start_stop_x);
120+ writel(venc_cfg->avid_start_stop_y, &venc->avid_start_stop_y);
121+ writel(venc_cfg->fid_int_start_x__fid_int_start_y,
122+ &venc->fid_int_start_x__fid_int_start_y);
123+ writel(venc_cfg->fid_int_offset_y__fid_ext_start_x,
124+ &venc->fid_int_offset_y__fid_ext_start_x);
125+ writel(venc_cfg->fid_ext_start_y__fid_ext_offset_y,
126+ &venc->fid_ext_start_y__fid_ext_offset_y);
127+ writel(venc_cfg->tvdetgp_int_start_stop_x,
128+ &venc->tvdetgp_int_start_stop_x);
129+ writel(venc_cfg->tvdetgp_int_start_stop_y,
130+ &venc->tvdetgp_int_start_stop_y);
131+ writel(venc_cfg->gen_ctrl, &venc->gen_ctrl);
132+ writel(venc_cfg->output_control, &venc->output_control);
133+ writel(venc_cfg->dac_b__dac_c, &venc->dac_b__dac_c);
134+
135+ /* Configure DSS for VENC Settings */
136+ writel(VENC_DSS_CONFIG, &dss->control);
137+
138+ /* Configure height and width for Digital out */
139+ writel(((height << DIG_LPP_SHIFT) | width), &dispc->size_dig);
140+}
141+
142+/*
143+ * Configure Panel Specific Parameters
144+ */
145+void omap3_dss_panel_config(const struct panel_config *panel_cfg)
146+{
147+ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE;
148+
149+ writel(panel_cfg->timing_h, &dispc->timing_h);
150+ writel(panel_cfg->timing_v, &dispc->timing_v);
151+ writel(panel_cfg->pol_freq, &dispc->pol_freq);
152+ writel(panel_cfg->divisor, &dispc->divisor);
153+ writel(panel_cfg->lcd_size, &dispc->size_lcd);
154+ writel((panel_cfg->load_mode << FRAME_MODE_SHIFT), &dispc->config);
155+ writel(((panel_cfg->panel_type << TFTSTN_SHIFT) |
156+ (panel_cfg->data_lines << DATALINES_SHIFT)), &dispc->control);
157+ writel(panel_cfg->panel_color, &dispc->default_color0);
158+}
159+
160+/*
161+ * Enable LCD and DIGITAL OUT in DSS
162+ */
163+void omap3_dss_enable(void)
164+{
165+ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE;
166+ u32 l = 0;
167+
168+ l = readl(&dispc->control);
169+ l |= DISPC_ENABLE;
170+ writel(l, &dispc->control);
171+}
172diff --git a/include/asm-arm/arch-omap3/dss.h b/include/asm-arm/arch-omap3/dss.h
173new file mode 100644
174index 0000000..e5e3b0d
175--- /dev/null
176+++ b/include/asm-arm/arch-omap3/dss.h
177@@ -0,0 +1,173 @@
178+/*
179+ * (C) Copyright 2010
180+ * Texas Instruments, <www.ti.com>
181+ * Syed Mohammed Khasim <khasim@ti.com>
182+ *
183+ * Referred to Linux DSS driver files for OMAP3
184+ *
185+ * See file CREDITS for list of people who contributed to this
186+ * project.
187+ *
188+ * This program is free software; you can redistribute it and/or
189+ * modify it under the terms of the GNU General Public License as
190+ * published by the Free Software Foundation's version 2 of
191+ * the License.
192+ *
193+ * This program is distributed in the hope that it will be useful,
194+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
195+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
196+ * GNU General Public License for more details.
197+ *
198+ * You should have received a copy of the GNU General Public License
199+ * along with this program; if not, write to the Free Software
200+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
201+ * MA 02111-1307 USA
202+ */
203+
204+#ifndef DSS_H
205+#define DSS_H
206+
207+/*
208+ * DSS Base Registers
209+ */
210+#define OMAP3_DSS_BASE 0x48050040
211+#define OMAP3_DISPC_BASE 0x48050440
212+#define OMAP3_VENC_BASE 0x48050C00
213+
214+/* DSS Registers */
215+struct dss_regs {
216+ u32 control; /* 0x40 */
217+ u32 sdi_control; /* 0x44 */
218+ u32 pll_control; /* 0x48 */
219+};
220+
221+/* DISPC Registers */
222+struct dispc_regs {
223+ u32 control; /* 0x40 */
224+ u32 config; /* 0x44 */
225+ u32 reserve_2; /* 0x48 */
226+ u32 default_color0; /* 0x4C */
227+ u32 default_color1; /* 0x50 */
228+ u32 trans_color0; /* 0x54 */
229+ u32 trans_color1; /* 0x58 */
230+ u32 line_status; /* 0x5C */
231+ u32 line_number; /* 0x60 */
232+ u32 timing_h; /* 0x64 */
233+ u32 timing_v; /* 0x68 */
234+ u32 pol_freq; /* 0x6C */
235+ u32 divisor; /* 0x70 */
236+ u32 global_alpha; /* 0x74 */
237+ u32 size_dig; /* 0x78 */
238+ u32 size_lcd; /* 0x7C */
239+};
240+
241+/* VENC Registers */
242+struct venc_regs {
243+ u32 rev_id; /* 0x00 */
244+ u32 status; /* 0x04 */
245+ u32 f_control; /* 0x08 */
246+ u32 reserve_1; /* 0x0C */
247+ u32 vidout_ctrl; /* 0x10 */
248+ u32 sync_ctrl; /* 0x14 */
249+ u32 reserve_2; /* 0x18 */
250+ u32 llen; /* 0x1C */
251+ u32 flens; /* 0x20 */
252+ u32 hfltr_ctrl; /* 0x24 */
253+ u32 cc_carr_wss_carr; /* 0x28 */
254+ u32 c_phase; /* 0x2C */
255+ u32 gain_u; /* 0x30 */
256+ u32 gain_v; /* 0x34 */
257+ u32 gain_y; /* 0x38 */
258+ u32 black_level; /* 0x3C */
259+ u32 blank_level; /* 0x40 */
260+ u32 x_color; /* 0x44 */
261+ u32 m_control; /* 0x48 */
262+ u32 bstamp_wss_data; /* 0x4C */
263+ u32 s_carr; /* 0x50 */
264+ u32 line21; /* 0x54 */
265+ u32 ln_sel; /* 0x58 */
266+ u32 l21__wc_ctl; /* 0x5C */
267+ u32 htrigger_vtrigger; /* 0x60 */
268+ u32 savid__eavid; /* 0x64 */
269+ u32 flen__fal; /* 0x68 */
270+ u32 lal__phase_reset; /* 0x6C */
271+ u32 hs_int_start_stop_x; /* 0x70 */
272+ u32 hs_ext_start_stop_x; /* 0x74 */
273+ u32 vs_int_start_x; /* 0x78 */
274+ u32 vs_int_stop_x__vs_int_start_y; /* 0x7C */
275+ u32 vs_int_stop_y__vs_ext_start_x; /* 0x80 */
276+ u32 vs_ext_stop_x__vs_ext_start_y; /* 0x84 */
277+ u32 vs_ext_stop_y; /* 0x88 */
278+ u32 reserve_3; /* 0x8C */
279+ u32 avid_start_stop_x; /* 0x90 */
280+ u32 avid_start_stop_y; /* 0x94 */
281+ u32 reserve_4; /* 0x98 */
282+ u32 reserve_5; /* 0x9C */
283+ u32 fid_int_start_x__fid_int_start_y; /* 0xA0 */
284+ u32 fid_int_offset_y__fid_ext_start_x; /* 0xA4 */
285+ u32 fid_ext_start_y__fid_ext_offset_y; /* 0xA8 */
286+ u32 reserve_6; /* 0xAC */
287+ u32 tvdetgp_int_start_stop_x; /* 0xB0 */
288+ u32 tvdetgp_int_start_stop_y; /* 0xB4 */
289+ u32 gen_ctrl; /* 0xB8 */
290+ u32 reserve_7; /* 0xBC */
291+ u32 reserve_8; /* 0xC0 */
292+ u32 output_control; /* 0xC4 */
293+ u32 dac_b__dac_c; /* 0xC8 */
294+ u32 height_width; /* 0xCC */
295+};
296+
297+/* Few Register Offsets */
298+#define FRAME_MODE_SHIFT 1
299+#define TFTSTN_SHIFT 3
300+#define DATALINES_SHIFT 8
301+
302+/* Enabling Display controller */
303+#define LCD_ENABLE 1
304+#define DIG_ENABLE (1 << 1)
305+#define GO_LCD (1 << 5)
306+#define GO_DIG (1 << 6)
307+#define GP_OUT0 (1 << 15)
308+#define GP_OUT1 (1 << 16)
309+
310+#define DISPC_ENABLE (LCD_ENABLE | \
311+ DIG_ENABLE | \
312+ GO_LCD | \
313+ GO_DIG | \
314+ GP_OUT0| \
315+ GP_OUT1)
316+
317+/* Configure VENC DSS Params */
318+#define VENC_CLK_ENABLE (1 << 3)
319+#define DAC_DEMEN (1 << 4)
320+#define DAC_POWERDN (1 << 5)
321+#define VENC_OUT_SEL (1 << 6)
322+#define DIG_LPP_SHIFT 16
323+#define VENC_DSS_CONFIG (VENC_CLK_ENABLE | \
324+ DAC_DEMEN | \
325+ DAC_POWERDN | \
326+ VENC_OUT_SEL)
327+/*
328+ * Panel Configuration
329+ */
330+struct panel_config {
331+ u32 timing_h;
332+ u32 timing_v;
333+ u32 pol_freq;
334+ u32 divisor;
335+ u32 lcd_size;
336+ u32 panel_type;
337+ u32 data_lines;
338+ u32 load_mode;
339+ u32 panel_color;
340+};
341+
342+/*
343+ * Generic DSS Functions
344+ */
345+void omap3_dss_venc_config(const struct venc_regs *venc_cfg,
346+ u32 height, u32 width);
347+void omap3_dss_panel_config(const struct panel_config *panel_cfg);
348+void omap3_dss_enable(void);
349+
350+#endif /* DSS_H */
351--
3521.6.6.1
353
diff --git a/recipes-bsp/u-boot/u-boot/0026-Enable-DSS-driver-for-Beagle.patch b/recipes-bsp/u-boot/u-boot/0026-Enable-DSS-driver-for-Beagle.patch
new file mode 100644
index 00000000..7e7bea83
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0026-Enable-DSS-driver-for-Beagle.patch
@@ -0,0 +1,158 @@
1From a8adb8e29aba9d2c83731839063f1381fce3906c Mon Sep 17 00:00:00 2001
2From: Syed Mohammed Khasim <khasim@ti.com>
3Date: Sun, 11 Apr 2010 17:44:39 +0200
4Subject: [PATCH 26/37] Enable DSS driver for Beagle
5
6Configures DSS to display color bar on Svideo
7Configures DSS to display background color on DVID
8
9Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
10---
11 board/ti/beagle/beagle.c | 12 ++++++
12 board/ti/beagle/beagle.h | 75 ++++++++++++++++++++++++++++++++++++++++
13 include/configs/omap3_beagle.h | 1 +
14 3 files changed, 88 insertions(+), 0 deletions(-)
15
16diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
17index 7cb6d1f..eb57b5a 100644
18--- a/board/ti/beagle/beagle.c
19+++ b/board/ti/beagle/beagle.c
20@@ -141,6 +141,16 @@ unsigned int get_expansion_id(void)
21 }
22
23 /*
24+ * Configure DSS to display background color on DVID
25+ * Configure VENC to display color bar on S-Video
26+ */
27+void display_init(void)
28+{
29+ omap3_dss_venc_config(&venc_config_std_tv, VENC_HEIGHT, VENC_WIDTH);
30+ omap3_dss_panel_config(&dvid_cfg);
31+}
32+
33+/*
34 * Routine: misc_init_r
35 * Description: Configure board specific parts
36 */
37@@ -188,6 +198,7 @@ int misc_init_r(void)
38
39 twl4030_power_init();
40 twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
41+ display_init();
42
43 switch (beagle_revision) {
44 case REVISION_AXBX:
45@@ -233,6 +244,7 @@ int misc_init_r(void)
46 GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);
47
48 dieid_num_r();
49+ omap3_dss_enable();
50
51 return 0;
52 }
53diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
54index ec4f831..69f9398 100644
55--- a/board/ti/beagle/beagle.h
56+++ b/board/ti/beagle/beagle.h
57@@ -23,6 +23,8 @@
58 #ifndef _BEAGLE_H_
59 #define _BEAGLE_H_
60
61+#include <asm/arch/dss.h>
62+
63 const omap3_sysinfo sysinfo = {
64 DDR_STACKED,
65 "OMAP3 Beagle board",
66@@ -433,4 +435,77 @@ const omap3_sysinfo sysinfo = {
67 MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\
68 MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\
69
70+/*
71+ * Display Configuration
72+ */
73+
74+#define DVI_BEAGLE_ORANGE_COL 0x00FF8000
75+#define VENC_HEIGHT 0x00ef
76+#define VENC_WIDTH 0x027f
77+
78+/*
79+ * Configure VENC in DSS for Beagle to generate Color Bar
80+ *
81+ * Kindly refer to OMAP TRM for definition of these values.
82+ */
83+static const struct venc_regs venc_config_std_tv = {
84+ .status = 0x0000001B,
85+ .f_control = 0x00000040,
86+ .vidout_ctrl = 0x00000000,
87+ .sync_ctrl = 0x00008000,
88+ .llen = 0x00008359,
89+ .flens = 0x0000020C,
90+ .hfltr_ctrl = 0x00000000,
91+ .cc_carr_wss_carr = 0x043F2631,
92+ .c_phase = 0x00000024,
93+ .gain_u = 0x00000130,
94+ .gain_v = 0x00000198,
95+ .gain_y = 0x000001C0,
96+ .black_level = 0x0000006A,
97+ .blank_level = 0x0000005C,
98+ .x_color = 0x00000000,
99+ .m_control = 0x00000001,
100+ .bstamp_wss_data = 0x0000003F,
101+ .s_carr = 0x21F07C1F,
102+ .line21 = 0x00000000,
103+ .ln_sel = 0x00000015,
104+ .l21__wc_ctl = 0x00001400,
105+ .htrigger_vtrigger = 0x00000000,
106+ .savid__eavid = 0x069300F4,
107+ .flen__fal = 0x0016020C,
108+ .lal__phase_reset = 0x00060107,
109+ .hs_int_start_stop_x = 0x008D034E,
110+ .hs_ext_start_stop_x = 0x000F0359,
111+ .vs_int_start_x = 0x01A00000,
112+ .vs_int_stop_x__vs_int_start_y = 0x020501A0,
113+ .vs_int_stop_y__vs_ext_start_x = 0x01AC0024,
114+ .vs_ext_stop_x__vs_ext_start_y = 0x020D01AC,
115+ .vs_ext_stop_y = 0x00000006,
116+ .avid_start_stop_x = 0x03480079,
117+ .avid_start_stop_y = 0x02040024,
118+ .fid_int_start_x__fid_int_start_y = 0x0001008A,
119+ .fid_int_offset_y__fid_ext_start_x = 0x01AC0106,
120+ .fid_ext_start_y__fid_ext_offset_y = 0x01060006,
121+ .tvdetgp_int_start_stop_x = 0x00140001,
122+ .tvdetgp_int_start_stop_y = 0x00010001,
123+ .gen_ctrl = 0x00FF0000,
124+ .output_control = 0x0000000D,
125+ .dac_b__dac_c = 0x00000000
126+};
127+
128+/*
129+ * Configure Timings for DVI D
130+ */
131+static const struct panel_config dvid_cfg = {
132+ .timing_h = 0x0ff03f31, /* Horizantal timing */
133+ .timing_v = 0x01400504, /* Vertical timing */
134+ .pol_freq = 0x00007028, /* Pol Freq */
135+ .divisor = 0x00010006, /* 72Mhz Pixel Clock */
136+ .lcd_size = 0x02ff03ff, /* 1024x768 */
137+ .panel_type = 0x01, /* TFT */
138+ .data_lines = 0x03, /* 24 Bit RGB */
139+ .load_mode = 0x02, /* Frame Mode */
140+ .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */
141+};
142+
143 #endif
144diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
145index c156cea..7bcbe9b 100644
146--- a/include/configs/omap3_beagle.h
147+++ b/include/configs/omap3_beagle.h
148@@ -131,6 +131,7 @@
149 #define CONFIG_CMD_I2C /* I2C serial bus support */
150 #define CONFIG_CMD_MMC /* MMC support */
151 #define CONFIG_CMD_NAND /* NAND support */
152+#define CONFIG_VIDEO_OMAP3 /* DSS Support */
153
154 #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
155 #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
156--
1571.6.6.1
158
diff --git a/recipes-bsp/u-boot/u-boot/0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch b/recipes-bsp/u-boot/u-boot/0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch
new file mode 100644
index 00000000..90d71a8a
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch
@@ -0,0 +1,24 @@
1From 85d4ffbc3a12b28cae00fc88d4adba7df4907fe4 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 13 Apr 2010 22:04:07 +0200
4Subject: [PATCH 27/37] beagleboardXM: don't set mpurate on xM in bootargs
5
6---
7 board/ti/beagle/beagle.c | 1 -
8 1 files changed, 0 insertions(+), 1 deletions(-)
9
10diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
11index eb57b5a..974a72c 100644
12--- a/board/ti/beagle/beagle.c
13+++ b/board/ti/beagle/beagle.c
14@@ -226,7 +226,6 @@ int misc_init_r(void)
15 TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
16 TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
17 TWL4030_PM_RECEIVER_DEV_GRP_P1);
18- setenv("mpurate", "720");
19 break;
20 default:
21 printf("Beagle unknown 0x%02x\n", beagle_revision);
22--
231.6.6.1
24
diff --git a/recipes-bsp/u-boot/u-boot/0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch b/recipes-bsp/u-boot/u-boot/0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch
new file mode 100644
index 00000000..d2c6abba
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch
@@ -0,0 +1,112 @@
1From c18bda32fdb048ea38b7ff579f365ea8858053d7 Mon Sep 17 00:00:00 2001
2From: Mans Rullgard <mans@mansr.com>
3Date: Wed, 14 Apr 2010 12:08:00 +0100
4Subject: [PATCH 28/37] OMAP3: fix and clean up L2 cache enable/disable functions
5
6On OMAP34xx ES1.0, the L2 enable bit can only be set in secure mode,
7so an SMC call to the ROM monitor is required. On later versions,
8and on newer devices, this bit is banked and we can set it directly.
9
10The code checked only the ES revision of the chip, and hence incorrectly
11used the ROM call on ES1.0 versions of other devices.
12
13This patch adds a check for chip family as well as revision, and also
14removes some code duplication between the enable and disable functions.
15
16Signed-off-by: Mans Rullgard <mans@mansr.com>
17---
18 cpu/arm_cortexa8/omap3/cache.S | 74 +++++++++++-----------------------------
19 1 files changed, 20 insertions(+), 54 deletions(-)
20
21diff --git a/cpu/arm_cortexa8/omap3/cache.S b/cpu/arm_cortexa8/omap3/cache.S
22index 0f63815..16afb5d 100644
23--- a/cpu/arm_cortexa8/omap3/cache.S
24+++ b/cpu/arm_cortexa8/omap3/cache.S
25@@ -128,64 +128,30 @@ finished_inval:
26
27 ldmfd r13!, {r0 - r5, r7, r9 - r12, pc}
28
29-
30-l2_cache_enable:
31- push {r0, r1, r2, lr}
32- @ ES2 onwards we can disable/enable L2 ourselves
33+l2_cache_set:
34+ push {r4-r6, lr}
35+ mov r5, r0
36 bl get_cpu_rev
37- cmp r0, #CPU_3XX_ES20
38- blt l2_cache_disable_EARLIER_THAN_ES2
39- mrc 15, 0, r3, cr1, cr0, 1
40- orr r3, r3, #2
41- mcr 15, 0, r3, cr1, cr0, 1
42- b l2_cache_enable_END
43-l2_cache_enable_EARLIER_THAN_ES2:
44- @ Save r0, r12 and restore them after usage
45- mov r3, ip
46- str r3, [sp, #4]
47- mov r3, r0
48- @
49+ mov r4, r0
50+ bl get_cpu_family
51+ @ ES2 onwards we can disable/enable L2 ourselves
52+ cmp r0, #CPU_OMAP34XX
53+ cmpeq r4, #CPU_3XX_ES10
54+ mrc 15, 0, r0, cr1, cr0, 1
55+ bic r0, r0, #2
56+ orr r0, r0, r5, lsl #1
57+ mcreq 15, 0, r0, cr1, cr0, 1
58 @ GP Device ROM code API usage here
59 @ r12 = AUXCR Write function and r0 value
60- @
61 mov ip, #3
62- mrc 15, 0, r0, cr1, cr0, 1
63- orr r0, r0, #2
64- @ SMI instruction to call ROM Code API
65- .word 0xe1600070
66- mov r0, r3
67- mov ip, r3
68- str r3, [sp, #4]
69-l2_cache_enable_END:
70- pop {r1, r2, r3, pc}
71+ @ SMCNE instruction to call ROM Code API
72+ .word 0x11600070
73+ pop {r4-r6, pc}
74
75+l2_cache_enable:
76+ mov r0, #1
77+ b l2_cache_set
78
79 l2_cache_disable:
80- push {r0, r1, r2, lr}
81- @ ES2 onwards we can disable/enable L2 ourselves
82- bl get_cpu_rev
83- cmp r0, #CPU_3XX_ES20
84- blt l2_cache_disable_EARLIER_THAN_ES2
85- mrc 15, 0, r3, cr1, cr0, 1
86- bic r3, r3, #2
87- mcr 15, 0, r3, cr1, cr0, 1
88- b l2_cache_disable_END
89-l2_cache_disable_EARLIER_THAN_ES2:
90- @ Save r0, r12 and restore them after usage
91- mov r3, ip
92- str r3, [sp, #4]
93- mov r3, r0
94- @
95- @ GP Device ROM code API usage here
96- @ r12 = AUXCR Write function and r0 value
97- @
98- mov ip, #3
99- mrc 15, 0, r0, cr1, cr0, 1
100- bic r0, r0, #2
101- @ SMI instruction to call ROM Code API
102- .word 0xe1600070
103- mov r0, r3
104- mov ip, r3
105- str r3, [sp, #4]
106-l2_cache_disable_END:
107- pop {r1, r2, r3, pc}
108+ mov r0, #0
109+ b l2_cache_set
110--
1111.6.6.1
112
diff --git a/recipes-bsp/u-boot/u-boot/0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch b/recipes-bsp/u-boot/u-boot/0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch
new file mode 100644
index 00000000..e1ffdca7
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch
@@ -0,0 +1,99 @@
1From 6ddb5d4e28801907af7be39e47d502fd5c8e73e1 Mon Sep 17 00:00:00 2001
2From: Mans Rullgard <mans@mansr.com>
3Date: Wed, 14 Apr 2010 16:49:57 +0100
4Subject: [PATCH 29/37] OMAP3: convert setup_auxcr() to pure asm
5
6This function consists entirely of inline asm statements, so writing
7it directly in a .S file is simpler. Additionally, the inline asm is
8not safe as is, since registers are not guaranteed to be preserved
9between asm() statements.
10
11Signed-off-by: Mans Rullgard <mans@mansr.com>
12---
13 cpu/arm_cortexa8/omap3/board.c | 35 -----------------------------------
14 cpu/arm_cortexa8/omap3/cache.S | 19 +++++++++++++++++++
15 2 files changed, 19 insertions(+), 35 deletions(-)
16
17diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c
18index 0126152..7f49199 100644
19--- a/cpu/arm_cortexa8/omap3/board.c
20+++ b/cpu/arm_cortexa8/omap3/board.c
21@@ -122,41 +122,6 @@ void secureworld_exit()
22 }
23
24 /******************************************************************************
25- * Routine: setup_auxcr()
26- * Description: Write to AuxCR desired value using SMI.
27- * general use.
28- *****************************************************************************/
29-void setup_auxcr()
30-{
31- unsigned long i;
32- volatile unsigned int j;
33- /* Save r0, r12 and restore them after usage */
34- __asm__ __volatile__("mov %0, r12":"=r"(j));
35- __asm__ __volatile__("mov %0, r0":"=r"(i));
36-
37- /*
38- * GP Device ROM code API usage here
39- * r12 = AUXCR Write function and r0 value
40- */
41- __asm__ __volatile__("mov r12, #0x3");
42- __asm__ __volatile__("mrc p15, 0, r0, c1, c0, 1");
43- /* Enabling ASA */
44- __asm__ __volatile__("orr r0, r0, #0x10");
45- /* Enable L1NEON */
46- __asm__ __volatile__("orr r0, r0, #1 << 5");
47- /* SMI instruction to call ROM Code API */
48- __asm__ __volatile__(".word 0xE1600070");
49- /* Set PLD_FWD bit in L2AUXCR (Cortex-A8 erratum 725233 workaround) */
50- __asm__ __volatile__("mov r12, #0x2");
51- __asm__ __volatile__("mrc p15, 1, r0, c9, c0, 2");
52- __asm__ __volatile__("orr r0, r0, #1 << 27");
53- /* SMI instruction to call ROM Code API */
54- __asm__ __volatile__(".word 0xE1600070");
55- __asm__ __volatile__("mov r0, %0":"=r"(i));
56- __asm__ __volatile__("mov r12, %0":"=r"(j));
57-}
58-
59-/******************************************************************************
60 * Routine: try_unlock_sram()
61 * Description: If chip is GP/EMU(special) type, unlock the SRAM for
62 * general use.
63diff --git a/cpu/arm_cortexa8/omap3/cache.S b/cpu/arm_cortexa8/omap3/cache.S
64index 16afb5d..61e6946 100644
65--- a/cpu/arm_cortexa8/omap3/cache.S
66+++ b/cpu/arm_cortexa8/omap3/cache.S
67@@ -43,6 +43,7 @@
68 .global invalidate_dcache
69 .global l2_cache_enable
70 .global l2_cache_disable
71+.global setup_auxcr
72
73 /*
74 * invalidate_dcache()
75@@ -155,3 +156,21 @@ l2_cache_enable:
76 l2_cache_disable:
77 mov r0, #0
78 b l2_cache_set
79+
80+/******************************************************************************
81+ * Routine: setup_auxcr()
82+ * Description: Write to AuxCR desired value using SMI.
83+ * general use.
84+ *****************************************************************************/
85+setup_auxcr:
86+ mov r12, #0x3
87+ mrc p15, 0, r0, c1, c0, 1
88+ orr r0, r0, #0x10 @ Enable ASA
89+ orr r0, r0, #1 << 5 @ Enable L1NEON
90+ .word 0xE1600070 @ SMC
91+ mov r12, #0x2
92+ mrc p15, 1, r0, c9, c0, 2
93+ @ Set PLD_FWD bit in L2AUXCR (Cortex-A8 erratum 725233 workaround)
94+ orr r0, r0, #1 << 27
95+ .word 0xE1600070 @ SMC
96+ bx lr
97--
981.6.6.1
99
diff --git a/recipes-bsp/u-boot/u-boot/0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch b/recipes-bsp/u-boot/u-boot/0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch
new file mode 100644
index 00000000..af669ec0
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch
@@ -0,0 +1,46 @@
1From 4e7bc59affc2a71de40259330e27e62181993968 Mon Sep 17 00:00:00 2001
2From: Mans Rullgard <mans@mansr.com>
3Date: Wed, 14 Apr 2010 17:10:28 +0100
4Subject: [PATCH 30/37] OMAP3: apply Cortex-A8 errata workarounds only on affected revisions
5
6The workarounds for errata 621766 and 725233 should only be applied
7on affected Cortex-A8 revisions. Recent chips use r3px cores where
8these have been fixed.
9
10Signed-off-by: Mans Rullgard <mans@mansr.com>
11---
12 cpu/arm_cortexa8/omap3/cache.S | 13 ++++++++++---
13 1 files changed, 10 insertions(+), 3 deletions(-)
14
15diff --git a/cpu/arm_cortexa8/omap3/cache.S b/cpu/arm_cortexa8/omap3/cache.S
16index 61e6946..932e4eb 100644
17--- a/cpu/arm_cortexa8/omap3/cache.S
18+++ b/cpu/arm_cortexa8/omap3/cache.S
19@@ -163,14 +163,21 @@ l2_cache_disable:
20 * general use.
21 *****************************************************************************/
22 setup_auxcr:
23+ mrc p15, 0, r0, c0, c0, 0 @ read main ID register
24+ and r2, r0, #0x00f00000 @ variant
25+ and r3, r0, #0x0000000f @ revision
26+ orr r1, r3, r2, lsr #20-4 @ combine variant and revision
27 mov r12, #0x3
28 mrc p15, 0, r0, c1, c0, 1
29 orr r0, r0, #0x10 @ Enable ASA
30- orr r0, r0, #1 << 5 @ Enable L1NEON
31+ @ Enable L1NEON on pre-r2p1 (erratum 621766 workaround)
32+ cmp r1, #0x21
33+ orrlt r0, r0, #1 << 5
34 .word 0xE1600070 @ SMC
35 mov r12, #0x2
36 mrc p15, 1, r0, c9, c0, 2
37- @ Set PLD_FWD bit in L2AUXCR (Cortex-A8 erratum 725233 workaround)
38- orr r0, r0, #1 << 27
39+ @ Set PLD_FWD bit in L2AUXCR on pre-r2p1 (erratum 725233 workaround)
40+ cmp r1, #0x21
41+ orrlt r0, r0, #1 << 27
42 .word 0xE1600070 @ SMC
43 bx lr
44--
451.6.6.1
46
diff --git a/recipes-bsp/u-boot/u-boot/0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch b/recipes-bsp/u-boot/u-boot/0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch
new file mode 100644
index 00000000..9ea19123
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch
@@ -0,0 +1,61 @@
1From bbfb38ccd1e2bb19a1eb698bd37cd1ab50c87b37 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 23 Apr 2010 10:50:43 +0200
4Subject: [PATCH 31/37] OMAP3: beagle: add more expansionboards, based on http://www.elinux.org/BeagleBoardPinMux#Vendor_and_Device_IDs
5
6---
7 board/ti/beagle/beagle.c | 8 ++++++++
8 board/ti/beagle/beagle.h | 6 ++++++
9 2 files changed, 14 insertions(+), 0 deletions(-)
10
11diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
12index 974a72c..0544178 100644
13--- a/board/ti/beagle/beagle.c
14+++ b/board/ti/beagle/beagle.c
15@@ -55,11 +55,15 @@ static struct {
16 #define TINCANTOOLS_VENDORID 0x0100
17 #define GUMSTIX_VENDORID 0x0200
18 #define SPECIALCOMP_VENDORID 0x0300
19+#define HYR_VENDORID 0x0400
20+#define MENTOREL_VENDORID 0x0500
21+#define KBADC_VENDORID 0x0600
22
23 #define TINCANTOOLS_ZIPPY 0x01000100
24 #define TINCANTOOLS_ZIPPY2 0x02000100
25 #define TINCANTOOLS_TRAINER 0x04000100
26 #define TINCANTOOLS_SHOWDOG 0x03000100
27+#define KBADC_BEAGLEFPGA 0x01000600
28
29 #define BEAGLE_NO_EEPROM 0xffffffff
30
31@@ -184,6 +188,10 @@ int misc_init_r(void)
32 /* Place holder for DSS2 definition for showdog lcd */
33 setenv("defaultdisplay", "showdoglcd");
34 break;
35+ case KBADC_BEAGLEFPGA:
36+ printf("Recognized KBADC Beagle FPGA board\n");
37+ MUX_KBADC_BEAGLEFPGA();
38+ break;
39 case BEAGLE_NO_EEPROM:
40 printf("No EEPROM on expansion board\n");
41 break;
42diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
43index 69f9398..90a0ebf 100644
44--- a/board/ti/beagle/beagle.h
45+++ b/board/ti/beagle/beagle.h
46@@ -435,6 +435,12 @@ const omap3_sysinfo sysinfo = {
47 MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\
48 MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\
49
50+#define MUX_KBADC_BEAGLEFPGA() \
51+ MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | DIS | M1)) /*MCSPI4_CLK*/\
52+ MUX_VAL(CP(MCBSP1_DX), (IDIS | PTU | DIS | M1)) /*MCSPI4_SIMO*/\
53+ MUX_VAL(CP(MCBSP1_DR), (IEN | PTU | EN | M1)) /*MCSPI4_SOMI*/\
54+ MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTU | DIS | M1)) /*MCSPI4_CS0*/\
55+
56 /*
57 * Display Configuration
58 */
59--
601.6.6.1
61
diff --git a/recipes-bsp/u-boot/u-boot/0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch b/recipes-bsp/u-boot/u-boot/0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch
new file mode 100644
index 00000000..c99d3d98
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch
@@ -0,0 +1,29 @@
1From ae05ca488390671516bd4ed021eb43901fee740f Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 27 Apr 2010 13:44:16 +0200
4Subject: [PATCH 32/37] OMAP3: beagle: set mpurate to 600 for revB and revC1-3
5
6---
7 board/ti/beagle/beagle.c | 2 ++
8 1 files changed, 2 insertions(+), 0 deletions(-)
9
10diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
11index 0544178..6778499 100644
12--- a/board/ti/beagle/beagle.c
13+++ b/board/ti/beagle/beagle.c
14@@ -211,10 +211,12 @@ int misc_init_r(void)
15 switch (beagle_revision) {
16 case REVISION_AXBX:
17 printf("Beagle Rev Ax/Bx\n");
18+ setenv("mpurate", "600");
19 break;
20 case REVISION_CX:
21 printf("Beagle Rev C1/C2/C3\n");
22 MUX_BEAGLE_C();
23+ setenv("mpurate", "600");
24 break;
25 case REVISION_C4:
26 printf("Beagle Rev C4\n");
27--
281.6.6.1
29
diff --git a/recipes-bsp/u-boot/u-boot/0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch b/recipes-bsp/u-boot/u-boot/0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch
new file mode 100644
index 00000000..a7b2c017
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch
@@ -0,0 +1,25 @@
1From caf18bc716d77d7bf2c75bc58ffbcbf09ae79f2b Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 27 Apr 2010 13:45:28 +0200
4Subject: [PATCH 33/37] OMAP3: beagle: prettify expansionboard message a bit
5
6---
7 board/ti/beagle/beagle.c | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
11index 6778499..58fb7c3 100644
12--- a/board/ti/beagle/beagle.c
13+++ b/board/ti/beagle/beagle.c
14@@ -165,7 +165,7 @@ int misc_init_r(void)
15
16 beagle_identify();
17
18- printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n");
19+ printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n\n");
20
21 switch (get_expansion_id()) {
22 case TINCANTOOLS_ZIPPY:
23--
241.6.6.1
25
diff --git a/recipes-bsp/u-boot/u-boot/0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch b/recipes-bsp/u-boot/u-boot/0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch
new file mode 100644
index 00000000..5caa6f0f
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch
@@ -0,0 +1,53 @@
1From 8580a3eafe3351e3c0f1ca3d0bc959bbeec40e28 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 27 Apr 2010 18:25:57 +0200
4Subject: [PATCH 34/37] OMAP3: beagle: add pinmux for Tincantools Trainer expansionboard
5
6---
7 board/ti/beagle/beagle.c | 2 ++
8 board/ti/beagle/beagle.h | 16 +++++++++++++++-
9 2 files changed, 17 insertions(+), 1 deletions(-)
10
11diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
12index 58fb7c3..39c53f2 100644
13--- a/board/ti/beagle/beagle.c
14+++ b/board/ti/beagle/beagle.c
15@@ -181,6 +181,8 @@ int misc_init_r(void)
16 case TINCANTOOLS_TRAINER:
17 printf("Recognized Tincantools Trainer expansion board (rev %d %s)\n",
18 expansion_config.revision, expansion_config.fab_revision);
19+ MUX_TINCANTOOLS_ZIPPY();
20+ MUX_TINCANTOOLS_TRAINER();
21 break;
22 case TINCANTOOLS_SHOWDOG:
23 printf("Recognized Tincantools Showdow expansion board (rev %d %s)\n",
24diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
25index 90a0ebf..7774855 100644
26--- a/board/ti/beagle/beagle.h
27+++ b/board/ti/beagle/beagle.h
28@@ -433,7 +433,21 @@ const omap3_sysinfo sysinfo = {
29 MUX_VAL(CP(MCBSP1_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_162*/\
30 MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\
31 MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\
32- MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\
33+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/
34+
35+#define MUX_TINCANTOOLS_TRAINER() \
36+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\
37+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M4)) /*GPIO_131*/\
38+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M4)) /*GPIO_132*/\
39+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133*/\
40+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M4)) /*GPIO_134*/\
41+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\
42+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\
43+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\
44+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\
45+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\
46+ MUX_VAL(CP(MCBSP3_DX), (IEN | PTU | EN | M4)) /*GPIO_140*/\
47+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTU | EN | M4)) /*GPIO_141*/
48
49 #define MUX_KBADC_BEAGLEFPGA() \
50 MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | DIS | M1)) /*MCSPI4_CLK*/\
51--
521.6.6.1
53
diff --git a/recipes-bsp/u-boot/u-boot/0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch b/recipes-bsp/u-boot/u-boot/0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch
new file mode 100644
index 00000000..5c02fcb6
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch
@@ -0,0 +1,24 @@
1From c45e93aef4d54b262f0d8e1ecf6b111f5e1c2a4c Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 30 Apr 2010 13:25:41 +0200
4Subject: [PATCH 35/37] OMAP3: Beagle: set mpurate to 1000 for xM
5
6---
7 board/ti/beagle/beagle.c | 1 +
8 1 files changed, 1 insertions(+), 0 deletions(-)
9
10diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
11index 39c53f2..9300984 100644
12--- a/board/ti/beagle/beagle.c
13+++ b/board/ti/beagle/beagle.c
14@@ -238,6 +238,7 @@ int misc_init_r(void)
15 TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
16 TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
17 TWL4030_PM_RECEIVER_DEV_GRP_P1);
18+ setenv("mpurate", "1000");
19 break;
20 default:
21 printf("Beagle unknown 0x%02x\n", beagle_revision);
22--
231.6.6.1
24
diff --git a/recipes-bsp/u-boot/u-boot/0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch b/recipes-bsp/u-boot/u-boot/0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch
new file mode 100644
index 00000000..5f89f1ae
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch
@@ -0,0 +1,34 @@
1From 39f15722db5595411ec085e36b7fd7657415a554 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 30 Apr 2010 13:26:01 +0200
4Subject: [PATCH 36/37] OMAP3: Beagle: decrease bootdelay to 3, use VGA for default resolution
5
6---
7 include/configs/omap3_beagle.h | 4 ++--
8 1 files changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
11index 7bcbe9b..93a6a5a 100644
12--- a/include/configs/omap3_beagle.h
13+++ b/include/configs/omap3_beagle.h
14@@ -178,7 +178,7 @@
15 /* partition */
16
17 /* Environment information */
18-#define CONFIG_BOOTDELAY 10
19+#define CONFIG_BOOTDELAY 3
20
21 #define CONFIG_EXTRA_ENV_SETTINGS \
22 "loadaddr=0x82000000\0" \
23@@ -186,7 +186,7 @@
24 "console=ttyS2,115200n8\0" \
25 "mpurate=500\0" \
26 "vram=12M\0" \
27- "dvimode=1024x768MR-16@60\0" \
28+ "dvimode=640x480MR-16@60\0" \
29 "defaultdisplay=dvi\0" \
30 "mmcroot=/dev/mmcblk0p2 rw\0" \
31 "mmcrootfstype=ext3 rootwait\0" \
32--
331.6.6.1
34
diff --git a/recipes-bsp/u-boot/u-boot/0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch b/recipes-bsp/u-boot/u-boot/0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch
new file mode 100644
index 00000000..2ee844b9
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch
@@ -0,0 +1,87 @@
1From 8ad472139f7b8b7c59c0192f3e2f50a20beadf59 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 3 May 2010 10:17:41 +0200
4Subject: [PATCH 37/37] OMAP3: beagle: pass expansionboard name in bootargs
5
6This makes it possible to do in-kernel fixups for expansionboards like reclaiming GPIOs
7---
8 board/ti/beagle/beagle.c | 7 +++++++
9 include/configs/omap3_beagle.h | 3 +++
10 2 files changed, 10 insertions(+), 0 deletions(-)
11
12diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
13index 9300984..556e995 100644
14--- a/board/ti/beagle/beagle.c
15+++ b/board/ti/beagle/beagle.c
16@@ -172,33 +172,40 @@ int misc_init_r(void)
17 printf("Recognized Tincantools Zippy expansion board (rev %d %s)\n",
18 expansion_config.revision, expansion_config.fab_revision);
19 MUX_TINCANTOOLS_ZIPPY();
20+ setenv("buddy", "zippy");
21 break;
22 case TINCANTOOLS_ZIPPY2:
23 printf("Recognized Tincantools Zippy2 expansion board (rev %d %s)\n",
24 expansion_config.revision, expansion_config.fab_revision);
25 MUX_TINCANTOOLS_ZIPPY();
26+ setenv("buddy", "zippy2");
27 break;
28 case TINCANTOOLS_TRAINER:
29 printf("Recognized Tincantools Trainer expansion board (rev %d %s)\n",
30 expansion_config.revision, expansion_config.fab_revision);
31 MUX_TINCANTOOLS_ZIPPY();
32 MUX_TINCANTOOLS_TRAINER();
33+ setenv("buddy", "trainer");
34 break;
35 case TINCANTOOLS_SHOWDOG:
36 printf("Recognized Tincantools Showdow expansion board (rev %d %s)\n",
37 expansion_config.revision, expansion_config.fab_revision);
38 /* Place holder for DSS2 definition for showdog lcd */
39 setenv("defaultdisplay", "showdoglcd");
40+ setenv("buddy", "showdog");
41 break;
42 case KBADC_BEAGLEFPGA:
43 printf("Recognized KBADC Beagle FPGA board\n");
44 MUX_KBADC_BEAGLEFPGA();
45+ setenv("buddy", "beaglefpga");
46 break;
47 case BEAGLE_NO_EEPROM:
48 printf("No EEPROM on expansion board\n");
49+ setenv("buddy", "none");
50 break;
51 default:
52 printf("Unrecognized expansion board: %x\n", expansion_config.device_vendor);
53+ setenv("buddy", "unknown");
54 }
55
56 if (expansion_config.content == 1)
57diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
58index 93a6a5a..affabf1 100644
59--- a/include/configs/omap3_beagle.h
60+++ b/include/configs/omap3_beagle.h
61@@ -185,6 +185,7 @@
62 "usbtty=cdc_acm\0" \
63 "console=ttyS2,115200n8\0" \
64 "mpurate=500\0" \
65+ "buddy=none\0" \
66 "vram=12M\0" \
67 "dvimode=640x480MR-16@60\0" \
68 "defaultdisplay=dvi\0" \
69@@ -194,6 +195,7 @@
70 "nandrootfstype=jffs2\0" \
71 "mmcargs=setenv bootargs console=${console} " \
72 "mpurate=${mpurate} " \
73+ "buddy=${buddy} "\
74 "vram=${vram} " \
75 "omapfb.mode=dvi:${dvimode} " \
76 "omapdss.def_disp=${defaultdisplay} " \
77@@ -201,6 +203,7 @@
78 "rootfstype=${mmcrootfstype}\0" \
79 "nandargs=setenv bootargs console=${console} " \
80 "mpurate=${mpurate} " \
81+ "buddy=${buddy} "\
82 "vram=${vram} " \
83 "omapfb.mode=dvi:${dvimode} " \
84 "omapdss.def_disp=${defaultdisplay} " \
85--
861.6.6.1
87
diff --git a/recipes-bsp/u-boot/u-boot/0038-Added-configurations-for-xM-Rev-A-board.patch b/recipes-bsp/u-boot/u-boot/0038-Added-configurations-for-xM-Rev-A-board.patch
new file mode 100644
index 00000000..4cfcfe15
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0038-Added-configurations-for-xM-Rev-A-board.patch
@@ -0,0 +1,29 @@
1From 9a5d5518c3d3844cc49cf2d9ef5aeabca1e87c30 Mon Sep 17 00:00:00 2001
2From: Jason Kridner <jkridner@beagleboard.org>
3Date: Wed, 5 May 2010 14:53:49 -0500
4Subject: [PATCH 38/38] Added configurations for xM Rev A board
5
6This defaults to "on" condition for USB and DVI. May want to revise for
7power savings.
8---
9 board/ti/beagle/beagle.h | 4 ++++
10 1 files changed, 4 insertions(+), 0 deletions(-)
11
12diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
13index 7774855..cb7fd1c 100644
14--- a/board/ti/beagle/beagle.h
15+++ b/board/ti/beagle/beagle.h
16@@ -389,6 +389,10 @@ const omap3_sysinfo sysinfo = {
17 MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/
18
19 #define MUX_BEAGLE_XM() \
20+ MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | EN | M4)) /*GPIO_56 - USB HUB reset*/\
21+ MUX_VAL(CP(GPMC_WAIT0), (IDIS | PTU | EN | M4)) /*GPIO_63 - P8 USB HUB nreset*/\
22+ MUX_VAL(CP(MMC1_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_129 - DVI enable*/\
23+ MUX_VAL(CP(HDQ_SIO), (IDIS | PTU | EN | M4)) /*GPIO_170 - P8 DVI enable*/\
24 MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\
25 MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\
26 MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\
27--
281.6.6.1
29
diff --git a/recipes-bsp/u-boot/u-boot/0038-BeagleBoard-Added-LED-driver.patch b/recipes-bsp/u-boot/u-boot/0038-BeagleBoard-Added-LED-driver.patch
new file mode 100644
index 00000000..74ee4e31
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0038-BeagleBoard-Added-LED-driver.patch
@@ -0,0 +1,164 @@
1From 157b125b905b6dc69164d3f43eeb5e40d3744648 Mon Sep 17 00:00:00 2001
2From: Jason Kridner <jkridner@beagleboard.org>
3Date: Thu, 20 May 2010 06:14:01 -0500
4Subject: [PATCH] BeagleBoard: Added LED driver
5
6Added LED driver using status_led. USR0 is set to monitor the boot
7status. USR1 is set to be the green LED.
8(cherry picked from commit 048b526fd7cc0c642f27c674b3e235321c880b66)
9(cherry picked from commit 21c574d9e20f86ab757f5efdd9146e6607f2faba)
10
11Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
12---
13 board/ti/beagle/Makefile | 4 ++-
14 board/ti/beagle/beagle.c | 8 ++++
15 board/ti/beagle/led.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++
16 3 files changed, 102 insertions(+), 1 deletions(-)
17 create mode 100644 board/ti/beagle/led.c
18
19diff --git a/board/ti/beagle/Makefile b/board/ti/beagle/Makefile
20index f797112..4cc675c 100644
21--- a/board/ti/beagle/Makefile
22+++ b/board/ti/beagle/Makefile
23@@ -25,8 +25,10 @@ include $(TOPDIR)/config.mk
24
25 LIB = $(obj)lib$(BOARD).a
26
27-COBJS := beagle.o
28+COBJS-y := $(BOARD).o
29+COBJS-$(CONFIG_STATUS_LED) += led.o
30
31+COBJS := $(sort $(COBJS-y))
32 SRCS := $(COBJS:.o=.c)
33 OBJS := $(addprefix $(obj),$(COBJS))
34
35diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
36index 556e995..d21b9c8 100644
37--- a/board/ti/beagle/beagle.c
38+++ b/board/ti/beagle/beagle.c
39@@ -30,6 +30,9 @@
40 * MA 02111-1307 USA
41 */
42 #include <common.h>
43+#ifdef CONFIG_STATUS_LED
44+#include <status_led.h>
45+#endif
46 #include <twl4030.h>
47 #include <asm/io.h>
48 #include <asm/arch/mux.h>
49@@ -83,6 +86,10 @@ int board_init(void)
50 /* boot param addr */
51 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
52
53+#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
54+ status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
55+#endif
56+
57 return 0;
58 }
59
60@@ -278,3 +285,4 @@ void set_muxconf_regs(void)
61 {
62 MUX_BEAGLE();
63 }
64+
65diff --git a/board/ti/beagle/led.c b/board/ti/beagle/led.c
66new file mode 100644
67index 0000000..df26552
68--- /dev/null
69+++ b/board/ti/beagle/led.c
70@@ -0,0 +1,91 @@
71+/*
72+ * Copyright (c) 2010 Texas Instruments, Inc.
73+ * Jason Kridner <jkridner@beagleboard.org>
74+ *
75+ * This program is free software; you can redistribute it and/or
76+ * modify it under the terms of the GNU General Public License as
77+ * published by the Free Software Foundation; either version 2 of
78+ * the License, or (at your option) any later version.
79+ *
80+ * This program is distributed in the hope that it will be useful,
81+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
82+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83+ * GNU General Public License for more details.
84+ *
85+ * You should have received a copy of the GNU General Public License
86+ * along with this program; if not, write to the Free Software
87+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
88+ * MA 02111-1307 USA
89+ */
90+#include <common.h>
91+#include <status_led.h>
92+#include <asm/arch/cpu.h>
93+#include <asm/io.h>
94+#include <asm/arch/sys_proto.h>
95+#include <asm/arch/gpio.h>
96+
97+static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
98+
99+/* GPIO pins for the LEDs */
100+#define BEAGLE_LED_USR0 149
101+#define BEAGLE_LED_USR1 150
102+
103+#ifdef STATUS_LED_GREEN
104+void green_LED_off (void)
105+{
106+ __led_set (STATUS_LED_GREEN, 0);
107+}
108+
109+void green_LED_on (void)
110+{
111+ __led_set (STATUS_LED_GREEN, 1);
112+}
113+#endif
114+
115+void __led_init (led_id_t mask, int state)
116+{
117+ __led_set (mask, state);
118+}
119+
120+void __led_toggle (led_id_t mask)
121+{
122+#ifdef STATUS_LED_BIT
123+ if (STATUS_LED_BIT & mask) {
124+ if (STATUS_LED_ON == saved_state[0])
125+ __led_set(STATUS_LED_BIT, 0);
126+ else
127+ __led_set(STATUS_LED_BIT, 1);
128+ }
129+#endif
130+#ifdef STATUS_LED_BIT1
131+ if (STATUS_LED_BIT1 & mask) {
132+ if (STATUS_LED_ON == saved_state[1])
133+ __led_set(STATUS_LED_BIT1, 0);
134+ else
135+ __led_set(STATUS_LED_BIT1, 1);
136+ }
137+#endif
138+}
139+
140+void __led_set (led_id_t mask, int state)
141+{
142+#ifdef STATUS_LED_BIT
143+ if (STATUS_LED_BIT & mask) {
144+ if (!omap_request_gpio(BEAGLE_LED_USR0)) {
145+ omap_set_gpio_direction(BEAGLE_LED_USR0, 0);
146+ omap_set_gpio_dataout(BEAGLE_LED_USR0, state);
147+ }
148+ saved_state[0] = state;
149+ }
150+#endif
151+#ifdef STATUS_LED_BIT1
152+ if (STATUS_LED_BIT1 & mask) {
153+ if (!omap_request_gpio(BEAGLE_LED_USR1)) {
154+ omap_set_gpio_direction(BEAGLE_LED_USR1, 0);
155+ omap_set_gpio_dataout(BEAGLE_LED_USR1, state);
156+ }
157+ saved_state[1] = state;
158+ }
159+#endif
160+}
161+
162--
1631.5.6.4
164
diff --git a/recipes-bsp/u-boot/u-boot/0039-Add-led-command.patch b/recipes-bsp/u-boot/u-boot/0039-Add-led-command.patch
new file mode 100644
index 00000000..6adbe2f7
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0039-Add-led-command.patch
@@ -0,0 +1,256 @@
1From 609524ecd54526b3f3c7d52cc43a3c9795970f6b Mon Sep 17 00:00:00 2001
2From: Jason Kridner <jkridner@beagleboard.org>
3Date: Thu, 20 May 2010 05:41:26 -0500
4Subject: [PATCH] Add 'led' command
5
6This patch allows any board implementing the coloured LED API
7to control the LEDs from the console.
8
9led [green | yellow | red | all ] [ on | off ]
10
11or
12
13led [ 1 | 2 | 3 | all ] [ on | off ]
14
15Adds configuration item CONFIG_CMD_LED enabling the command.
16
17Partially based on patch from Ulf Samuelsson:
18http://www.mail-archive.com/u-boot@lists.denx.de/msg09593.html.
19(cherry picked from commit aaf47f8d6af81393b7d3275d69b5dbdf07a3d6fb)
20(cherry picked from commit 3d314bf59a48c2ee93d06d50b81f109af6a6c1ec)
21
22Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
23---
24 common/Makefile | 1 +
25 common/cmd_led.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
26 2 files changed, 208 insertions(+), 0 deletions(-)
27 create mode 100644 common/cmd_led.c
28
29diff --git a/common/Makefile b/common/Makefile
30index dbf7a05..1d717ca 100644
31--- a/common/Makefile
32+++ b/common/Makefile
33@@ -106,6 +106,7 @@ COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o
34 COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
35 COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
36 COBJS-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o
37+COBJS-$(CONFIG_CMD_LED) += cmd_led.o
38 COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
39 COBJS-y += cmd_load.o
40 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
41diff --git a/common/cmd_led.c b/common/cmd_led.c
42new file mode 100644
43index 0000000..3b7b534
44--- /dev/null
45+++ b/common/cmd_led.c
46@@ -0,0 +1,207 @@
47+/*
48+ * (C) Copyright 2010
49+ * Jason Kridner <jkridner@beagleboard.org>
50+ *
51+ * Based on cmd_led.c patch from:
52+ * http://www.mail-archive.com/u-boot@lists.denx.de/msg06873.html
53+ * (C) Copyright 2008
54+ * Ulf Samuelsson <ulf.samuelsson@atmel.com>
55+ *
56+ * See file CREDITS for list of people who contributed to this
57+ * project.
58+ *
59+ * This program is free software; you can redistribute it and/or
60+ * modify it under the terms of the GNU General Public License as
61+ * published by the Free Software Foundation; either version 2 of
62+ * the License, or (at your option) any later version.
63+ *
64+ * This program is distributed in the hope that it will be useful,
65+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
66+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67+ * GNU General Public License for more details.
68+ *
69+ * You should have received a copy of the GNU General Public License
70+ * along with this program; if not, write to the Free Software
71+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
72+ * MA 02111-1307 USA
73+ */
74+
75+/*
76+ * This file provides a shell like 'test' function to return
77+ * true/false from an integer or string compare of two memory
78+ * locations or a location and a scalar/literal.
79+ * A few parts were lifted from bash 'test' command
80+ */
81+
82+#include <common.h>
83+#include <config.h>
84+#include <command.h>
85+#include <status_led.h>
86+
87+int do_led ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
88+{
89+#ifdef CONFIG_BOARD_SPECIFIC_LED
90+ led_id_t mask;
91+#endif
92+ int state;
93+
94+ /* Validate arguments */
95+ if ((argc != 3)){
96+ printf("Usage:\n%s\n", cmdtp->usage);
97+ return 1;
98+ }
99+
100+ if (strcmp(argv[2], "off") == 0) {
101+ state = 0;
102+ } else if (strcmp(argv[2], "on") == 0) {
103+ state = 1;
104+ } else {
105+ printf ("Usage:\n%s\n", cmdtp->usage);
106+ return 1;
107+ }
108+
109+#if defined(STATUS_LED_BIT) && defined(CONFIG_BOARD_SPECIFIC_LED)
110+ if (strcmp(argv[1], "0") == 0) {
111+ mask = STATUS_LED_BIT;
112+ __led_set(mask, state);
113+ }
114+ else
115+#endif
116+#if defined(STATUS_LED_BIT1) && defined(CONFIG_BOARD_SPECIFIC_LED)
117+ if (strcmp(argv[1], "1") == 0) {
118+ mask = STATUS_LED_BIT1;
119+ __led_set(mask, state);
120+ }
121+ else
122+#endif
123+#if defined(STATUS_LED_BIT2) && defined(CONFIG_BOARD_SPECIFIC_LED)
124+ if (strcmp(argv[1], "2") == 0) {
125+ mask = STATUS_LED_BIT2;
126+ __led_set(mask, state);
127+ }
128+ else
129+#endif
130+#if defined(STATUS_LED_BIT3) && defined(CONFIG_BOARD_SPECIFIC_LED)
131+ if (strcmp(argv[1], "3") == 0) {
132+ mask = STATUS_LED_BIT3;
133+ __led_set(mask, state);
134+ }
135+ else
136+#endif
137+#ifdef STATUS_LED_RED
138+ if (strcmp(argv[1], "red") == 0) {
139+ if (state == 0)
140+ red_LED_off();
141+ else
142+ red_LED_on();
143+ }
144+ else
145+#endif
146+#ifdef STATUS_LED_GREEN
147+ if (strcmp(argv[1], "green") == 0) {
148+ if (state == 0)
149+ green_LED_off();
150+ else
151+ green_LED_on();
152+ }
153+ else
154+#endif
155+#ifdef STATUS_LED_YELLOW
156+ if (strcmp(argv[1], "yellow") == 0) {
157+ if (state == 0)
158+ yellow_LED_off();
159+ else
160+ yellow_LED_on();
161+ }
162+ else
163+#endif
164+#ifdef STATUS_LED_BLUE
165+ if (strcmp(argv[1], "blue") == 0) {
166+ if (state == 0)
167+ blue_LED_off();
168+ else
169+ blue_LED_on();
170+ }
171+ else
172+#endif
173+ if (strcmp(argv[1], "all") == 0) {
174+ mask = 0
175+#if defined(STATUS_LED_BIT) && defined(CONFIG_BOARD_SPECIFIC_LED)
176+ | STATUS_LED_BIT
177+#endif
178+#if defined(STATUS_LED_BIT1) && defined(CONFIG_BOARD_SPECIFIC_LED)
179+ | STATUS_LED_BIT1
180+#endif
181+#if defined(STATUS_LED_BIT2) && defined(CONFIG_BOARD_SPECIFIC_LED)
182+ | STATUS_LED_BIT2
183+#endif
184+#if defined(STATUS_LED_BIT3) && defined(CONFIG_BOARD_SPECIFIC_LED)
185+ | STATUS_LED_BIT3
186+#endif
187+ ;
188+#ifdef CONFIG_BOARD_SPECIFIC_LED
189+ __led_set(mask, state);
190+#endif
191+#ifdef STATUS_LED_RED
192+ if (state == 0)
193+ red_LED_off();
194+ else
195+ red_LED_on();
196+#endif
197+#ifdef STATUS_LED_GREEN
198+ if (state == 0)
199+ green_LED_off();
200+ else
201+ green_LED_on();
202+#endif
203+#ifdef STATUS_LED_YELLOW
204+ if (state == 0)
205+ yellow_LED_off();
206+ else
207+ yellow_LED_on();
208+#endif
209+#ifdef STATUS_LED_BLUE
210+ if (state == 0)
211+ blue_LED_off();
212+ else
213+ blue_LED_on();
214+#endif
215+ } else {
216+ printf ("Usage:\n%s\n", cmdtp->usage);
217+ return 1;
218+ }
219+
220+ return 0;
221+}
222+
223+U_BOOT_CMD(
224+ led, 3, 1, do_led,
225+ "led\t- ["
226+#if defined(STATUS_LED_BIT) && defined(CONFIG_BOARD_SPECIFIC_LED)
227+ "0|"
228+#endif
229+#if defined(STATUS_LED_BIT1) && defined(CONFIG_BOARD_SPECIFIC_LED)
230+ "1|"
231+#endif
232+#if defined(STATUS_LED_BIT2) && defined(CONFIG_BOARD_SPECIFIC_LED)
233+ "2|"
234+#endif
235+#if defined(STATUS_LED_BIT3) && defined(CONFIG_BOARD_SPECIFIC_LED)
236+ "3|"
237+#endif
238+#ifdef STATUS_LED_GREEN
239+ "green|"
240+#endif
241+#ifdef STATUS_LED_YELLOW
242+ "yellow|"
243+#endif
244+#ifdef STATUS_LED_RED
245+ "red|"
246+#endif
247+#ifdef STATUS_LED_BLUE
248+ "blue|"
249+#endif
250+ "all] [on|off]\n",
251+ "led [led_name] [on|off] sets or clears led(s)\n"
252+);
253+
254--
2551.5.6.4
256
diff --git a/recipes-bsp/u-boot/u-boot/0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch b/recipes-bsp/u-boot/u-boot/0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch
new file mode 100644
index 00000000..9b64327d
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch
@@ -0,0 +1,42 @@
1From c48581ecc0b060e4c1b5fa973d053e81e18f676b Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 3 Jun 2010 19:50:57 +0200
4Subject: [PATCH 39/39] OMAP3: beagle: setenv beaglerev for AxBx/Cx/xMA for better bootscripts
5
6---
7 board/ti/beagle/beagle.c | 4 ++++
8 1 files changed, 4 insertions(+), 0 deletions(-)
9
10diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
11index 556e995..cdba3dd 100644
12--- a/board/ti/beagle/beagle.c
13+++ b/board/ti/beagle/beagle.c
14@@ -221,14 +221,17 @@ int misc_init_r(void)
15 case REVISION_AXBX:
16 printf("Beagle Rev Ax/Bx\n");
17 setenv("mpurate", "600");
18+ setenv("beaglerev", "AxBx");
19 break;
20 case REVISION_CX:
21 printf("Beagle Rev C1/C2/C3\n");
22 MUX_BEAGLE_C();
23 setenv("mpurate", "600");
24+ setenv("beaglerev", "Cx");
25 break;
26 case REVISION_C4:
27 printf("Beagle Rev C4\n");
28+ setenv("beaglerev", "Cx");
29 MUX_BEAGLE_C();
30 /* Set VAUX2 to 1.8V for EHCI PHY */
31 twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
32@@ -239,6 +242,7 @@ int misc_init_r(void)
33 break;
34 case REVISION_XM:
35 printf("Beagle xM Rev A\n");
36+ setenv("beaglerev", "xMA");
37 MUX_BEAGLE_XM();
38 /* Set VAUX2 to 1.8V for EHCI PHY */
39 twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
40--
411.6.6.1
42
diff --git a/recipes-bsp/u-boot/u-boot/0041-BeagleBoard-Enabled-LEDs.patch b/recipes-bsp/u-boot/u-boot/0041-BeagleBoard-Enabled-LEDs.patch
new file mode 100644
index 00000000..8b046193
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0041-BeagleBoard-Enabled-LEDs.patch
@@ -0,0 +1,47 @@
1From 9d3e56ba351348b6329c488a981d3e2d8f848164 Mon Sep 17 00:00:00 2001
2From: Jason Kridner <jkridner@beagleboard.org>
3Date: Wed, 19 May 2010 05:14:43 -0500
4Subject: [PATCH] BeagleBoard: Enabled LEDs
5
6Added LED driver using status_led. USR0 is set to monitor the boot
7status. USR1 is set to be the GREEN LED.
8
9Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
10---
11 include/configs/omap3_beagle.h | 13 +++++++++++++
12 1 files changed, 13 insertions(+), 0 deletions(-)
13
14diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
15index c2fc6ba..eaa8779 100644
16--- a/include/configs/omap3_beagle.h
17+++ b/include/configs/omap3_beagle.h
18@@ -98,6 +98,18 @@
19 #define CONFIG_SYS_MMC_SET_DEV 1
20 #define CONFIG_DOS_PARTITION 1
21
22+/* Status LED */
23+#define CONFIG_STATUS_LED 1
24+#define CONFIG_BOARD_SPECIFIC_LED 1
25+#define STATUS_LED_BIT 0x01
26+#define STATUS_LED_STATE STATUS_LED_ON
27+#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
28+#define STATUS_LED_BIT1 0x02
29+#define STATUS_LED_STATE1 STATUS_LED_ON
30+#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
31+#define STATUS_LED_BOOT STATUS_LED_BIT
32+#define STATUS_LED_GREEN STATUS_LED_BIT1
33+
34 /* DDR - I use Micron DDR */
35 #define CONFIG_OMAP3_MICRON_DDR 1
36
37@@ -132,6 +144,7 @@
38 #define CONFIG_CMD_I2C /* I2C serial bus support */
39 #define CONFIG_CMD_MMC /* MMC support */
40 #define CONFIG_CMD_NAND /* NAND support */
41+#define CONFIG_CMD_LED /* LED support */
42 #define CONFIG_VIDEO_OMAP3 /* DSS Support */
43
44 #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
45--
461.5.6.4
47
diff --git a/recipes-bsp/u-boot/u-boot/0042-BeagleBoard-New-command-for-status-of-USER-button.patch b/recipes-bsp/u-boot/u-boot/0042-BeagleBoard-New-command-for-status-of-USER-button.patch
new file mode 100644
index 00000000..9a704a80
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0042-BeagleBoard-New-command-for-status-of-USER-button.patch
@@ -0,0 +1,97 @@
1From c053723cc5a73781a4954e6c93d280436623e3d6 Mon Sep 17 00:00:00 2001
2From: Jason Kridner <jkridner@beagleboard.org>
3Date: Wed, 21 Jul 2010 07:41:25 -0500
4Subject: [PATCH] BeagleBoard: Added userbutton command
5
6Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072
7 Author: Greg Turner <gregturner@ti.com>
8 Date: Tue May 25 09:19:06 2010 -0500
9
10 New u-boot command for status of USER button on BeagleBoard-xM
11
12 Modified bootcmd to check the staus at boot time and set
13 filename of the boot script.
14
15* Moved to a BeagleBoard specific file.
16* Removed changes to default boot command from adding userbutton
17 command.
18* Made to handle pre-xM boards.
19* Flipped polarity of the return value to avoid confusion. Success (0)
20 is when the button is pressed. Failure (1) is when the button is NOT
21 pressed.
22---
23 board/ti/beagle/beagle.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++
24 1 files changed, 54 insertions(+), 0 deletions(-)
25
26diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
27index a6a4961..66df719 100644
28--- a/board/ti/beagle/beagle.c
29+++ b/board/ti/beagle/beagle.c
30@@ -40,6 +40,7 @@
31 #include <asm/arch/gpio.h>
32 #include <asm/mach-types.h>
33 #include "beagle.h"
34+#include <command.h>
35
36 static struct {
37 unsigned int device_vendor;
38@@ -290,3 +291,56 @@ void set_muxconf_regs(void)
39 MUX_BEAGLE();
40 }
41
42+/*
43+ * This command returns the status of the user button on beagle xM
44+ * Input - none
45+ * Returns - 1 if button is held down
46+ * 0 if button is not held down
47+ */
48+int do_userbutton (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
49+{
50+ int button = 0;
51+ int gpio;
52+
53+ /*
54+ * pass address parameter as argv[0] (aka command name),
55+ * and all remaining args
56+ */
57+ switch (beagle_revision) {
58+ case REVISION_AXBX:
59+ case REVISION_CX:
60+ case REVISION_C4:
61+ gpio = 7;
62+ break;
63+ case REVISION_XM:
64+ default:
65+ gpio = 4;
66+ break;
67+ }
68+ omap_request_gpio(gpio);
69+ omap_set_gpio_direction(gpio, 1);
70+ printf("The user button is currently ");
71+ if(omap_get_gpio_datain(gpio))
72+ {
73+ button = 1;
74+ printf("PRESSED.\n");
75+ }
76+ else
77+ {
78+ button = 0;
79+ printf("NOT pressed.\n");
80+ }
81+
82+ omap_free_gpio(gpio);
83+
84+ return !button;
85+}
86+
87+/* -------------------------------------------------------------------- */
88+
89+U_BOOT_CMD(
90+ userbutton, CONFIG_SYS_MAXARGS, 1, do_userbutton,
91+ "Return the status of the BeagleBoard USER button",
92+ ""
93+);
94+
95--
961.6.1
97
diff --git a/recipes-bsp/u-boot/u-boot/0043-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch b/recipes-bsp/u-boot/u-boot/0043-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch
new file mode 100644
index 00000000..fa6bb48e
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0043-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch
@@ -0,0 +1,35 @@
1From d912a6d2d546faf55d07e91816b47096879137cc Mon Sep 17 00:00:00 2001
2From: Steven Kipisz <s-kipisz2@ti.com>
3Date: Fri, 4 Jun 2010 10:31:04 -0500
4Subject: [PATCH] BeagleBoard: Add CONFIG_SYS_MEMTEST_SCRATCH
5
6Add CONFIG_SYS_MEMTEST_SCRATCH to point to a scratch memory area.
7
8Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
9---
10 include/configs/omap3_beagle.h | 9 +++++----
11 1 files changed, 5 insertions(+), 4 deletions(-)
12
13diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
14index 555b350..0c6fce6 100644
15--- a/include/configs/omap3_beagle.h
16+++ b/include/configs/omap3_beagle.h
17@@ -297,10 +297,11 @@
18 /* Boot Argument Buffer Size */
19 #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
20
21-#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */
22- /* works on */
23-#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
24- 0x01F00000) /* 31MB */
25+#define CONFIG_SYS_ALT_MEMTEST 1
26+#define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest */
27+ /* defaults */
28+#define CONFIG_SYS_MEMTEST_END (0x87FFFFFF) /* 128MB */
29+#define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */
30
31 #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */
32 /* load address */
33--
341.5.6.4
35
diff --git a/recipes-bsp/u-boot/u-boot/0044-Beagleboard-Adjust-boot.patch b/recipes-bsp/u-boot/u-boot/0044-Beagleboard-Adjust-boot.patch
new file mode 100644
index 00000000..19b4ab79
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0044-Beagleboard-Adjust-boot.patch
@@ -0,0 +1,115 @@
1From c8d52ff17d71be0c632f20092d96e9530088c786 Mon Sep 17 00:00:00 2001
2From: Jason Kridner <jkridner@beagleboard.org>
3Date: Wed, 21 Jul 2010 08:47:59 -0500
4Subject: [PATCH] BeagleBoard: Adjust boot command on USER button
5
6When the USER button is pressed, the default boot command will attempt
7to load user.scr. If that fails, it will try to load a ramdisk image.
8
9This version also sets the rootfstype and assumes that the userbutton
10command returns success (0) when the button is pressed. It also really
11attempts to load the user.scr file.
12---
13 include/configs/omap3_beagle.h | 51 ++++++++++++++++++++++++++++++++++-----
14 1 files changed, 44 insertions(+), 7 deletions(-)
15
16diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
17index f372de2..6d1166f 100644
18--- a/include/configs/omap3_beagle.h
19+++ b/include/configs/omap3_beagle.h
20@@ -195,9 +195,12 @@
21 #define CONFIG_BOOTDELAY 3
22
23 #define CONFIG_EXTRA_ENV_SETTINGS \
24- "loadaddr=0x82000000\0" \
25+ "loadaddr=0x80200000\0" \
26+ "rdaddr=0x81600000\0" \
27 "usbtty=cdc_acm\0" \
28 "console=ttyS2,115200n8\0" \
29+ "optargs=\0" \
30+ "bootscr=boot.scr\0" \
31 "mpurate=500\0" \
32 "buddy=none\0" \
33 "vram=12M\0" \
34@@ -208,7 +211,10 @@
35 "mmcrootfstype=ext3 rootwait\0" \
36 "nandroot=/dev/mtdblock4 rw\0" \
37 "nandrootfstype=jffs2\0" \
38+ "ramroot=/dev/ram0 rw\0" \
39+ "ramrootfstype=ext2\0" \
40 "mmcargs=setenv bootargs console=${console} " \
41+ "${optargs} " \
42 "mpurate=${mpurate} " \
43 "buddy=${buddy} "\
44 "vram=${vram} " \
45@@ -217,6 +223,7 @@
46 "root=${mmcroot} " \
47 "rootfstype=${mmcrootfstype}\0" \
48 "nandargs=setenv bootargs console=${console} " \
49+ "${optargs} " \
50 "mpurate=${mpurate} " \
51 "buddy=${buddy} "\
52 "vram=${vram} " \
53@@ -224,7 +231,18 @@
54 "omapdss.def_disp=${defaultdisplay} " \
55 "root=${nandroot} " \
56 "rootfstype=${nandrootfstype}\0" \
57- "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
58+ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \
59+ "ramargs=setenv bootargs console=${console} " \
60+ "${optargs} " \
61+ "mpurate=${mpurate} " \
62+ "buddy=${buddy} "\
63+ "vram=${vram} " \
64+ "omapfb.mode=dvi:${dvimode} " \
65+ "omapdss.def_disp=${defaultdisplay} " \
66+ "root=${ramroot} rw ramdisk_size=65536 " \
67+ "initrd=${rdaddr},64M " \
68+ "rootfstype=${ramrootfstype}\0" \
69+ "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
70 "bootscript=echo Running bootscript from mmc ...; " \
71 "source ${loadaddr}\0" \
72 "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
73@@ -235,15 +253,34 @@
74 "run nandargs; " \
75 "nand read ${loadaddr} 280000 400000; " \
76 "bootm ${loadaddr}\0" \
77+ "ramboot=echo Booting from ramdisk ...; " \
78+ "run ramargs; " \
79+ "bootm ${loadaddr}\0" \
80
81 #define CONFIG_BOOTCOMMAND \
82 "if mmc init ${mmcdev}; then " \
83- "if run loadbootscript; then " \
84- "run bootscript; " \
85+ "if userbutton; then " \
86+ "setenv bootscr user.scr;" \
87+ "if run loadbootscript; then " \
88+ "run bootscript; " \
89+ "else " \
90+ "if run loaduimage; then " \
91+ "if run loadramdisk; then " \
92+ "run ramboot; " \
93+ "else " \
94+ "run mmcboot; " \
95+ "fi; " \
96+ "fi; " \
97+ "fi; " \
98 "else " \
99- "if run loaduimage; then " \
100- "run mmcboot; " \
101- "else run nandboot; " \
102+ "setenv bootscr boot.scr; " \
103+ "if run loadbootscript; then " \
104+ "run bootscript; " \
105+ "else " \
106+ "if run loaduimage; then " \
107+ "run mmcboot; " \
108+ "else run nandboot; " \
109+ "fi; " \
110 "fi; " \
111 "fi; " \
112 "else run nandboot; fi"
113--
1141.6.1
115
diff --git a/recipes-bsp/u-boot/u-boot/0045-BeagleBoard-Enable-pullups-on-i2c2.patch b/recipes-bsp/u-boot/u-boot/0045-BeagleBoard-Enable-pullups-on-i2c2.patch
new file mode 100644
index 00000000..ea3ab74c
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0045-BeagleBoard-Enable-pullups-on-i2c2.patch
@@ -0,0 +1,46 @@
1From bf4b655c6c02bbf95bd6ebbf820e53dbd8eb4803 Mon Sep 17 00:00:00 2001
2From: Steve Kipisz <s-kipisz2@ti.com>
3Date: Thu, 5 Aug 2010 10:36:07 -0500
4Subject: [PATCH] BeagleBoard: Enable pullups on i2c2.
5
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(-)
10
11diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
12index cdba3dd..eeb37bc 100644
13--- a/board/ti/beagle/beagle.c
14+++ b/board/ti/beagle/beagle.c
15@@ -163,6 +163,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;
18
19+ /* Enable i22 pullup resisters */
20+ *(ulong *)(CONTROL_PROG_IO1) &= ~(PRG_I2C2_PULLUPRESX);
21 beagle_identify();
22
23 printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n\n");
24diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h
25index 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)
31
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--
451.6.6.1
46
diff --git a/recipes-bsp/u-boot/u-boot/0046-BeagleBoard-Add-camera-to-default-bootargs.patch b/recipes-bsp/u-boot/u-boot/0046-BeagleBoard-Add-camera-to-default-bootargs.patch
new file mode 100644
index 00000000..f999f7fa
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0046-BeagleBoard-Add-camera-to-default-bootargs.patch
@@ -0,0 +1,50 @@
1From 519ecc8a8f441d30e55c7e4552c63e2363fa6dd5 Mon Sep 17 00:00:00 2001
2From: Jason Kridner <jkridner@beagleboard.org>
3Date: Thu, 5 Aug 2010 13:54:12 -0500
4Subject: [PATCH] BeagleBoard: Add camera to default bootargs
5
6
7Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
8---
9 include/configs/omap3_beagle.h | 4 ++++
10 1 files changed, 4 insertions(+), 0 deletions(-)
11
12diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
13index 1a76004..48ad805 100644
14--- a/include/configs/omap3_beagle.h
15+++ b/include/configs/omap3_beagle.h
16@@ -208,6 +208,7 @@
17 "bootscr=boot.scr\0" \
18 "mpurate=500\0" \
19 "buddy=none\0" \
20+ "camera=lbcm3m1\0" \
21 "vram=12M\0" \
22 "dvimode=640x480MR-16@60\0" \
23 "defaultdisplay=dvi\0" \
24@@ -222,6 +223,7 @@
25 "${optargs} " \
26 "mpurate=${mpurate} " \
27 "buddy=${buddy} "\
28+ "camera=${camera} "\
29 "vram=${vram} " \
30 "omapfb.mode=dvi:${dvimode} " \
31 "omapdss.def_disp=${defaultdisplay} " \
32@@ -231,6 +233,7 @@
33 "${optargs} " \
34 "mpurate=${mpurate} " \
35 "buddy=${buddy} "\
36+ "camera=${camera} "\
37 "vram=${vram} " \
38 "omapfb.mode=dvi:${dvimode} " \
39 "omapdss.def_disp=${defaultdisplay} " \
40@@ -241,6 +244,7 @@
41 "${optargs} " \
42 "mpurate=${mpurate} " \
43 "buddy=${buddy} "\
44+ "camera=${camera} "\
45 "vram=${vram} " \
46 "omapfb.mode=dvi:${dvimode} " \
47 "omapdss.def_disp=${defaultdisplay} " \
48--
491.5.6.4
50
diff --git a/recipes-bsp/u-boot/u-boot/fw_env.config b/recipes-bsp/u-boot/u-boot/fw_env.config
new file mode 100644
index 00000000..d9112c22
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/fw_env.config
@@ -0,0 +1,8 @@
1# Configuration file for fw_(printenv/saveenv) utility.
2# Up to two entries are valid, in this case the redundant
3# environment sector is assumed present.
4# Notice, that the "Number of sectors" is ignored on NOR.
5
6# MTD device name Device offset Env. size Flash sector size Number of sectors
7/dev/mtd2 0x0000 0x20000 0x20000
8
diff --git a/recipes-bsp/u-boot/u-boot_git.bb b/recipes-bsp/u-boot/u-boot_git.bb
new file mode 100644
index 00000000..37508630
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_git.bb
@@ -0,0 +1,62 @@
1require u-boot.inc
2PR ="r65"
3
4FILESPATHPKG =. "u-boot-git:"
5
6SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
7 file://0001-OMAP3-enable-i2c-bus-switching-for-Beagle-and-Overo.patch \
8 file://0002-OMAP3-add-board-revision-detection-for-Overo.patch \
9 file://0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch \
10 file://0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch \
11 file://0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch \
12 file://0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch \
13 file://0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch \
14 file://0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch \
15 file://0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch \
16 file://0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch \
17 file://0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch \
18 file://0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch \
19 file://0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch \
20 file://0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch \
21 file://0015-OMAP3-mem.c-enhance-the-RAM-test.patch \
22 file://0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch \
23 file://0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch \
24 file://0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch \
25 file://0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch \
26 file://0020-OMAP3-beagle-add-support-for-Beagle-xM.patch \
27 file://0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch \
28 file://0022-OMAP3-beagle-implement-expansionboard-detection-base.patch \
29 file://0023-beagleboard-display-message-about-I2C-errors-being-e.patch \
30 file://0024-beagleboard-fix-TCT-expansionboard-IDs.patch \
31 file://0025-Add-DSS-driver-for-OMAP3.patch \
32 file://0026-Enable-DSS-driver-for-Beagle.patch \
33 file://0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch \
34 file://0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch \
35 file://0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch \
36 file://0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch \
37 file://0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch \
38 file://0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch \
39 file://0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch \
40 file://0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch \
41 file://0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch \
42 file://0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch \
43 file://0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch \
44 file://0038-Added-configurations-for-xM-Rev-A-board.patch \
45 file://0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch \
46 file://0001-OMAP-mmc-add-support-for-second-and-third-mmc-chan.patch \
47 file://0001-OMAP3-Beagle-enable-support-for-second-and-third-m.patch \
48 file://0038-BeagleBoard-Added-LED-driver.patch \
49 file://0039-Add-led-command.patch \
50 file://0041-BeagleBoard-Enabled-LEDs.patch \
51 file://0042-BeagleBoard-New-command-for-status-of-USER-button.patch \
52 file://0043-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch \
53 file://0044-Beagleboard-Adjust-boot.patch \
54 file://0045-BeagleBoard-Enable-pullups-on-i2c2.patch \
55 file://0046-BeagleBoard-Add-camera-to-default-bootargs.patch \
56 file://0001-BeagleBoard-move-ramdisk-parameters.patch \
57 file://fw_env.config \
58"
59SRCREV = "ca6e1c136ddb720c3bb2cc043b99f7f06bc46c55"
60PV = "2010.03+${PR}+gitr${SRCREV}"
61
62S = "${WORKDIR}/git"