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