xref: /rk3399_rockchip-uboot/include/configs/s32v234evb.h (revision e856bdcfb49291d30b19603fc101bea096c48196)
19702ec00SEddy Petrișor /*
29702ec00SEddy Petrișor  * (C) Copyright 2015-2016 Freescale Semiconductor, Inc.
39702ec00SEddy Petrișor  *
49702ec00SEddy Petrișor  * SPDX-License-Identifier:     GPL-2.0+
59702ec00SEddy Petrișor  *
69702ec00SEddy Petrișor  * Configuration settings for the Freescale S32V234 EVB board.
79702ec00SEddy Petrișor  */
89702ec00SEddy Petrișor 
99702ec00SEddy Petrișor #ifndef __CONFIG_H
109702ec00SEddy Petrișor #define __CONFIG_H
119702ec00SEddy Petrișor 
129702ec00SEddy Petrișor #ifndef CONFIG_SPL_BUILD
139702ec00SEddy Petrișor #include <config_distro_defaults.h>
149702ec00SEddy Petrișor #endif
159702ec00SEddy Petrișor 
169702ec00SEddy Petrișor #include <asm/arch/imx-regs.h>
179702ec00SEddy Petrișor 
189702ec00SEddy Petrișor #define CONFIG_S32V234
199702ec00SEddy Petrișor #define CONFIG_DM
209702ec00SEddy Petrișor 
219702ec00SEddy Petrișor /* Config GIC */
229702ec00SEddy Petrișor #define CONFIG_GICV2
239702ec00SEddy Petrișor #define GICD_BASE 0x7D001000
249702ec00SEddy Petrișor #define GICC_BASE 0x7D002000
259702ec00SEddy Petrișor 
269702ec00SEddy Petrișor #define CONFIG_REMAKE_ELF
279702ec00SEddy Petrișor #undef CONFIG_RUN_FROM_IRAM_ONLY
289702ec00SEddy Petrișor 
299702ec00SEddy Petrișor #define CONFIG_RUN_FROM_DDR1
309702ec00SEddy Petrișor #undef CONFIG_RUN_FROM_DDR0
319702ec00SEddy Petrișor 
329702ec00SEddy Petrișor /* Run by default from DDR1  */
339702ec00SEddy Petrișor #ifdef CONFIG_RUN_FROM_DDR0
349702ec00SEddy Petrișor #define DDR_BASE_ADDR		0x80000000
359702ec00SEddy Petrișor #else
369702ec00SEddy Petrișor #define DDR_BASE_ADDR		0xC0000000
379702ec00SEddy Petrișor #endif
389702ec00SEddy Petrișor 
399702ec00SEddy Petrișor #define CONFIG_MACH_TYPE		4146
409702ec00SEddy Petrișor 
419702ec00SEddy Petrișor #define CONFIG_SKIP_LOWLEVEL_INIT
429702ec00SEddy Petrișor 
439702ec00SEddy Petrișor /* Config CACHE */
449702ec00SEddy Petrișor #define CONFIG_CMD_CACHE
459702ec00SEddy Petrișor 
469702ec00SEddy Petrișor #define CONFIG_SYS_FULL_VA
479702ec00SEddy Petrișor 
489702ec00SEddy Petrișor /* Enable passing of ATAGs */
499702ec00SEddy Petrișor #define CONFIG_CMDLINE_TAG
509702ec00SEddy Petrișor 
519702ec00SEddy Petrișor /* SMP Spin Table Definitions */
529702ec00SEddy Petrișor #define CPU_RELEASE_ADDR                (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
539702ec00SEddy Petrișor 
549702ec00SEddy Petrișor /* Generic Timer Definitions */
559702ec00SEddy Petrișor #define COUNTER_FREQUENCY               (1000000000)	/* 1000MHz */
569702ec00SEddy Petrișor #define CONFIG_SYS_FSL_ERRATUM_A008585
579702ec00SEddy Petrișor 
589702ec00SEddy Petrișor /* Size of malloc() pool */
599702ec00SEddy Petrișor #ifdef CONFIG_RUN_FROM_IRAM_ONLY
609702ec00SEddy Petrișor #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 1 * 1024 * 1024)
619702ec00SEddy Petrișor #else
629702ec00SEddy Petrișor #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)
639702ec00SEddy Petrișor #endif
649702ec00SEddy Petrișor 
659702ec00SEddy Petrișor #define CONFIG_DM_SERIAL
669702ec00SEddy Petrișor #define CONFIG_FSL_LINFLEXUART
679702ec00SEddy Petrișor #define LINFLEXUART_BASE		LINFLEXD0_BASE_ADDR
689702ec00SEddy Petrișor 
699702ec00SEddy Petrișor #define CONFIG_DEBUG_UART_LINFLEXUART
709702ec00SEddy Petrișor #define CONFIG_DEBUG_UART_BASE		LINFLEXUART_BASE
719702ec00SEddy Petrișor 
729702ec00SEddy Petrișor /* Allow to overwrite serial and ethaddr */
739702ec00SEddy Petrișor #define CONFIG_ENV_OVERWRITE
749702ec00SEddy Petrișor #define CONFIG_SYS_UART_PORT		(1)
759702ec00SEddy Petrișor #define CONFIG_BAUDRATE				115200
769702ec00SEddy Petrișor 
779702ec00SEddy Petrișor #undef CONFIG_CMD_IMLS
789702ec00SEddy Petrișor 
799702ec00SEddy Petrișor #define CONFIG_FSL_ESDHC
809702ec00SEddy Petrișor #define CONFIG_FSL_USDHC
819702ec00SEddy Petrișor #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC_BASE_ADDR
829702ec00SEddy Petrișor #define CONFIG_SYS_FSL_ESDHC_NUM	1
839702ec00SEddy Petrișor 
849702ec00SEddy Petrișor #define CONFIG_CMD_MMC
859702ec00SEddy Petrișor /* #define CONFIG_CMD_EXT2 EXT2 Support */
869702ec00SEddy Petrișor 
879702ec00SEddy Petrișor #if 0
889702ec00SEddy Petrișor 
899702ec00SEddy Petrișor /* Ethernet config */
909702ec00SEddy Petrișor #define CONFIG_CMD_PING
919702ec00SEddy Petrișor #define CONFIG_CMD_MII
929702ec00SEddy Petrișor #define CONFIG_FEC_MXC
939702ec00SEddy Petrișor #define CONFIG_MII
949702ec00SEddy Petrișor #define IMX_FEC_BASE            ENET_BASE_ADDR
959702ec00SEddy Petrișor #define CONFIG_FEC_XCV_TYPE     RMII
969702ec00SEddy Petrișor #define CONFIG_FEC_MXC_PHYADDR  0
979702ec00SEddy Petrișor #define CONFIG_PHYLIB
989702ec00SEddy Petrișor #define CONFIG_PHY_MICREL
999702ec00SEddy Petrișor #endif
1009702ec00SEddy Petrișor 
1019702ec00SEddy Petrișor #if 0				/* Disable until the I2C driver will be updated */
1029702ec00SEddy Petrișor 
1039702ec00SEddy Petrișor /* I2C Configs */
1049702ec00SEddy Petrișor #define CONFIG_CMD_I2C
1059702ec00SEddy Petrișor #define CONFIG_HARD_I2C
1069702ec00SEddy Petrișor #define CONFIG_I2C_MXC
1079702ec00SEddy Petrișor #define CONFIG_SYS_I2C_BASE		I2C0_BASE_ADDR
1089702ec00SEddy Petrișor #define CONFIG_SYS_I2C_SPEED		100000
1099702ec00SEddy Petrișor #endif
1109702ec00SEddy Petrișor 
1119702ec00SEddy Petrișor #if 0				/* Disable until the FLASH will be implemented */
1129702ec00SEddy Petrișor #define CONFIG_SYS_USE_NAND
1139702ec00SEddy Petrișor #endif
1149702ec00SEddy Petrișor 
1159702ec00SEddy Petrișor #ifdef CONFIG_SYS_USE_NAND
1169702ec00SEddy Petrișor /* Nand Flash Configs */
1179702ec00SEddy Petrișor #define	CONFIG_CMD_NAND
1189702ec00SEddy Petrișor #define CONFIG_JFFS2_NAND
1199702ec00SEddy Petrișor #define MTD_NAND_FSL_NFC_SWECC 1
1209702ec00SEddy Petrișor #define CONFIG_NAND_FSL_NFC
1219702ec00SEddy Petrișor #define CONFIG_SYS_NAND_BASE		0x400E0000
1229702ec00SEddy Petrișor #define CONFIG_SYS_MAX_NAND_DEVICE	1
1239702ec00SEddy Petrișor #define NAND_MAX_CHIPS			CONFIG_SYS_MAX_NAND_DEVICE
1249702ec00SEddy Petrișor #define CONFIG_SYS_NAND_SELECT_DEVICE
1259702ec00SEddy Petrișor #define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */
1269702ec00SEddy Petrișor #endif
1279702ec00SEddy Petrișor 
1289702ec00SEddy Petrișor #define CONFIG_LOADADDR			0xC307FFC0
1299702ec00SEddy Petrișor #define CONFIG_BOOTARGS			"console=ttyLF0 root=/dev/ram rw"
1309702ec00SEddy Petrișor 
1319702ec00SEddy Petrișor #define CONFIG_CMD_ENV
1329702ec00SEddy Petrișor #define CONFIG_EXTRA_ENV_SETTINGS \
1339702ec00SEddy Petrișor 	"boot_scripts=boot.scr.uimg boot.scr\0" \
1349702ec00SEddy Petrișor 	"scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
1359702ec00SEddy Petrișor 	"console=ttyLF0,115200\0" \
1369702ec00SEddy Petrișor 	"fdt_file=s32v234-evb.dtb\0" \
1379702ec00SEddy Petrișor 	"fdt_high=0xffffffff\0" \
1389702ec00SEddy Petrișor 	"initrd_high=0xffffffff\0" \
1399702ec00SEddy Petrișor 	"fdt_addr_r=0xC2000000\0" \
1409702ec00SEddy Petrișor 	"kernel_addr_r=0xC307FFC0\0" \
1419702ec00SEddy Petrișor 	"ramdisk_addr_r=0xC4000000\0" \
1429702ec00SEddy Petrișor 	"ramdisk=rootfs.uimg\0"\
1439702ec00SEddy Petrișor 	"ip_dyn=yes\0" \
1449702ec00SEddy Petrișor 	"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
1459702ec00SEddy Petrișor 	"update_sd_firmware_filename=u-boot.imx\0" \
1469702ec00SEddy Petrișor 	"update_sd_firmware=" \
1479702ec00SEddy Petrișor 		"if test ${ip_dyn} = yes; then " \
1489702ec00SEddy Petrișor 			"setenv get_cmd dhcp; " \
1499702ec00SEddy Petrișor 		"else " \
1509702ec00SEddy Petrișor 			"setenv get_cmd tftp; " \
1519702ec00SEddy Petrișor 		"fi; " \
1529702ec00SEddy Petrișor 		"if mmc dev ${mmcdev}; then "	\
1539702ec00SEddy Petrișor 			"if ${get_cmd} ${update_sd_firmware_filename}; then " \
1549702ec00SEddy Petrișor 				"setexpr fw_sz ${filesize} / 0x200; " \
1559702ec00SEddy Petrișor 				"setexpr fw_sz ${fw_sz} + 1; "	\
1569702ec00SEddy Petrișor 				"mmc write ${loadaddr} 0x2 ${fw_sz}; " \
1579702ec00SEddy Petrișor 			"fi; "	\
1589702ec00SEddy Petrișor 		"fi\0" \
1599702ec00SEddy Petrișor 	"loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr} ${ramdisk}\0" \
1609702ec00SEddy Petrișor 	"jtagboot=echo Booting using jtag...; " \
1619702ec00SEddy Petrișor 		"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
1629702ec00SEddy Petrișor 	"jtagsdboot=echo Booting loading Linux with ramdisk from SD...; " \
1639702ec00SEddy Petrișor 		"run loaduimage; run loadramdisk; run loadfdt;"\
1649702ec00SEddy Petrișor 		"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
1659702ec00SEddy Petrișor 	"boot_net_usb_start=true\0" \
1669702ec00SEddy Petrișor 	BOOTENV
1679702ec00SEddy Petrișor 
1689702ec00SEddy Petrișor #define BOOT_TARGET_DEVICES(func) \
1699702ec00SEddy Petrișor 	func(MMC, mmc, 1) \
1709702ec00SEddy Petrișor 	func(MMC, mmc, 0) \
1719702ec00SEddy Petrișor 	func(DHCP, dhcp, na)
1729702ec00SEddy Petrișor 
1739702ec00SEddy Petrișor #define CONFIG_BOOTCOMMAND \
1749702ec00SEddy Petrișor 	"run distro_bootcmd"
1759702ec00SEddy Petrișor 
1769702ec00SEddy Petrișor #include <config_distro_bootcmd.h>
1779702ec00SEddy Petrișor 
1789702ec00SEddy Petrișor /* Miscellaneous configurable options */
1799702ec00SEddy Petrișor #define CONFIG_SYS_LONGHELP	/* undef to save memory */
1809702ec00SEddy Petrișor #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
1819702ec00SEddy Petrișor #define CONFIG_SYS_PROMPT		"=> "
1829702ec00SEddy Petrișor #undef CONFIG_AUTO_COMPLETE
1839702ec00SEddy Petrișor #define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
1849702ec00SEddy Petrișor #define CONFIG_SYS_PBSIZE		\
1859702ec00SEddy Petrișor 			(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
1869702ec00SEddy Petrișor #define CONFIG_SYS_MAXARGS		16	/* max number of command args */
1879702ec00SEddy Petrișor #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
1889702ec00SEddy Petrișor #define CONFIG_CMDLINE_EDITING
1899702ec00SEddy Petrișor 
1909702ec00SEddy Petrișor #define CONFIG_CMD_MEMTEST
1919702ec00SEddy Petrișor #define CONFIG_SYS_MEMTEST_START	(DDR_BASE_ADDR)
1929702ec00SEddy Petrișor #define CONFIG_SYS_MEMTEST_END		(DDR_BASE_ADDR + 0x7C00000)
1939702ec00SEddy Petrișor 
1949702ec00SEddy Petrișor #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
1959702ec00SEddy Petrișor #define CONFIG_SYS_HZ				1000
1969702ec00SEddy Petrișor 
1979702ec00SEddy Petrișor #define CONFIG_SYS_TEXT_BASE		0x3E800000	/* SDRAM */
1989702ec00SEddy Petrișor 
1999702ec00SEddy Petrișor #ifdef CONFIG_RUN_FROM_IRAM_ONLY
2009702ec00SEddy Petrișor #define CONFIG_SYS_MALLOC_BASE		(DDR_BASE_ADDR)
2019702ec00SEddy Petrișor #endif
2029702ec00SEddy Petrișor 
2039702ec00SEddy Petrișor /*
2049702ec00SEddy Petrișor  * Stack sizes
2059702ec00SEddy Petrișor  * The stack sizes are set up in start.S using the settings below
2069702ec00SEddy Petrișor  */
2079702ec00SEddy Petrișor #define CONFIG_STACKSIZE		(128 * 1024)	/* regular stack */
2089702ec00SEddy Petrișor 
2099702ec00SEddy Petrișor #if 0
2109702ec00SEddy Petrișor /* Configure PXE */
2119702ec00SEddy Petrișor #define CONFIG_BOOTP_PXE
2129702ec00SEddy Petrișor #define CONFIG_BOOTP_PXE_CLIENTARCH	0x100
2139702ec00SEddy Petrișor #endif
2149702ec00SEddy Petrișor 
2159702ec00SEddy Petrișor /* Physical memory map */
2169702ec00SEddy Petrișor /* EVB board has 2x256 MB DDR chips, DDR0 and DDR1, u-boot is using just one */
2179702ec00SEddy Petrișor #define CONFIG_NR_DRAM_BANKS		1
2189702ec00SEddy Petrișor #define PHYS_SDRAM			(DDR_BASE_ADDR)
2199702ec00SEddy Petrișor #define PHYS_SDRAM_SIZE			(256 * 1024 * 1024)
2209702ec00SEddy Petrișor 
2219702ec00SEddy Petrișor #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
2229702ec00SEddy Petrișor #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
2239702ec00SEddy Petrișor #define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
2249702ec00SEddy Petrișor 
2259702ec00SEddy Petrișor #define CONFIG_SYS_INIT_SP_OFFSET \
2269702ec00SEddy Petrișor 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
2279702ec00SEddy Petrișor #define CONFIG_SYS_INIT_SP_ADDR \
2289702ec00SEddy Petrișor 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
2299702ec00SEddy Petrișor 
230*e856bdcfSMasahiro Yamada /* environment organization */
2319702ec00SEddy Petrișor #define CONFIG_ENV_SIZE			(8 * 1024)
2329702ec00SEddy Petrișor #define CONFIG_ENV_IS_IN_MMC
2339702ec00SEddy Petrișor 
2349702ec00SEddy Petrișor #define CONFIG_ENV_OFFSET		(12 * 64 * 1024)
2359702ec00SEddy Petrișor #define CONFIG_SYS_MMC_ENV_DEV		0
2369702ec00SEddy Petrișor 
2379702ec00SEddy Petrișor 
2389702ec00SEddy Petrișor #define CONFIG_BOOTP_BOOTFILESIZE
2399702ec00SEddy Petrișor #define CONFIG_BOOTP_BOOTPATH
2409702ec00SEddy Petrișor #define CONFIG_BOOTP_GATEWAY
2419702ec00SEddy Petrișor #define CONFIG_BOOTP_HOSTNAME
2429702ec00SEddy Petrișor 
2439702ec00SEddy Petrișor #endif
244