diff options
-rw-r--r-- | include/configs/sniper.h | 254 |
1 files changed, 103 insertions, 151 deletions
diff --git a/include/configs/sniper.h b/include/configs/sniper.h index e0828f81f0d..8fd9c0d0fcc 100644 --- a/include/configs/sniper.h +++ b/include/configs/sniper.h @@ -18,28 +18,66 @@ #include <asm/arch/omap3.h> #include <config_cmd_default.h> +#include <config_defaults.h> /* - * Platform configuration + * Platform */ #define CONFIG_OMAP #define CONFIG_OMAP_COMMON -#define CONFIG_OMAP_GPIO +/* + * DRAM + */ + #define CONFIG_SDRC +#define CONFIG_NR_DRAM_BANKS 2 +#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 +#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 + +#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) +#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + 0x01F00000) + +/* + * Memory map + */ + +#define CONFIG_SYS_TEXT_BASE 0x80100000 +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 +#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) + +/* + * Cache + */ + +#define CONFIG_SYS_CACHELINE_SIZE 64 + +/* + * Flash + */ + +#define CONFIG_SYS_NO_FLASH /* - * Board configuration + * Board */ #define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_MISC_INIT_R /* * Clocks */ -#define V_OSCK 26000000 /* Clock output from T2 */ +#define CONFIG_SYS_TIMERBASE OMAP34XX_GPT2 +#define CONFIG_SYS_PTV 2 + +#define V_OSCK 26000000 #define V_SCLK (V_OSCK >> 1) /* @@ -48,20 +86,17 @@ #define CONFIG_SPL_FRAMEWORK -/* Addresses */ #define CONFIG_SPL_TEXT_BASE 0x40200000 #define CONFIG_SPL_MAX_SIZE (54 * 1024) #define CONFIG_SPL_BSS_START_ADDR 0x80000000 -#define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) /* 512 KB */ +#define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) #define CONFIG_SYS_SPL_MALLOC_START 0x80208000 #define CONFIG_SYS_SPL_MALLOC_SIZE (1024 * 1024) #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK -/* Platform */ #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" #define CONFIG_SPL_BOARD_INIT -/* Support */ #define CONFIG_SPL_LIBGENERIC_SUPPORT #define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_LIBDISK_SUPPORT @@ -72,7 +107,6 @@ #define CONFIG_SPL_MMC_SUPPORT #define CONFIG_SPL_FAT_SUPPORT -/* Boot */ #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" @@ -93,7 +127,6 @@ * Size of malloc() pool */ -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ #define CONFIG_SYS_MALLOC_LEN (1024 * 1024 + CONFIG_ENV_SIZE) /* @@ -119,7 +152,7 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600, \ 115200} -#define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */ +#define V_NS16550_CLK 48000000 #define CONFIG_SYS_NS16550 #define CONFIG_SYS_NS16550_SERIAL @@ -130,6 +163,7 @@ * GPIO */ +#define CONFIG_OMAP_GPIO #define CONFIG_OMAP3_GPIO_2 /* @@ -137,10 +171,10 @@ */ #define CONFIG_SYS_I2C -#define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_OMAP24_I2C_SPEED 100000 #define CONFIG_SYS_OMAP24_I2C_SLAVE 1 #define CONFIG_SYS_I2C_OMAP34XX +#define CONFIG_I2C_MULTI_BUS /* * MMC @@ -154,202 +188,120 @@ #define CONFIG_EFI_PARTITION 1 /* + * Video + */ + +#define CONFIG_VIDEO +#define CONFIG_CFB_CONSOLE +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_VIDEO_OMAP3 +#define CONFIG_VIDEO_LOGO + +/* * USB */ #define CONFIG_MUSB_GADGET -#define CONFIG_USB_MUSB_OMAP2PLUS #define CONFIG_MUSB_PIO_ONLY -#define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_TWL4030_USB 1 -#define CONFIG_USB_ETHER -#define CONFIG_USB_ETHER_RNDIS +#define CONFIG_USB_MUSB_OMAP2PLUS +#define CONFIG_TWL4030_USB + #define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 0 -#define CONFIG_USBDOWNLOAD_GADGET +#define CONFIG_USBDOWNLOAD_GADGET #define CONFIG_G_DNL_VENDOR_NUM 0x0451 #define CONFIG_G_DNL_PRODUCT_NUM 0xD022 #define CONFIG_G_DNL_MANUFACTURER "TI" -#define CONFIG_CMD_FASTBOOT -#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR -#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x07000000 - - -/* LEGACY USB */ /* -#define CONFIG_MUSB_UDC 1 -#define CONFIG_USB_OMAP3 1 -#define CONFIG_TWL4030_USB 1 -#define CONFIG_USB_DEVICE 1 -#define CONFIG_USB_TTY 1 -*/ - -#define CONFIG_ANDROID_BOOT_IMAGE - -/* - * Video + * Fastboot */ -#define CONFIG_VIDEO -#define CONFIG_CFB_CONSOLE -#define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_VIDEO_OMAP3 -#define CONFIG_VIDEO_LOGO +#define CONFIG_CMD_FASTBOOT +#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR +#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x7000000 /* * Commands */ -#define CONFIG_CMD_EXT2 /* EXT2 Support */ -#define CONFIG_CMD_FAT /* FAT support */ - -#define CONFIG_CMD_I2C /* I2C serial bus support */ -#define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_CACHE /* Cache control */ - -#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ -#undef CONFIG_CMD_FPGA /* FPGA configuration Support */ -#undef CONFIG_CMD_IMI /* iminfo */ -#undef CONFIG_CMD_IMLS /* List all found images */ -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ -#undef CONFIG_CMD_NFS /* NFS support */ - -#define CONFIG_SYS_NO_FLASH +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_FS_GENERIC +#define CONFIG_CMD_I2C +#define CONFIG_CMD_MMC +#define CONFIG_CMD_CACHE /* * Power */ -#define CONFIG_TWL4030_POWER 1 -#define CONFIG_LP8720_POWER 1 +#define CONFIG_TWL4030_POWER +#define CONFIG_LP8720_POWER /* * Environment */ -#define CONFIG_BOOTDELAY 1 - -/* "stdout=vga\0" \ - "stderr=vga\0" \ - "console=vga\0" \ - "usbtty=cdc_acm\0" \ - "setcon=setenv stdin ${con};" \ - "setenv stdout ${con};" \ - "setenv stderr ${con}\0" \ - "usbcon=setenv con usbtty; run setcon\0" \ -*/ +#define CONFIG_ENV_SIZE (128 * 1024) +#define CONFIG_ENV_IS_NOWHERE #define CONFIG_EXTRA_ENV_SETTINGS \ - "setcon=setenv stdin ${con};" \ - "setenv stdout ${con};" \ - "setenv stderr ${con}\0" \ - "usbtty=cdc_acm\0" \ - "usbcon=setenv con usbtty; run setcon\0" \ "bootargs=console=ttyO2,115200n8 earlyprintk mem=512M init=/init videoout=omap24xxvout omap_vout.video1_numbuffers=6 omap_vout.vid1_static_vrfb_alloc=y vram=16M omapfb.vram=0:5M lpj=2334720 fuelgauge=g androidboot.hardware=blackg muic_state=0 thermal_fakemode=0 CRC=0x6f889a29" +/* + * Boot command + */ + #define CONFIG_BOOTCOMMAND \ "i2c dev 1; i2c md 0x44 0x00 0x10; i2c mw 0x44 0x03 0x00; i2c md 0x44 0x00 0x10; i2c dev 0; fastboot;" \ - "fatload mmc 0 0x81000000 recovery.img;" \ - "bootm 0x81000000;" + "load mmc 0 0x82000000 recovery.img;" \ + "bootm 0x82000000;" - -/* "fastboot;" \ - "fatload mmc 0 0x81000000 recovery.img;" \ - "bootm 0x81000000;" -*/ /* - "i2c dev 0; i2c probe 0x4a;i2c mw 0x4a 0xaa 0xd5;i2c mw 0x4a 0xab 0x08;i2c mw 0x4a 0xac 0x0b;i2c mw 0x4a 0xad 0x00;i2c mw 0x4a 0xae 0x88; i2c mw 0x4a 0xaf 0x00; i2c mw 0x4a 0xb0 0x00; sleep 1; i2c md 0x4a 0x00 0xff;" \ + * Boot + */ -d5 08 0b 00 88 00 D....l.......... - 00b0: 00 +#define CONFIG_SYS_LOAD_ADDR 0x82000000 - "fatload mmc 0 0x81000000 recovery.img;" \ - "bootm 0x81000000;" -*/ -/* - "i2c dev 1;" \ - "i2c probe 0x60;" \ - "i2c probe 60;" \ - "mmc help; help mmc; help;" \ - "print bootargs;" \ - "fatload mmc 0 0x81000000 recovery.img;" \ - "bootm 0x81000000" -*/ - -/* "fastboot;"*/ -/* - "i2c dev 0;" \ - "i2c probe;" \ - "i2c dev 1;" \ - "i2c probe;" \ - "fatload mmc 0 0x81000000 boot.img;" \ - "print bootargs;" \ - "bootm 0x81000000" -*/ -#define CONFIG_AUTO_COMPLETE 1 - -#define MTDPARTS_DEFAULT +#define CONFIG_ANDROID_BOOT_IMAGE /* - * Display CPU and Board information + * Display */ #define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_DISPLAY_BOARDINFO 1 -#define CONFIG_MISC_INIT_R + /* - * Miscellaneous configurable options + * Prompt */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ -#define CONFIG_SYS_PROMPT "Sniper # " -#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ - sizeof(CONFIG_SYS_PROMPT) + 16) -#define CONFIG_SYS_MAXARGS 16 /* max number of command */ - /* args */ -/* Boot Argument Buffer Size */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE -/* memtest works on */ -#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) -#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ - 0x01F00000) /* 31MB */ +#define CONFIG_BOOTDELAY 1 +#define CONFIG_AUTO_COMPLETE -#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load */ - /* address */ - /* 0x81000000 probably suites better, the kernel base address is 0x80000000 and we want to move it */ +#define CONFIG_SYS_PROMPT "Sniper # " +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_HUSH_PARSER /* - * OMAP3 has 12 GP timers, they can be driven by the system clock - * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK). - * This rate is divided by a local divisor. - */ -#define CONFIG_SYS_TIMERBASE OMAP34XX_GPT2 -#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */ - -/*----------------------------------------------------------------------- - * Physical Memory Map + * Miscellaneous configurable options */ -#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ -#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 -#define CONFIG_SYS_TEXT_BASE 0x80100000 -#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 -#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 -#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) + /* undef to save memory */ + /* use "hush" command parser */ -#define CONFIG_ENV_IS_NOWHERE 1 +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ + sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_MAXARGS 16 /* max number of command */ -#define CONFIG_SYS_CACHELINE_SIZE 64 +/* Boot Argument Buffer Size */ +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE #endif /* __CONFIG_H */ |