xref: /rk3399_rockchip-uboot/include/configs/am335x_evm.h (revision 8a8f084e4ffa0e2357790cd92b69301eaeb2834d)
15289e83aSChandan Nath /*
25289e83aSChandan Nath  * am335x_evm.h
35289e83aSChandan Nath  *
45289e83aSChandan Nath  * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
55289e83aSChandan Nath  *
65289e83aSChandan Nath  * This program is free software; you can redistribute it and/or
75289e83aSChandan Nath  * modify it under the terms of the GNU General Public License as
85289e83aSChandan Nath  * published by the Free Software Foundation version 2.
95289e83aSChandan Nath  *
105289e83aSChandan Nath  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
115289e83aSChandan Nath  * kind, whether express or implied; without even the implied warranty
125289e83aSChandan Nath  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
135289e83aSChandan Nath  * GNU General Public License for more details.
145289e83aSChandan Nath  */
155289e83aSChandan Nath 
165289e83aSChandan Nath #ifndef __CONFIG_AM335X_EVM_H
175289e83aSChandan Nath #define __CONFIG_AM335X_EVM_H
185289e83aSChandan Nath 
19f16da746SChandan Nath #define CONFIG_AM33XX
205289e83aSChandan Nath #define CONFIG_CMD_MEMORY	/* for mtest */
215289e83aSChandan Nath #undef CONFIG_GZIP
225289e83aSChandan Nath #undef CONFIG_ZLIB
235289e83aSChandan Nath #undef CONFIG_SYS_HUSH_PARSER
245289e83aSChandan Nath #undef CONFIG_CMD_NET
255289e83aSChandan Nath 
265289e83aSChandan Nath #include <asm/arch/cpu.h>
275289e83aSChandan Nath #include <asm/arch/hardware.h>
285289e83aSChandan Nath 
295289e83aSChandan Nath #define CONFIG_ENV_SIZE			0x400
305289e83aSChandan Nath #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (8 * 1024))
31750b4bfeSChandan Nath #define CONFIG_SYS_PROMPT		"U-Boot# "
325289e83aSChandan Nath #define CONFIG_SYS_NO_FLASH
33a88f70b9STom Rini #define MACH_TYPE_TIAM335EVM		3589	/* Until the next sync */
345289e83aSChandan Nath #define CONFIG_MACH_TYPE		MACH_TYPE_TIAM335EVM
355289e83aSChandan Nath 
365289e83aSChandan Nath #define CONFIG_CMD_ASKENV
375289e83aSChandan Nath #define CONFIG_VERSION_VARIABLE
385289e83aSChandan Nath 
395289e83aSChandan Nath /* set to negative value for no autoboot */
405289e83aSChandan Nath #define CONFIG_BOOTDELAY		3
415289e83aSChandan Nath #define CONFIG_SYS_AUTOLOAD		"no"
425289e83aSChandan Nath #define CONFIG_BOOTFILE			"uImage"
435289e83aSChandan Nath #define CONFIG_EXTRA_ENV_SETTINGS \
445289e83aSChandan Nath 	"verify=yes\0" \
455289e83aSChandan Nath 	"ramdisk_file=ramdisk.gz\0" \
465289e83aSChandan Nath 
475289e83aSChandan Nath /* Clock Defines */
485289e83aSChandan Nath #define V_OSCK				24000000  /* Clock output from T2 */
49750b4bfeSChandan Nath #define V_SCLK				(V_OSCK)
505289e83aSChandan Nath 
515289e83aSChandan Nath #define CONFIG_CMD_ECHO
525289e83aSChandan Nath 
535289e83aSChandan Nath /* max number of command args */
54750b4bfeSChandan Nath #define CONFIG_SYS_MAXARGS		16
555289e83aSChandan Nath 
565289e83aSChandan Nath /* Console I/O Buffer Size */
575289e83aSChandan Nath #define CONFIG_SYS_CBSIZE		512
585289e83aSChandan Nath 
595289e83aSChandan Nath /* Print Buffer Size */
605289e83aSChandan Nath #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE \
615289e83aSChandan Nath 					+ sizeof(CONFIG_SYS_PROMPT) + 16)
625289e83aSChandan Nath 
635289e83aSChandan Nath /* Boot Argument Buffer Size */
645289e83aSChandan Nath #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
655289e83aSChandan Nath 
665289e83aSChandan Nath /*
675289e83aSChandan Nath  * memtest works on 8 MB in DRAM after skipping 32MB from
685289e83aSChandan Nath  * start addr of ram disk
695289e83aSChandan Nath  */
705289e83aSChandan Nath #define CONFIG_SYS_MEMTEST_START	(PHYS_DRAM_1 + (64 * 1024 * 1024))
715289e83aSChandan Nath #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START \
725289e83aSChandan Nath 					+ (8 * 1024 * 1024))
735289e83aSChandan Nath 
745289e83aSChandan Nath #define CONFIG_SYS_LOAD_ADDR		0x81000000 /* Default load address */
755289e83aSChandan Nath #define CONFIG_SYS_HZ			1000 /* 1ms clock */
765289e83aSChandan Nath 
77876bdd6dSChandan Nath #define CONFIG_MMC
78876bdd6dSChandan Nath #define CONFIG_GENERIC_MMC
79876bdd6dSChandan Nath #define CONFIG_OMAP_HSMMC
80876bdd6dSChandan Nath #define CONFIG_CMD_MMC
81876bdd6dSChandan Nath #define CONFIG_DOS_PARTITION
82876bdd6dSChandan Nath #define CONFIG_CMD_FAT
83876bdd6dSChandan Nath #define CONFIG_CMD_EXT2
84876bdd6dSChandan Nath 
855289e83aSChandan Nath  /* Physical Memory Map */
865289e83aSChandan Nath #define CONFIG_NR_DRAM_BANKS		1		/*  1 bank of DRAM */
875289e83aSChandan Nath #define PHYS_DRAM_1			0x80000000	/* DRAM Bank #1 */
885289e83aSChandan Nath #define PHYS_DRAM_1_SIZE		0x10000000 /*(0x80000000 / 8) 256 MB */
895289e83aSChandan Nath #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */
905289e83aSChandan Nath 
915289e83aSChandan Nath #define CONFIG_SYS_SDRAM_BASE		PHYS_DRAM_1
925289e83aSChandan Nath #define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
935289e83aSChandan Nath 						GENERATED_GBL_DATA_SIZE)
945289e83aSChandan Nath  /* Platform/Board specific defs */
955289e83aSChandan Nath #define CONFIG_SYS_TIMERBASE		0x48040000	/* Use Timer2 */
965289e83aSChandan Nath #define CONFIG_SYS_PTV			2	/* Divisor: 2^(PTV+1) => 8 */
975289e83aSChandan Nath #define CONFIG_SYS_HZ			1000
985289e83aSChandan Nath 
995289e83aSChandan Nath /* NS16550 Configuration */
1005289e83aSChandan Nath #define CONFIG_SYS_NS16550
1015289e83aSChandan Nath #define CONFIG_SYS_NS16550_SERIAL
1025289e83aSChandan Nath #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
1035289e83aSChandan Nath #define CONFIG_SYS_NS16550_CLK		(48000000)
1045289e83aSChandan Nath #define CONFIG_SYS_NS16550_COM1		0x44e09000	/* Base EVM has UART0 */
1055289e83aSChandan Nath 
1065289e83aSChandan Nath #define CONFIG_BAUDRATE		115200
1075289e83aSChandan Nath #define CONFIG_SYS_BAUDRATE_TABLE	{ 110, 300, 600, 1200, 2400, \
1085289e83aSChandan Nath 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
1095289e83aSChandan Nath 
1105289e83aSChandan Nath /*
1115289e83aSChandan Nath  * select serial console configuration
1125289e83aSChandan Nath  */
1135289e83aSChandan Nath #define CONFIG_SERIAL1			1
1145289e83aSChandan Nath #define CONFIG_CONS_INDEX		1
1155289e83aSChandan Nath #define CONFIG_SYS_CONSOLE_INFO_QUIET
1165289e83aSChandan Nath 
1175289e83aSChandan Nath #define CONFIG_ENV_IS_NOWHERE
1185289e83aSChandan Nath 
119*8a8f084eSChandan Nath /* Defines for SPL */
120*8a8f084eSChandan Nath #define CONFIG_SPL
121*8a8f084eSChandan Nath #define CONFIG_SPL_TEXT_BASE		0x402F0400
122*8a8f084eSChandan Nath #define CONFIG_SPL_MAX_SIZE		(46 * 1024)
123*8a8f084eSChandan Nath #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
124*8a8f084eSChandan Nath 
125*8a8f084eSChandan Nath #define CONFIG_SPL_BSS_START_ADDR	0x80000000
126*8a8f084eSChandan Nath #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
127*8a8f084eSChandan Nath 
128*8a8f084eSChandan Nath #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
129*8a8f084eSChandan Nath #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
130*8a8f084eSChandan Nath #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
131*8a8f084eSChandan Nath #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
132*8a8f084eSChandan Nath #define CONFIG_SPL_MMC_SUPPORT
133*8a8f084eSChandan Nath #define CONFIG_SPL_FAT_SUPPORT
134*8a8f084eSChandan Nath 
135*8a8f084eSChandan Nath #define CONFIG_SPL_LIBCOMMON_SUPPORT
136*8a8f084eSChandan Nath #define CONFIG_SPL_LIBDISK_SUPPORT
137*8a8f084eSChandan Nath #define CONFIG_SPL_LIBGENERIC_SUPPORT
138*8a8f084eSChandan Nath #define CONFIG_SPL_SERIAL_SUPPORT
139*8a8f084eSChandan Nath #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
140*8a8f084eSChandan Nath 
141*8a8f084eSChandan Nath /*
142*8a8f084eSChandan Nath  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
143*8a8f084eSChandan Nath  * 64 bytes before this address should be set aside for u-boot.img's
144*8a8f084eSChandan Nath  * header. That is 0x800FFFC0--0x80100000 should not be used for any
145*8a8f084eSChandan Nath  * other needs.
146*8a8f084eSChandan Nath  */
147*8a8f084eSChandan Nath #define CONFIG_SYS_TEXT_BASE		0x80800000
148*8a8f084eSChandan Nath #define CONFIG_SYS_SPL_MALLOC_START	0x80208000
149*8a8f084eSChandan Nath #define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
150*8a8f084eSChandan Nath 
151*8a8f084eSChandan Nath /* Since SPL did pll and ddr initialization for us,
152*8a8f084eSChandan Nath  * we don't need to do it twice.
153*8a8f084eSChandan Nath  */
154*8a8f084eSChandan Nath #ifndef CONFIG_SPL_BUILD
155*8a8f084eSChandan Nath #define CONFIG_SKIP_LOWLEVEL_INIT
156*8a8f084eSChandan Nath #endif
1575289e83aSChandan Nath 
1585289e83aSChandan Nath /* Unsupported features */
1595289e83aSChandan Nath #undef CONFIG_USE_IRQ
1605289e83aSChandan Nath 
1615289e83aSChandan Nath #endif	/* ! __CONFIG_AM335X_EVM_H */
162