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