1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2014-2015 Freescale Semiconductor, Inc.
4  * Copyright Jasbir Matharu
5  * Copyright 2015 UDOO Team
6  *
7  * Configuration settings for the UDOO NEO board.
8  */
9 
10 #ifndef __CONFIG_H
11 #define __CONFIG_H
12 
13 #include "mx6_common.h"
14 
15 #include "imx6_spl.h"
16 
17 /* Size of malloc() pool */
18 #define CONFIG_SYS_MALLOC_LEN		(3 * SZ_1M)
19 
20 /* MMC Configuration */
21 #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC2_BASE_ADDR
22 
23 /* Command definition */
24 #define CONFIG_MXC_UART_BASE		UART1_BASE
25 
26 /* Linux only */
27 #define CONFIG_EXTRA_ENV_SETTINGS \
28 	"console=ttymxc0,115200\0" \
29 	"fdt_high=0xffffffff\0" \
30 	"initrd_high=0xffffffff\0" \
31 	"fdtfile=undefined\0" \
32 	"fdt_addr=0x83000000\0" \
33 	"fdt_addr_r=0x83000000\0" \
34 	"ip_dyn=yes\0" \
35 	"mmcdev=0\0" \
36 	"mmcrootfstype=ext4\0" \
37 	"findfdt="\
38 		"if test $board_name = BASIC; then " \
39 			"setenv fdtfile imx6sx-udoo-neo-basic.dtb; fi; " \
40 		"if test $board_name = BASICKS; then " \
41 			"setenv fdtfile imx6sx-udoo-neo-basic.dtb; fi; " \
42 		"if test $board_name = FULL; then " \
43 			"setenv fdtfile imx6sx-udoo-neo-full.dtb; fi; " \
44 		"if test $board_name = EXTENDED; then " \
45 			"setenv fdtfile imx6sx-udoo-neo-extended.dtb; fi; " \
46 		"if test $fdtfile = UNDEFINED; then " \
47 			"echo WARNING: Could not determine dtb to use; fi\0" \
48 	"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
49 	"pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
50 	"ramdisk_addr_r=0x84000000\0" \
51 	"scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
52 	BOOTENV
53 
54 #define BOOT_TARGET_DEVICES(func) \
55 	func(MMC, mmc, 0) \
56 	func(DHCP, dhcp, na)
57 
58 #include <config_distro_bootcmd.h>
59 
60 /* Miscellaneous configurable options */
61 
62 /* Physical Memory Map */
63 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
64 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
65 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
66 #define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
67 
68 #define CONFIG_SYS_INIT_SP_OFFSET \
69 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
70 #define CONFIG_SYS_INIT_SP_ADDR \
71 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
72 
73 /* I2C configs */
74 #define CONFIG_SYS_I2C
75 #define CONFIG_SYS_I2C_MXC
76 #define CONFIG_SYS_I2C_MXC_I2C1
77 #define CONFIG_SYS_I2C_SPEED		100000
78 
79 /* PMIC */
80 #define CONFIG_POWER
81 #define CONFIG_POWER_I2C
82 #define CONFIG_POWER_PFUZE3000
83 #define CONFIG_POWER_PFUZE3000_I2C_ADDR	0x08
84 #define PFUZE3000_I2C_BUS	0
85 
86 #endif				/* __CONFIG_H */
87