From ad577c8a487ac0ab277540f5fe2ea654d98d8e9f Mon Sep 17 00:00:00 2001 From: Aneesh V Date: Thu, 21 Jul 2011 09:10:04 -0400 Subject: omap4: add OMAP4430 revision check Signed-off-by: Aneesh V Signed-off-by: Sandeep Paulraj --- arch/arm/include/asm/arch-omap4/omap4.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'arch/arm/include/asm/arch-omap4/omap4.h') diff --git a/arch/arm/include/asm/arch-omap4/omap4.h b/arch/arm/include/asm/arch-omap4/omap4.h index a30bb33..76b06c2 100644 --- a/arch/arm/include/asm/arch-omap4/omap4.h +++ b/arch/arm/include/asm/arch-omap4/omap4.h @@ -51,6 +51,15 @@ #define CONTROL_PADCONF_CORE (OMAP44XX_L4_CORE_BASE + 0x100000) #define CONTROL_PADCONF_WKUP (OMAP44XX_L4_CORE_BASE + 0x31E000) +/* CONTROL_ID_CODE */ +#define CONTROL_ID_CODE 0x4A002204 + +#define OMAP4_CONTROL_ID_CODE_ES1_0 0x0B85202F +#define OMAP4_CONTROL_ID_CODE_ES2_0 0x1B85202F +#define OMAP4_CONTROL_ID_CODE_ES2_1 0x3B95C02F +#define OMAP4_CONTROL_ID_CODE_ES2_2 0x4B95C02F +#define OMAP4_CONTROL_ID_CODE_ES2_3 0x6B95C02F + /* UART */ #define UART1_BASE (OMAP44XX_L4_PER_BASE + 0x6a000) #define UART2_BASE (OMAP44XX_L4_PER_BASE + 0x6c000) @@ -119,13 +128,17 @@ struct s32ktimer { /* base address for indirect vectors (internal boot mode) */ #define SRAM_ROM_VECT_BASE 0x4030D000 /* Temporary SRAM stack used while low level init is done */ -#define LOW_LEVEL_SRAM_STACK NON_SECURE_SRAM_END - -/* - * OMAP4 real hardware: - * TODO: Change this to the IDCODE in the hw regsiter - */ -#define CPU_OMAP4430_ES10 1 -#define CPU_OMAP4430_ES20 2 +#define LOW_LEVEL_SRAM_STACK NON_SECURE_SRAM_END +#define SRAM_SCRATCH_SPACE_ADDR NON_SECURE_SRAM_START +/* SRAM scratch space entries */ +#define OMAP4_SRAM_SCRATCH_OMAP4_REV SRAM_SCRATCH_SPACE_ADDR + +/* Silicon revisions */ +#define OMAP4430_SILICON_ID_INVALID 0xFFFFFFFF +#define OMAP4430_ES1_0 0x44300100 +#define OMAP4430_ES2_0 0x44300200 +#define OMAP4430_ES2_1 0x44300210 +#define OMAP4430_ES2_2 0x44300220 +#define OMAP4430_ES2_3 0x44300230 #endif -- cgit v1.1 From 2ae610f030c376323515321280352b3fe6278a0f Mon Sep 17 00:00:00 2001 From: Aneesh V Date: Thu, 21 Jul 2011 09:10:09 -0400 Subject: omap4: add sdram init support Add support for the SDRAM controller (EMIF). Signed-off-by: Aneesh V Signed-off-by: Sandeep Paulraj --- arch/arm/include/asm/arch-omap4/omap4.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/include/asm/arch-omap4/omap4.h') diff --git a/arch/arm/include/asm/arch-omap4/omap4.h b/arch/arm/include/asm/arch-omap4/omap4.h index 76b06c2..c9c86e1 100644 --- a/arch/arm/include/asm/arch-omap4/omap4.h +++ b/arch/arm/include/asm/arch-omap4/omap4.h @@ -51,6 +51,11 @@ #define CONTROL_PADCONF_CORE (OMAP44XX_L4_CORE_BASE + 0x100000) #define CONTROL_PADCONF_WKUP (OMAP44XX_L4_CORE_BASE + 0x31E000) +/* LPDDR2 IO regs */ +#define LPDDR2_IO_REGS_BASE 0x4A100638 + +#define CONTROL_EFUSE_2 0x4A100704 + /* CONTROL_ID_CODE */ #define CONTROL_ID_CODE 0x4A002204 -- cgit v1.1 From 095aea293b70114dda0d958788a8acc15e3cd665 Mon Sep 17 00:00:00 2001 From: Aneesh V Date: Thu, 21 Jul 2011 09:10:12 -0400 Subject: omap4: calculate EMIF register values Calculate EMIF register values based on AC timing parameters from the SDRAM datasheet and the DDR frequency rather than using the hard-coded values. For a new board the user doen't have to go through the tedious process of calculating the register values. Instead, just provide the AC timings from the device data sheet as input and the driver will automatically calculate the register values. Signed-off-by: Aneesh V Signed-off-by: Sandeep Paulraj --- arch/arm/include/asm/arch-omap4/omap4.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'arch/arm/include/asm/arch-omap4/omap4.h') diff --git a/arch/arm/include/asm/arch-omap4/omap4.h b/arch/arm/include/asm/arch-omap4/omap4.h index c9c86e1..a8dbedb 100644 --- a/arch/arm/include/asm/arch-omap4/omap4.h +++ b/arch/arm/include/asm/arch-omap4/omap4.h @@ -84,12 +84,6 @@ /* GPMC */ #define OMAP44XX_GPMC_BASE 0x50000000 -/* DMM */ -#define OMAP44XX_DMM_BASE 0x4E000000 -#define DMM_LISA_MAP_BASE (OMAP44XX_DMM_BASE + 0x40) -#define DMM_LISA_MAP_SYS_SIZE_MASK (7 << 20) -#define DMM_LISA_MAP_SYS_SIZE_SHIFT 20 -#define DMM_LISA_MAP_SYS_ADDR_MASK (0xFF << 24) /* * Hardware Register Details */ @@ -137,6 +131,10 @@ struct s32ktimer { #define SRAM_SCRATCH_SPACE_ADDR NON_SECURE_SRAM_START /* SRAM scratch space entries */ #define OMAP4_SRAM_SCRATCH_OMAP4_REV SRAM_SCRATCH_SPACE_ADDR +#define OMAP4_SRAM_SCRATCH_EMIF_SIZE (SRAM_SCRATCH_SPACE_ADDR + 0x4) +#define OMAP4_SRAM_SCRATCH_EMIF_T_NUM (SRAM_SCRATCH_SPACE_ADDR + 0xC) +#define OMAP4_SRAM_SCRATCH_EMIF_T_DEN (SRAM_SCRATCH_SPACE_ADDR + 0x10) +#define OMAP4_SRAM_SCRATCH_SPACE_END (SRAM_SCRATCH_SPACE_ADDR + 0x14) /* Silicon revisions */ #define OMAP4430_SILICON_ID_INVALID 0xFFFFFFFF -- cgit v1.1 From 8cf686e19b6922a2a6b401af188dfb83414c3c04 Mon Sep 17 00:00:00 2001 From: Aneesh V Date: Thu, 21 Jul 2011 09:10:27 -0400 Subject: omap: add MMC and FAT support to SPL - Add MMC raw and FAT mode boot support for OMAP - Provide a means by which parameters passed by ROM-code can be saved in u-boot. - Save boot mode related information passed by OMAP4 ROM-code and use it to determine where to load the u-boot from - Assumes that the image has a mkimage header. Gets the payload size and load address from this header. If the header is not detected assume u-boot.bin as payload Signed-off-by: Aneesh V Signed-off-by: Sandeep Paulraj --- arch/arm/include/asm/arch-omap4/omap4.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm/include/asm/arch-omap4/omap4.h') diff --git a/arch/arm/include/asm/arch-omap4/omap4.h b/arch/arm/include/asm/arch-omap4/omap4.h index a8dbedb..563544f 100644 --- a/arch/arm/include/asm/arch-omap4/omap4.h +++ b/arch/arm/include/asm/arch-omap4/omap4.h @@ -144,4 +144,12 @@ struct s32ktimer { #define OMAP4430_ES2_2 0x44300220 #define OMAP4430_ES2_3 0x44300230 +/* ROM code defines */ +/* Boot device */ +#define BOOT_DEVICE_MASK 0xFF +#define BOOT_DEVICE_OFFSET 0x8 +#define DEV_DESC_PTR_OFFSET 0x4 +#define DEV_DATA_PTR_OFFSET 0x18 +#define BOOT_MODE_OFFSET 0x8 + #endif -- cgit v1.1 From 5ab12a9eeb7c8c1ca331685d1babca6081c7718f Mon Sep 17 00:00:00 2001 From: Aneesh V Date: Thu, 21 Jul 2011 09:29:23 -0400 Subject: omap4: add omap4460 revision detection Signed-off-by: Aneesh V Signed-off-by: Sandeep Paulraj --- arch/arm/include/asm/arch-omap4/omap4.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/include/asm/arch-omap4/omap4.h') diff --git a/arch/arm/include/asm/arch-omap4/omap4.h b/arch/arm/include/asm/arch-omap4/omap4.h index 563544f..7ff46d7 100644 --- a/arch/arm/include/asm/arch-omap4/omap4.h +++ b/arch/arm/include/asm/arch-omap4/omap4.h @@ -143,6 +143,7 @@ struct s32ktimer { #define OMAP4430_ES2_1 0x44300210 #define OMAP4430_ES2_2 0x44300220 #define OMAP4430_ES2_3 0x44300230 +#define OMAP4460_ES1_0 0x44600100 /* ROM code defines */ /* Boot device */ -- cgit v1.1 From 25223a68e5f7cc32eebb44313efe8ff15a0f5fd6 Mon Sep 17 00:00:00 2001 From: Aneesh V Date: Thu, 21 Jul 2011 09:29:29 -0400 Subject: omap: reuse omap3 gpio support in omap4 Signed-off-by: Aneesh V Signed-off-by: Sandeep Paulraj --- arch/arm/include/asm/arch-omap4/omap4.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm/include/asm/arch-omap4/omap4.h') diff --git a/arch/arm/include/asm/arch-omap4/omap4.h b/arch/arm/include/asm/arch-omap4/omap4.h index 7ff46d7..9aad0e6 100644 --- a/arch/arm/include/asm/arch-omap4/omap4.h +++ b/arch/arm/include/asm/arch-omap4/omap4.h @@ -153,4 +153,12 @@ struct s32ktimer { #define DEV_DATA_PTR_OFFSET 0x18 #define BOOT_MODE_OFFSET 0x8 +/* GPIO */ +#define OMAP44XX_GPIO1_BASE 0x4A310000 +#define OMAP44XX_GPIO2_BASE 0x48055000 +#define OMAP44XX_GPIO3_BASE 0x48057000 +#define OMAP44XX_GPIO4_BASE 0x48059000 +#define OMAP44XX_GPIO5_BASE 0x4805B000 +#define OMAP44XX_GPIO6_BASE 0x4805D000 + #endif -- cgit v1.1