xref: /openbmc/u-boot/include/configs/sksimx6.h (revision 04c28a78)
1 /*
2  * Copyright (C) Stefano Babic <sbabic@denx.de>
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 
8 #ifndef __SKSIMX6_CONFIG_H
9 #define __SKSIMX6_CONFIG_H
10 
11 #include <config_distro_defaults.h>
12 
13 #include "mx6_common.h"
14 #include "imx6_spl.h"
15 
16 /* Thermal */
17 #define CONFIG_IMX_THERMAL
18 
19 /* Serial */
20 #define CONFIG_MXC_UART
21 #define CONFIG_MXC_UART_BASE	       UART1_BASE
22 
23 /* Size of malloc() pool */
24 #define CONFIG_SYS_MALLOC_LEN		(8 * SZ_1M)
25 
26 /* Ethernet */
27 #define IMX_FEC_BASE			ENET_BASE_ADDR
28 #define CONFIG_FEC_XCV_TYPE		RGMII
29 #define CONFIG_ETHPRIME			"FEC"
30 #define CONFIG_FEC_MXC_PHYADDR		0x01
31 
32 #define CONFIG_MII
33 #define CONFIG_PHY_MICREL_KSZ9021
34 
35 /* I2C Configs */
36 #define CONFIG_SYS_I2C
37 #define CONFIG_SYS_I2C_MXC
38 #define CONFIG_SYS_I2C_MXC_I2C2
39 #define CONFIG_SYS_I2C_SPEED		  100000
40 
41 /* Filesystem support */
42 
43 /* Physical Memory Map */
44 #define CONFIG_NR_DRAM_BANKS           1
45 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
46 
47 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
48 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
49 #define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
50 
51 #define CONFIG_SYS_INIT_SP_OFFSET \
52 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
53 #define CONFIG_SYS_INIT_SP_ADDR \
54 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
55 
56 /* MMC Configs */
57 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
58 #define CONFIG_SYS_FSL_USDHC_NUM	1
59 
60 /* Environment organization */
61 #define CONFIG_ENV_SIZE                (16 * 1024)
62 #define CONFIG_ENV_OFFSET		(6 * 64 * 1024)
63 #define CONFIG_SYS_MMC_ENV_DEV		0
64 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
65 #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + \
66 						CONFIG_ENV_SIZE)
67 #define CONFIG_ENV_SIZE_REDUND         CONFIG_ENV_SIZE
68 
69 /* Default environment */
70 #define CONFIG_EXTRA_ENV_SETTINGS \
71 	"addcons=setenv bootargs ${bootargs} "				\
72 		"console=${console},${baudrate}\0"			\
73 	"addip=setenv bootargs ${bootargs} "				\
74 		"ip=${ipaddr}:${serverip}:${gatewayip}:"		\
75 		"${netmask}:${hostname}:${netdev}:off\0"		\
76 	"addmisc=setenv bootargs ${bootargs} ${miscargs}\0" 		\
77 	"bootcmd=run mmcboot\0"						\
78 	"bootfile=uImage\0"						\
79 	"bootimage=uImage\0"						\
80 	"console=ttymxc0\0"						\
81 	"fdt_addr_r=0x18000000\0" 					\
82 	"fdt_file=imx6dl-sks-cts.dtb\0"					\
83 	"fdt_high=0xffffffff\0" 					\
84 	"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" 		\
85 	"miscargs=quiet\0"						\
86 	"mmcargs=setenv bootargs root=${mmcroot} rw rootwait\0"		\
87 	"mmcboot=if run mmcload;then " 					\
88 		"run mmcargs addcons addmisc;"				\
89 			"bootm;fi\0" 					\
90 	"mmcload=mmc rescan;"						\
91 		"load mmc 0:${mmcpart} ${kernel_addr_r} boot/fitImage\0"\
92 	"mmcpart=1\0"							\
93 	"mmcroot=/dev/mmcblk0p1\0"					\
94 	"net_nfs=tftp ${kernel_addr_r} ${board_name}/${bootfile};"	\
95 		"tftp ${fdt_addr_r} ${board_name}/${fdt_file};"		\
96 		"run nfsargs addip addcons addmisc;"			\
97 		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
98 	"nfsargs=setenv bootargs root=/dev/nfs "			\
99 		"nfsroot=${serverip}:${nfsroot},v3 panic=1\0"
100 
101 #endif
102