xref: /openbmc/u-boot/include/configs/poplar.h (revision d7c11502)
1 /*
2  * (C) Copyright 2017 Linaro
3  *
4  * Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
5  *
6  * Configuration for Poplar 96boards CE. Parts were derived from other ARM
7  * configurations.
8  *
9  * SPDX-License-Identifier:	GPL-2.0+
10  */
11 
12 #ifndef _POPLAR_H_
13 #define _POPLAR_H_
14 
15 #include <linux/sizes.h>
16 
17 /* DRAM banks */
18 #define CONFIG_NR_DRAM_BANKS			2
19 
20 /* SYS */
21 #define CONFIG_SYS_BOOTM_LEN			0x1400000
22 #define CONFIG_SYS_INIT_SP_ADDR			0x200000
23 #define CONFIG_SYS_LOAD_ADDR			0x800000
24 #define CONFIG_SYS_MALLOC_LEN			SZ_32M
25 
26 /* ATF bl33.bin load address (must match) */
27 #define CONFIG_SYS_TEXT_BASE			0x37000000
28 
29 /* PL010/PL011 */
30 #define CONFIG_PL01X_SERIAL
31 
32 /* USB configuration */
33 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS	3
34 #define CONFIG_USB_MAX_CONTROLLER_COUNT		2
35 #define CONFIG_SYS_USB_EVENT_POLL
36 #define CONFIG_USB_HOST_ETHER
37 #define CONFIG_USB_ETHER_ASIX
38 
39 /* SD/MMC */
40 #define CONFIG_BOUNCE_BUFFER
41 
42 /*****************************************************************************
43  *  Initial environment variables
44  *****************************************************************************/
45 
46 #define BOOT_TARGET_DEVICES(func)					\
47 					func(USB, usb, 0)		\
48 					func(MMC, mmc, 0)		\
49 					func(DHCP, dhcp, na)
50 #ifndef CONFIG_SPL_BUILD
51 #include <config_distro_defaults.h>
52 #include <config_distro_bootcmd.h>
53 #endif
54 
55 #define CONFIG_EXTRA_ENV_SETTINGS					\
56 			"loader_mmc_blknum=0x0\0"			\
57 			"loader_mmc_nblks=0x780\0"			\
58 			"env_mmc_blknum=0x780\0"			\
59 			"env_mmc_nblks=0x80\0"				\
60 			"kernel_addr_r=0x30000000\0"			\
61 			"pxefile_addr_r=0x32000000\0"			\
62 			"scriptaddr=0x32000000\0"			\
63 			"fdt_addr_r=0x32200000\0"			\
64 			"fdtfile=hisilicon/hi3798cv200-poplar.dtb\0"	\
65 			"ramdisk_addr_r=0x32400000\0"			\
66 			BOOTENV
67 
68 
69 /* Command line configuration */
70 #define CONFIG_ENV_IS_IN_MMC		1
71 #define CONFIG_SYS_MMC_ENV_DEV		0
72 #define CONFIG_ENV_OFFSET		(0x780 * 512)	/* env_mmc_blknum */
73 #define CONFIG_ENV_SIZE			0x10000	/* env_mmc_nblks bytes */
74 #define CONFIG_FAT_WRITE
75 #define CONFIG_ENV_VARS_UBOOT_CONFIG
76 
77 /* Monitor Command Prompt */
78 #define CONFIG_CMDLINE_EDITING
79 #define CONFIG_SYS_LONGHELP
80 #define CONFIG_SYS_CBSIZE		512
81 #define CONFIG_SYS_MAXARGS		64
82 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
83 					sizeof(CONFIG_SYS_PROMPT) + 16)
84 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
85 
86 #endif /* _POPLAR_H_ */
87