xref: /rk3399_rockchip-uboot/include/configs/at91-sama5_common.h (revision 372ca03fcd3cc777677d683336e9965c02fc42f2)
1b2d387bcSWu, Josh /*
2b2d387bcSWu, Josh  * Common part of configuration settings for the AT91 SAMA5 board.
3b2d387bcSWu, Josh  *
4b2d387bcSWu, Josh  * Copyright (C) 2015 Atmel Corporation
5b2d387bcSWu, Josh  *		      Josh Wu <josh.wu@atmel.com>
6b2d387bcSWu, Josh  *
7b2d387bcSWu, Josh  * SPDX-License-Identifier:	GPL-2.0+
8b2d387bcSWu, Josh  */
9b2d387bcSWu, Josh 
10b2d387bcSWu, Josh #ifndef __AT91_SAMA5_COMMON_H
11b2d387bcSWu, Josh #define __AT91_SAMA5_COMMON_H
12b2d387bcSWu, Josh 
13b2d387bcSWu, Josh #include <asm/hardware.h>
14b2d387bcSWu, Josh 
15b2d387bcSWu, Josh #define CONFIG_SYS_TEXT_BASE		0x26f00000
16b2d387bcSWu, Josh 
17b2d387bcSWu, Josh /* ARM asynchronous clock */
18b2d387bcSWu, Josh #define CONFIG_SYS_AT91_SLOW_CLOCK      32768
19b2d387bcSWu, Josh #define CONFIG_SYS_AT91_MAIN_CLOCK      12000000 /* from 12 MHz crystal */
20b2d387bcSWu, Josh 
21b2d387bcSWu, Josh #define CONFIG_ARCH_CPU_INIT
22b2d387bcSWu, Josh 
23b2d387bcSWu, Josh #ifndef CONFIG_SPL_BUILD
24b2d387bcSWu, Josh #define CONFIG_SKIP_LOWLEVEL_INIT
25b2d387bcSWu, Josh #endif
26b2d387bcSWu, Josh 
27b2d387bcSWu, Josh #define CONFIG_BOARD_EARLY_INIT_F
28b2d387bcSWu, Josh #define CONFIG_DISPLAY_CPUINFO
29b2d387bcSWu, Josh 
30*372ca03fSWu, Josh #define CONFIG_ENV_VARS_UBOOT_CONFIG
31b2d387bcSWu, Josh #define CONFIG_CMD_BOOTZ
32b2d387bcSWu, Josh #define CONFIG_OF_LIBFDT		/* Device Tree support */
33b2d387bcSWu, Josh 
34b2d387bcSWu, Josh #define CONFIG_SYS_GENERIC_BOARD
35b2d387bcSWu, Josh 
36b2d387bcSWu, Josh /* general purpose I/O */
37b2d387bcSWu, Josh #define CONFIG_AT91_GPIO
38b2d387bcSWu, Josh 
39b2d387bcSWu, Josh #define CONFIG_BOOTDELAY		3
40b2d387bcSWu, Josh 
41b2d387bcSWu, Josh /*
42b2d387bcSWu, Josh  * BOOTP options
43b2d387bcSWu, Josh  */
44b2d387bcSWu, Josh #define CONFIG_BOOTP_BOOTFILESIZE
45b2d387bcSWu, Josh #define CONFIG_BOOTP_BOOTPATH
46b2d387bcSWu, Josh #define CONFIG_BOOTP_GATEWAY
47b2d387bcSWu, Josh #define CONFIG_BOOTP_HOSTNAME
48b2d387bcSWu, Josh 
49b2d387bcSWu, Josh /*
50b2d387bcSWu, Josh  * Command line configuration.
51b2d387bcSWu, Josh  */
52b2d387bcSWu, Josh #define CONFIG_CMD_PING
53b2d387bcSWu, Josh #define CONFIG_CMD_DHCP
54b2d387bcSWu, Josh 
55b2d387bcSWu, Josh #ifdef CONFIG_SYS_USE_MMC
56*372ca03fSWu, Josh /* u-boot env in sd/mmc card */
57*372ca03fSWu, Josh #define CONFIG_ENV_IS_IN_FAT
58*372ca03fSWu, Josh #define CONFIG_FAT_WRITE
59*372ca03fSWu, Josh #define FAT_ENV_INTERFACE	"mmc"
60*372ca03fSWu, Josh #define FAT_ENV_DEVICE_AND_PART	"0"
61*372ca03fSWu, Josh #define FAT_ENV_FILE		"uboot.env"
62*372ca03fSWu, Josh #define CONFIG_ENV_SIZE		0x4000
63*372ca03fSWu, Josh 
64*372ca03fSWu, Josh #define CONFIG_BOOTCOMMAND	"fatload mmc 0:1 0x21000000 at91-${board_name}.dtb; " \
65*372ca03fSWu, Josh 				"fatload mmc 0:1 0x22000000 zImage; "	\
66*372ca03fSWu, Josh 				"bootz 0x22000000 - 0x21000000"
67b2d387bcSWu, Josh #define CONFIG_BOOTARGS							\
68b2d387bcSWu, Josh 	"console=ttyS0,115200 earlyprintk "				\
69b2d387bcSWu, Josh 	"root=/dev/mmcblk0p2 rw rootwait"
70b2d387bcSWu, Josh #else
71b2d387bcSWu, Josh #define CONFIG_BOOTARGS							\
72b2d387bcSWu, Josh 	"console=ttyS0,115200 earlyprintk "				\
73b2d387bcSWu, Josh 	"mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,"		\
749aee8d83SWu, Josh 	"256K(env),256k(env_redundent),256k(spare),"			\
75b2d387bcSWu, Josh 	"512k(dtb),6M(kernel)ro,-(rootfs) "				\
76b2d387bcSWu, Josh 	"rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
77b2d387bcSWu, Josh #endif
78b2d387bcSWu, Josh 
79b2d387bcSWu, Josh #define CONFIG_BAUDRATE			115200
80b2d387bcSWu, Josh 
81b2d387bcSWu, Josh #define CONFIG_SYS_CBSIZE		256
82b2d387bcSWu, Josh #define CONFIG_SYS_MAXARGS		16
83b2d387bcSWu, Josh #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
84b2d387bcSWu, Josh 					sizeof(CONFIG_SYS_PROMPT) + 16)
85b2d387bcSWu, Josh #define CONFIG_SYS_LONGHELP
86b2d387bcSWu, Josh #define CONFIG_CMDLINE_EDITING
87b2d387bcSWu, Josh #define CONFIG_AUTO_COMPLETE
88b2d387bcSWu, Josh #define CONFIG_SYS_HUSH_PARSER
89b2d387bcSWu, Josh 
90b2d387bcSWu, Josh /* Size of malloc() pool */
91b2d387bcSWu, Josh #define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
92b2d387bcSWu, Josh 
93b2d387bcSWu, Josh #endif
94