summaryrefslogtreecommitdiff
path: root/include/configs/u8500.h
diff options
context:
space:
mode:
authorMichael Brandt <michael.brandt@stericsson.com>2010-02-17 13:14:09 +0100
committerJonas ABERG <jonas.aberg@stericsson.com>2010-05-19 07:40:42 +0200
commit1e4db0172510318ddc94ef7fcc071fdd435c2e47 (patch)
tree1cb7fde9a824922054de38fe09f5c3d29347b6ab /include/configs/u8500.h
parent9a711e3345a291058e071ddbc4133c9f71941eec (diff)
General I2C refactoring and environment settings cleanup
These are the patches for WP252006. There will be a follow-up patched for WP254081. Environment settings * board_id bootargs parameter from board_id environment var set in board_late_init(). * decreased bootdelay to 1 second * added check for keypress on bootdelay==0 * removed preboot command and introduced "run cmdfile" instead * changed rootfstype from ext2 to ext3 General I2C refactoring * include/configs/u8500.h: Enabled i2c command line commands. Changed environment settings to use board_id as set in board_late_init(). Added I2C address and configuration defines. * board/st/u8500/Makefile: Replaced i2c.o with u8500_i2c.o. * board/st/u8500/gpio.c, gpio.h: Added I2C busses to altfunc_table. * board/st/u8500/init_mmc.c: removed config_extended_gpio() and therefore I2C references. GPIOE settings are now in board_late_init(). * board/st/u8500/u8500.c: Removed I2C/SD gpio settings from addr,value array. board_late_init(): Determine and set board_id environment variable 0: mop500, 1: href500 Above boards have different GPIO expander chips which we can distinguish by the chip id (1 and 3). The board_id environment variable is needed for the Linux bootargs. Signed-off-by: Michael Brandt <Michael.Brandt@stericsson.com> Change-Id: I4c2cab28c1cb74692e0c72b2daa422e97787ff8d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/167 Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'include/configs/u8500.h')
-rw-r--r--include/configs/u8500.h59
1 files changed, 41 insertions, 18 deletions
diff --git a/include/configs/u8500.h b/include/configs/u8500.h
index b9469b2af..da97cbe73 100644
--- a/include/configs/u8500.h
+++ b/include/configs/u8500.h
@@ -105,31 +105,44 @@
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EMMC
#define CONFIG_CMD_SOURCE
+#define CONFIG_CMD_I2C
#ifdef CONFIG_USB_TTY
#define CONFIG_BOOTDELAY -1 /* disable autoboot */
#endif /* CONFIG_USB_TTY */
#ifndef CONFIG_BOOTDELAY
-#define CONFIG_BOOTDELAY 5
+#define CONFIG_BOOTDELAY 1
#endif
+#define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */
-#define CONFIG_BOOTARGS "cachepolicy=writealloc root=/dev/mmcblk0p2 noinitrd rootfstype=ext3 rootdelay=1 init=/linuxrc console=ttyAMA2,115200n8 board_id=1 mem=96M@0 mem=128M@128M"
-#define CONFIG_BOOTCOMMAND "emmc_read 0x100000 0x14000000 0x200000; bootm 0x100000"
+#undef CONFIG_BOOTARGS
+#define CONFIG_BOOTCOMMAND "run emmcboot"
#define CONFIG_EXTRA_ENV_SETTINGS \
- "loadaddr=0x00100000\0" \
- "console=ttyAMA2,115200n8\0" \
- "reflash=mmc init 1;fatload mmc 1 ${loadaddr} flash.scr; source ${loadaddr}\0" \
- "loaduimage=mmc init 1;fatload mmc 1 ${loadaddr} uImage\0" \
- "usbtty=cdc_acm\0"\
- "stdout=serial,usbtty\0" \
- "stdin=serial,usbtty\0" \
+ "loadaddr=0x00100000\0" \
+ "console=ttyAMA2,115200n8\0" \
+ "commonargs=setenv bootargs cachepolicy=writealloc noinitrd " \
+ "init=init mem=96M@0 mem=128M@128M " \
+ "board_id=${board_id}\0" \
+ "emmcargs=setenv bootargs ${bootargs} " \
+ "root=/dev/mmcblk0p2 rootfstype=ext3 " \
+ "rootdelay=1\0" \
+ "addcons=setenv bootargs ${bootargs} " \
+ "console=${console}\0" \
+ "emmcboot=echo Booting from eMMC ...; " \
+ "run commonargs emmcargs addcons;" \
+ "emmc_read ${loadaddr} 0x14000000 0x200000; " \
+ "bootm ${loadaddr}\0" \
+ "cmdfile=mmc init 1;mmc_read_cmd_file;run bootcmd\0" \
+ "flash=mmc init 1;fatload mmc 1 ${loadaddr} flash.scr;" \
+ "source ${loadaddr}\0" \
+ "loaduimage=mmc init 1;fatload mmc 1 ${loadaddr} uImage\0" \
+ "usbtty=cdc_acm\0" \
+ "stdout=serial,usbtty\0" \
+ "stdin=serial,usbtty\0" \
"stderr=serial,usbtty\0"
-#ifndef CONFIG_USB_TTY
-#define CONFIG_PREBOOT "mmc init 1;mmc_read_cmd_file"
-#endif
/*-----------------------------------------------------------------------
* Miscellaneous configurable options
*/
@@ -156,6 +169,21 @@
#define CONFIG_INITRD_TAG 1
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
+/*
+ * I2C
+ */
+#define CONFIG_HARD_I2C /* I2C with hardware support */
+#undef CONFIG_SOFT_I2C /* I2C bit-banged */
+#define CONFIG_I2C_MULTI_BUS
+#define CONFIG_SYS_I2C_SPEED 100000
+#define CONFIG_SYS_I2C_SLAVE 0 /* slave addr of controller */
+#define CONFIG_SYS_I2C0_BASE 0x80004000
+#define CONFIG_SYS_I2C1_BASE 0x80122000
+#define CONFIG_SYS_I2C2_BASE 0x80128000
+#define CONFIG_SYS_I2C3_BASE 0x80110000
+#define CONFIG_SYS_I2C_BUS_MAX 4
+
+#define CONFIG_SYS_I2C_GPIOE_ADDR 0x42 /* GPIO expander chip addr */
/*-----------------------------------------------------------------------
* Stack sizes
*
@@ -241,11 +269,6 @@
#define CFG_GPIO_8_BASE 0xA03FE000
/*
- * U8500 I2C0 register base for SD card
- */
-#define CFG_I2C0_BASE 0x80004000
-
-/*
* U8500 RTC register base
*/
#define CFG_RTC_BASE 0x80154000 /* Real time clock */