xref: /openbmc/u-boot/include/configs/mx53smd.h (revision d7869b2183d2b786e5410b97a5a6b2e630e7825e)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2860b32eeSFabio Estevam /*
3860b32eeSFabio Estevam  * Copyright (C) 2011 Freescale Semiconductor, Inc.
4860b32eeSFabio Estevam  *
5c4c596fbSFabio Estevam  * Configuration settings for the MX53SMD Freescale board.
6860b32eeSFabio Estevam  */
7860b32eeSFabio Estevam 
8860b32eeSFabio Estevam #ifndef __CONFIG_H
9860b32eeSFabio Estevam #define __CONFIG_H
10860b32eeSFabio Estevam 
11c4c596fbSFabio Estevam #define CONFIG_MACH_TYPE	MACH_TYPE_MX53_SMD
12c4c596fbSFabio Estevam 
13860b32eeSFabio Estevam #include <asm/arch/imx-regs.h>
14860b32eeSFabio Estevam 
15860b32eeSFabio Estevam #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */
16860b32eeSFabio Estevam #define CONFIG_SETUP_MEMORY_TAGS
17860b32eeSFabio Estevam #define CONFIG_INITRD_TAG
18fd622f23SFabio Estevam #define CONFIG_REVISION_TAG
19860b32eeSFabio Estevam 
2018fb0e3cSGong Qianyu #define CONFIG_SYS_FSL_CLK
215a416df0SFabio Estevam 
22860b32eeSFabio Estevam /* Size of malloc() pool */
23860b32eeSFabio Estevam #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)
24860b32eeSFabio Estevam 
25860b32eeSFabio Estevam #define CONFIG_MXC_UART
2640f6fffeSStefano Babic #define CONFIG_MXC_UART_BASE	UART1_BASE
27860b32eeSFabio Estevam 
28860b32eeSFabio Estevam /* I2C Configs */
29b089d039Strem #define CONFIG_SYS_I2C
30b089d039Strem #define CONFIG_SYS_I2C_MXC
3103544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
3203544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
33f8cb101eSYork Sun #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
34860b32eeSFabio Estevam 
35860b32eeSFabio Estevam /* MMC Configs */
36860b32eeSFabio Estevam #define CONFIG_SYS_FSL_ESDHC_ADDR	0
37860b32eeSFabio Estevam #define CONFIG_SYS_FSL_ESDHC_NUM	1
38860b32eeSFabio Estevam 
39860b32eeSFabio Estevam /* Eth Configs */
40860b32eeSFabio Estevam #define CONFIG_HAS_ETH1
41860b32eeSFabio Estevam 
42860b32eeSFabio Estevam #define CONFIG_FEC_MXC
43860b32eeSFabio Estevam #define IMX_FEC_BASE	FEC_BASE_ADDR
44860b32eeSFabio Estevam #define CONFIG_FEC_MXC_PHYADDR	0x1F
45860b32eeSFabio Estevam 
46860b32eeSFabio Estevam /* allow to overwrite serial and ethaddr */
47860b32eeSFabio Estevam #define CONFIG_ENV_OVERWRITE
48860b32eeSFabio Estevam 
49860b32eeSFabio Estevam /* Command definition */
50860b32eeSFabio Estevam 
5128b119e9SWolfgang Grandegger #define CONFIG_ETHPRIME		"FEC0"
52860b32eeSFabio Estevam 
53860b32eeSFabio Estevam #define CONFIG_LOADADDR		0x70800000	/* loadaddr env var */
54860b32eeSFabio Estevam 
55860b32eeSFabio Estevam #define CONFIG_EXTRA_ENV_SETTINGS \
56860b32eeSFabio Estevam 	"script=boot.scr\0" \
57860b32eeSFabio Estevam 	"uimage=uImage\0" \
58860b32eeSFabio Estevam 	"mmcdev=0\0" \
59860b32eeSFabio Estevam 	"mmcpart=2\0" \
60860b32eeSFabio Estevam 	"mmcroot=/dev/mmcblk0p3 rw\0" \
61860b32eeSFabio Estevam 	"mmcrootfstype=ext3 rootwait\0" \
62860b32eeSFabio Estevam 	"mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \
63860b32eeSFabio Estevam 		"root=${mmcroot} " \
64860b32eeSFabio Estevam 		"rootfstype=${mmcrootfstype}\0" \
65860b32eeSFabio Estevam 	"loadbootscript=" \
66860b32eeSFabio Estevam 		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
67860b32eeSFabio Estevam 	"bootscript=echo Running bootscript from mmc ...; " \
68860b32eeSFabio Estevam 		"source\0" \
69860b32eeSFabio Estevam 	"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
70860b32eeSFabio Estevam 	"mmcboot=echo Booting from mmc ...; " \
71860b32eeSFabio Estevam 		"run mmcargs; " \
72860b32eeSFabio Estevam 		"bootm\0" \
73860b32eeSFabio Estevam 	"netargs=setenv bootargs console=ttymxc0,${baudrate} " \
74860b32eeSFabio Estevam 		"root=/dev/nfs " \
75860b32eeSFabio Estevam 		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
76860b32eeSFabio Estevam 	"netboot=echo Booting from net ...; " \
77860b32eeSFabio Estevam 		"run netargs; " \
78860b32eeSFabio Estevam 		"dhcp ${uimage}; bootm\0" \
79860b32eeSFabio Estevam 
80860b32eeSFabio Estevam #define CONFIG_BOOTCOMMAND \
8166968110SAndrew Bradford 	"mmc dev ${mmcdev}; if mmc rescan; then " \
82860b32eeSFabio Estevam 		"if run loadbootscript; then " \
83860b32eeSFabio Estevam 			"run bootscript; " \
84860b32eeSFabio Estevam 		"else " \
85860b32eeSFabio Estevam 			"if run loaduimage; then " \
86860b32eeSFabio Estevam 				"run mmcboot; " \
87860b32eeSFabio Estevam 			"else run netboot; " \
88860b32eeSFabio Estevam 			"fi; " \
89860b32eeSFabio Estevam 		"fi; " \
90860b32eeSFabio Estevam 	"else run netboot; fi"
91860b32eeSFabio Estevam #define CONFIG_ARP_TIMEOUT	200UL
92860b32eeSFabio Estevam 
93860b32eeSFabio Estevam /* Miscellaneous configurable options */
94860b32eeSFabio Estevam 
95860b32eeSFabio Estevam #define CONFIG_SYS_MEMTEST_START       0x70000000
96869aed7bSFabio Estevam #define CONFIG_SYS_MEMTEST_END         0x70010000
97860b32eeSFabio Estevam 
98860b32eeSFabio Estevam #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
99860b32eeSFabio Estevam 
100860b32eeSFabio Estevam /* Physical Memory Map */
101860b32eeSFabio Estevam #define PHYS_SDRAM_1		CSD0_BASE_ADDR
102860b32eeSFabio Estevam #define PHYS_SDRAM_1_SIZE	(512 * 1024 * 1024)
103860b32eeSFabio Estevam #define PHYS_SDRAM_2		CSD1_BASE_ADDR
104860b32eeSFabio Estevam #define PHYS_SDRAM_2_SIZE	(512 * 1024 * 1024)
105860b32eeSFabio Estevam #define PHYS_SDRAM_SIZE         (PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE)
106860b32eeSFabio Estevam 
107860b32eeSFabio Estevam #define CONFIG_SYS_SDRAM_BASE		(PHYS_SDRAM_1)
108860b32eeSFabio Estevam #define CONFIG_SYS_INIT_RAM_ADDR	(IRAM_BASE_ADDR)
109860b32eeSFabio Estevam #define CONFIG_SYS_INIT_RAM_SIZE	(IRAM_SIZE)
110860b32eeSFabio Estevam 
111860b32eeSFabio Estevam #define CONFIG_SYS_INIT_SP_OFFSET \
112860b32eeSFabio Estevam 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
113860b32eeSFabio Estevam #define CONFIG_SYS_INIT_SP_ADDR \
114860b32eeSFabio Estevam 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
115860b32eeSFabio Estevam 
116e856bdcfSMasahiro Yamada /* environment organization */
117860b32eeSFabio Estevam #define CONFIG_ENV_OFFSET      (6 * 64 * 1024)
118860b32eeSFabio Estevam #define CONFIG_ENV_SIZE        (8 * 1024)
119860b32eeSFabio Estevam #define CONFIG_SYS_MMC_ENV_DEV 0
120860b32eeSFabio Estevam 
121860b32eeSFabio Estevam #endif				/* __CONFIG_H */
122