omap: add basic SPL support
[oweals/u-boot.git] / include / configs / omap4_panda.h
index b1e40a38f61e5d0f98cd203d6d5013e809d9936f..1112362b3231304dc95b5874751f29e336cbb212 100644 (file)
@@ -35,6 +35,7 @@
 #define CONFIG_OMAP44XX                1       /* which is a 44XX */
 #define CONFIG_OMAP4430                1       /* which is in a 4430 */
 #define CONFIG_PANDA           1       /* working with Panda */
+#define CONFIG_ARCH_CPU_INIT
 
 /* Get CPU defs */
 #include <asm/arch/cpu.h>
@@ -44,9 +45,6 @@
 #define CONFIG_DISPLAY_CPUINFO         1
 #define CONFIG_DISPLAY_BOARDINFO       1
 
-/* Keep L2 Cache Disabled */
-#define CONFIG_L2_OFF                  1
-
 /* Clock Defines */
 #define V_OSCK                 38400000        /* Clock output from T2 */
 #define V_SCLK                   V_OSCK
@@ -59,6 +57,8 @@
 #define CONFIG_INITRD_TAG              1
 #define CONFIG_REVISION_TAG            1
 
+#define CONFIG_OF_LIBFDT               1
+
 /*
  * Size of malloc() pool
  * Total Size Environment - 256k
@@ -66,8 +66,6 @@
  */
 #define CONFIG_ENV_SIZE                        (256 << 10)
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (256 << 10))
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* bytes reserved for */
-                                               /* initial data */
 /* Vector Base */
 #define CONFIG_SYS_CA9_VECTOR_BASE     SRAM_ROM_VECT_BASE
 
@@ -88,7 +86,6 @@
 #define CONFIG_SYS_NS16550_COM3                UART3_BASE
 
 #define CONFIG_ENV_IS_NOWHERE
-#define CONFIG_ENV_OVERWRITE
 #define CONFIG_BAUDRATE                        115200
 #define CONFIG_SYS_BAUDRATE_TABLE      {4800, 9600, 19200, 38400, 57600,\
                                        115200}
 #define CONFIG_DRIVER_OMAP34XX_I2C     1
 #define CONFIG_I2C_MULTI_BUS           1
 
+/* TWL6030 */
+#define CONFIG_TWL6030_POWER           1
+
 /* MMC */
+#define CONFIG_GENERIC_MMC             1
 #define CONFIG_MMC                     1
-#define CONFIG_OMAP3_MMC               1
+#define CONFIG_OMAP_HSMMC              1
 #define CONFIG_SYS_MMC_SET_DEV         1
 #define CONFIG_DOS_PARTITION           1
 
+/* USB */
+#define CONFIG_MUSB_UDC                        1
+#define CONFIG_USB_OMAP3               1
+
+/* USB device configuration */
+#define CONFIG_USB_DEVICE              1
+#define CONFIG_USB_TTY                 1
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV   1
+
 /* Flash */
 #define CONFIG_SYS_NO_FLASH    1
 
 
 /* Disabled commands */
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 #undef CONFIG_CMD_FPGA         /* FPGA configuration Support   */
 #undef CONFIG_CMD_IMLS         /* List all found images        */
 
-/*
- * Enabling relocation of u-boot by default
- * Relocation can be skipped if u-boot is copied to the TEXT_BASE
- */
-#undef CONFIG_SKIP_RELOCATE_UBOOT
-
 /*
  * Environment setup
  */
 
-/* allow overwriting serial config and ethaddr */
+#define CONFIG_BOOTDELAY       3
+
 #define CONFIG_ENV_OVERWRITE
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "loadaddr=0x82000000\0" \
        "console=ttyS2,115200n8\0" \
-       "mmcdev=1\0" \
+       "usbtty=cdc_acm\0" \
+       "vram=16M\0" \
+       "mmcdev=0\0" \
        "mmcroot=/dev/mmcblk0p2 rw\0" \
        "mmcrootfstype=ext3 rootwait\0" \
        "mmcargs=setenv bootargs console=${console} " \
+               "vram=${vram} " \
                "root=${mmcroot} " \
                "rootfstype=${mmcrootfstype}\0" \
        "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
                "bootm ${loadaddr}\0" \
 
 #define CONFIG_BOOTCOMMAND \
-       "if mmc init ${mmcdev}; then " \
+       "if mmc rescan ${mmcdev}; then " \
                "if run loadbootscript; then " \
                        "run bootscript; " \
                "else " \
                        "if run loaduimage; then " \
                                "run mmcboot; " \
-                       "else run nandboot; " \
                        "fi; " \
                "fi; " \
        "fi"
 #define CONFIG_SYS_LOAD_ADDR           0x80000000
 
 /* Use General purpose timer 1 */
-#define CONFIG_SYS_TIMERBASE           GPT1_BASE
+#define CONFIG_SYS_TIMERBASE           GPT2_BASE
 #define CONFIG_SYS_PTV                 2       /* Divisor: 2^(PTV+1) => 8 */
 #define CONFIG_SYS_HZ                  1000
 
  */
 #define CONFIG_NR_DRAM_BANKS   1
 
+#define CONFIG_SYS_SDRAM_BASE          0x80000000
+#define CONFIG_SYS_INIT_RAM_ADDR       0x4030D800
+#define CONFIG_SYS_INIT_RAM_SIZE       0x800
+#define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_INIT_RAM_ADDR + \
+                                        CONFIG_SYS_INIT_RAM_SIZE - \
+                                        GENERATED_GBL_DATA_SIZE)
+
+#ifndef CONFIG_SYS_L2CACHE_OFF
+#define CONFIG_SYS_L2_PL310            1
+#define CONFIG_SYS_PL310_BASE  0x48242000
+#endif
+
+/* Defines for SDRAM init */
+#ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
+#define CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION
+#define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
+#endif
+
+/* Defines for SPL */
+#define CONFIG_SPL
+#define CONFIG_SPL_TEXT_BASE           0x40304350
+#define CONFIG_SPL_MAX_SIZE            0x8000  /* 32 K */
+#define CONFIG_SPL_STACK               LOW_LEVEL_SRAM_STACK
+
+#define CONFIG_SPL_BSS_START_ADDR      0x80000000
+#define CONFIG_SPL_BSS_MAX_SIZE                0x80000         /* 512 KB */
+
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_LIBDISK_SUPPORT
+#define CONFIG_SPL_I2C_SUPPORT
+#define CONFIG_SPL_MMC_SUPPORT
+#define CONFIG_SPL_FAT_SUPPORT
+#define CONFIG_SPL_LIBGENERIC_SUPPORT
+#define CONFIG_SPL_SERIAL_SUPPORT
+#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv7/omap-common/u-boot-spl.lds"
+
+/*
+ * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
+ * 64 bytes before this address should be set aside for u-boot.img's
+ * header. That is 0x800FFFC0--0x80100000 should not be used for any
+ * other needs.
+ */
+#define CONFIG_SYS_TEXT_BASE           0x80100000
+
 #endif /* __CONFIG_H */