Skip to content

Commit

Permalink
add: beagle: v2013.04-rc2
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Nelson <[email protected]>
  • Loading branch information
RobertCNelson committed Apr 10, 2013
1 parent 2292643 commit 5eb5d23
Showing 1 changed file with 208 additions and 0 deletions.
208 changes: 208 additions & 0 deletions v2013.04-rc2/0001-omap3_beagle-uEnv.txt-bootz-n-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
From 70ff943fad6491fb81b12a97761d8be7dc5e6d02 Mon Sep 17 00:00:00 2001
From: Robert Nelson <[email protected]>
Date: Fri, 15 Mar 2013 10:14:10 -0500
Subject: [PATCH] omap3_beagle: uEnv.txt, bootz, n fixes

Defaults:
#define CONFIG_BOOTDELAY 1

#define CONFIG_CMD_FAT
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT4
#define CONFIG_CMD_FS_GENERIC

/* bootz: zImage/initrd.img support */
#define CONFIG_CMD_BOOTZ
#define CONFIG_SUPPORT_RAW_INITRD

fatload -> load
bootm -> bootz
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}

Signed-off-by: Robert Nelson <[email protected]>
---
board/ti/beagle/beagle.c | 35 ++++++++++++++++++++++++++++++-----
include/configs/omap3_beagle.h | 35 +++++++++++++++++++++--------------
2 files changed, 51 insertions(+), 19 deletions(-)

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 3d9b6dd..e4c6990 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -70,6 +70,7 @@
#define BBTOYS_WIFI 0x01000B00
#define BBTOYS_VGA 0x02000B00
#define BBTOYS_LCD 0x03000B00
+#define BBTOYS_ULCD 0x04000B00
#define BCT_BRETTL3 0x01000F00
#define BCT_BRETTL4 0x02000F00
#define LSR_COM6L_ADPT 0x01001300
@@ -214,25 +215,25 @@ void get_board_mem_timings(struct board_sdrc_timings *timings)
* bus 1 for the availability of an AT24C01B serial EEPROM.
* returns the device_vendor field from the EEPROM
*/
-static unsigned int get_expansion_id(void)
+static unsigned int get_expansion_id(int eeprom_address)
{
i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS);

/* return BEAGLE_NO_EEPROM if eeprom doesn't respond */
- if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1) {
+ if (i2c_probe(eeprom_address) == 1) {
i2c_set_bus_num(TWL4030_I2C_BUS);
return BEAGLE_NO_EEPROM;
}

/* read configuration data */
- i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config,
+ i2c_read(eeprom_address, 0, 1, (u8 *)&expansion_config,
sizeof(expansion_config));

/* retry reading configuration data with 16bit addressing */
if ((expansion_config.device_vendor == 0xFFFFFF00) ||
(expansion_config.device_vendor == 0xFFFFFFFF)) {
printf("EEPROM is blank or 8bit addressing failed: retrying with 16bit:\n");
- i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 2, (u8 *)&expansion_config,
+ i2c_read(eeprom_address, 0, 2, (u8 *)&expansion_config,
sizeof(expansion_config));
}

@@ -398,7 +399,7 @@ int misc_init_r(void)
TWL4030_PM_RECEIVER_DEV_GRP_P1);
}

- switch (get_expansion_id()) {
+ switch (get_expansion_id(EXPANSION_EEPROM_I2C_ADDRESS)) {
case TINCANTOOLS_ZIPPY:
printf("Recognized Tincantools Zippy board (rev %d %s)\n",
expansion_config.revision,
@@ -481,6 +482,30 @@ int misc_init_r(void)
if (expansion_config.content == 1)
setenv(expansion_config.env_var, expansion_config.env_setting);

+ /* Scan 0x51 as well for loop-thru boards */
+ switch (get_expansion_id(EXPANSION_EEPROM_I2C_ADDRESS + 1)) {
+ case BBTOYS_ULCD:
+ printf("Recognized BeagleBoardToys uLCD-lite board\n");
+ setenv("buddy2", "bbtoys-ulcd");
+ setenv("defaultdisplay", "dvi");
+ setenv("dvimode", "800x480MR-16@60");
+ setenv("lcd1", "i2c mw 40 00 00; i2c mw 40 04 80; i2c mw 40 0d 05");
+ setenv("uenvcmd", "i2c dev 1 ; run lcd1; i2c dev 0");
+ setenv("kmsmode", "video=DVI-D-1:800x480");
+ break;
+ case BEAGLE_NO_EEPROM:
+ printf("No EEPROM on expansion board\n");
+ setenv("buddy2", "none");
+ break;
+ default:
+ printf("Unrecognized expansion board: %x\n",
+ expansion_config.device_vendor);
+ setenv("buddy2", "unknown");
+ }
+
+ if (expansion_config.content == 1)
+ setenv(expansion_config.env_var, expansion_config.env_setting);
+
twl4030_power_init();
switch (get_board_revision()) {
case REVISION_XM_A:
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 48ce4c0..7c7e6ed 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -150,6 +150,13 @@
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_EXT2 /* EXT2 Support */
#define CONFIG_CMD_FAT /* FAT support */
+#define CONFIG_CMD_EXT4
+/* #define CONFIG_CMD_FS_GENERIC */
+
+/* bootz: zImage/initrd.img support */
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_SUPPORT_RAW_INITRD
+
#define CONFIG_CMD_JFFS2 /* JFFS2 Support */
#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
@@ -212,7 +219,7 @@
/* partition */

/* Environment information */
-#define CONFIG_BOOTDELAY 3
+#define CONFIG_BOOTDELAY 1

#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x80200000\0" \
@@ -222,10 +229,10 @@
"console=ttyO2,115200n8\0" \
"mpurate=auto\0" \
"buddy=none\0" \
+ "buddy2=none\0" \
"optargs=\0" \
"camera=none\0" \
- "vram=12M\0" \
- "dvimode=640x480MR-16@60\0" \
+ "dvimode=1280x720MR-16@60\0" \
"defaultdisplay=dvi\0" \
"mmcdev=0\0" \
"mmcroot=/dev/mmcblk0p2 rw\0" \
@@ -238,9 +245,9 @@
"${optargs} " \
"mpurate=${mpurate} " \
"buddy=${buddy} "\
+ "buddy2=${buddy2} "\
"camera=${camera} "\
- "vram=${vram} " \
- "omapfb.mode=dvi:${dvimode} " \
+ "omapfb.mode=${defaultdisplay}:${dvimode} " \
"omapdss.def_disp=${defaultdisplay} " \
"root=${mmcroot} " \
"rootfstype=${mmcrootfstype}\0" \
@@ -248,9 +255,9 @@
"${optargs} " \
"mpurate=${mpurate} " \
"buddy=${buddy} "\
+ "buddy2=${buddy2} "\
"camera=${camera} "\
- "vram=${vram} " \
- "omapfb.mode=dvi:${dvimode} " \
+ "omapfb.mode=${defaultdisplay}:${dvimode} " \
"omapdss.def_disp=${defaultdisplay} " \
"root=${nandroot} " \
"rootfstype=${nandrootfstype}\0" \
@@ -262,24 +269,24 @@
"${optargs} " \
"mpurate=${mpurate} " \
"buddy=${buddy} "\
- "vram=${vram} " \
- "omapfb.mode=dvi:${dvimode} " \
+ "buddy2=${buddy2} "\
+ "omapfb.mode=${defaultdisplay}:${dvimode} " \
"omapdss.def_disp=${defaultdisplay} " \
"root=${ramroot} " \
"rootfstype=${ramrootfstype}\0" \
"loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
- "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
- "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \
+ "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} zImage\0" \
+ "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/zImage\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
- "bootm ${loadaddr}\0" \
+ "bootz ${loadaddr}\0" \
"nandboot=echo Booting from nand ...; " \
"run nandargs; " \
"nand read ${loadaddr} 280000 400000; " \
- "bootm ${loadaddr}\0" \
+ "bootz ${loadaddr}\0" \
"ramboot=echo Booting from ramdisk ...; " \
"run ramargs; " \
- "bootm ${loadaddr}\0" \
+ "bootz ${loadaddr}\0" \
"userbutton=if gpio input 173; then run userbutton_xm; " \
"else run userbutton_nonxm; fi;\0" \
"userbutton_xm=gpio input 4;\0" \
--
1.7.10.4

0 comments on commit 5eb5d23

Please sign in to comment.