xref: /rk3399_rockchip-uboot/include/configs/udoo_neo.h (revision c94981efa20cc5861caad6a53e589121bf978fb1)
1 /*
2  * Copyright 2014-2015 Freescale Semiconductor, Inc.
3  * Copyright Jasbir Matharu
4  * Copyright 2015 UDOO Team
5  *
6  * Configuration settings for the UDOO NEO board.
7  *
8  * SPDX-License-Identifier:	GPL-2.0+
9  */
10 
11 #ifndef __CONFIG_H
12 #define __CONFIG_H
13 
14 #include <config_distro_defaults.h>
15 #include "mx6_common.h"
16 
17 #include "imx6_spl.h"
18 
19 /* Size of malloc() pool */
20 #define CONFIG_SYS_MALLOC_LEN		(3 * SZ_1M)
21 #define CONFIG_BOARD_EARLY_INIT_F
22 #define CONFIG_BOARD_LATE_INIT
23 #define CONFIG_MXC_UART
24 
25 /* MMC Configuration */
26 #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC2_BASE_ADDR
27 
28 /* Command definition */
29 #define CONFIG_MXC_UART_BASE		UART1_BASE
30 #define CONFIG_SYS_MMC_ENV_DEV		0  /*USDHC2*/
31 
32 /* Linux only */
33 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
34 #define CONFIG_EXTRA_ENV_SETTINGS \
35 	"console=ttymxc0,115200\0" \
36 	"fdt_high=0xffffffff\0" \
37 	"initrd_high=0xffffffff\0" \
38 	"fdt_file=undefined\0" \
39 	"fdt_addr=0x83000000\0" \
40 	"ip_dyn=yes\0" \
41 	"mmcdev=0\0" \
42 	"mmcrootfstype=ext4\0" \
43 	"mmcautodetect=no\0" \
44 	"findfdt="\
45 		"if test $board_name = BASIC; then " \
46 			"setenv fdt_file imx6sx-udoo-neo-basic.dtb; fi; " \
47 		"if test $board_name = BASICKS; then " \
48 			"setenv fdt_file imx6sx-udoo-neo-basic.dtb; fi; " \
49 		"if test $board_name = FULL; then " \
50 			"setenv fdt_file imx6sx-udoo-neo-full.dtb; fi; " \
51 		"if test $board_name = EXTENDED; then " \
52 			"setenv fdt_file imx6sx-udoo-neo-extended.dtb; fi; " \
53 		"if test $fdt_file = UNDEFINED; then " \
54 			"echo WARNING: Could not determine dtb to use; fi; \0" \
55 	"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
56 	"pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
57 	"ramdisk_addr_r=0x83000000\0" \
58 	"ramdiskaddr=0x83000000\0" \
59 	"scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
60 	BOOTENV
61 
62 #define BOOT_TARGET_DEVICES(func) \
63 	func(MMC, mmc, 0)
64 
65 #define CONFIG_BOOTCOMMAND \
66 	"run findfdt; " \
67 	"run distro_bootcmd"
68 
69 #include <config_distro_bootcmd.h>
70 
71 /* Miscellaneous configurable options */
72 #define CONFIG_SYS_MEMTEST_START	0x80000000
73 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 0x10000)
74 #define CONFIG_STACKSIZE		SZ_128K
75 
76 /* Physical Memory Map */
77 #define CONFIG_NR_DRAM_BANKS		1
78 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
79 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
80 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
81 #define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
82 
83 #define CONFIG_SYS_INIT_SP_OFFSET \
84 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
85 #define CONFIG_SYS_INIT_SP_ADDR \
86 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
87 
88 /* Environment organization */
89 #define CONFIG_ENV_OFFSET		(8 * SZ_64K)
90 #define CONFIG_ENV_SIZE			SZ_8K
91 #define CONFIG_ENV_IS_IN_MMC
92 
93 #endif				/* __CONFIG_H */
94