1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * include/configs/rcar-gen2-common.h
4  *
5  * Copyright (C) 2013,2014 Renesas Electronics Corporation
6  */
7 
8 #ifndef __RCAR_GEN2_COMMON_H
9 #define __RCAR_GEN2_COMMON_H
10 
11 #include <asm/arch/rmobile.h>
12 
13 #define CONFIG_CMDLINE_TAG
14 #define CONFIG_SETUP_MEMORY_TAGS
15 #define CONFIG_INITRD_TAG
16 
17 #ifdef CONFIG_SPL
18 #define CONFIG_SPL_TARGET	"spl/u-boot-spl.srec"
19 #endif
20 
21 #undef	CONFIG_SHOW_BOOT_PROGRESS
22 
23 #define CONFIG_ARCH_CPU_INIT
24 
25 #ifndef CONFIG_PINCTRL_PFC
26 #define CONFIG_SH_GPIO_PFC
27 #endif
28 
29 /* console */
30 #define CONFIG_SYS_PBSIZE		256
31 #define CONFIG_SYS_BAUDRATE_TABLE	{ 38400, 115200 }
32 
33 #define CONFIG_SYS_SDRAM_BASE		(RCAR_GEN2_SDRAM_BASE)
34 #define CONFIG_SYS_SDRAM_SIZE		(RCAR_GEN2_UBOOT_SDRAM_SIZE)
35 #define CONFIG_SYS_LOAD_ADDR		0x50000000
36 #define CONFIG_LOADADDR			CONFIG_SYS_LOAD_ADDR
37 
38 #define CONFIG_SYS_MONITOR_BASE		0x00000000
39 #define CONFIG_SYS_MONITOR_LEN		(256 * 1024)
40 #define CONFIG_SYS_MALLOC_LEN		(1 * 1024 * 1024)
41 #define CONFIG_SYS_BOOTMAPSZ		(8 * 1024 * 1024)
42 
43 /* ENV setting */
44 #define CONFIG_ENV_ADDR	0xC0000
45 
46 /* Common ENV setting */
47 #define CONFIG_ENV_OVERWRITE
48 #define CONFIG_ENV_SECT_SIZE	(256 * 1024)
49 #define CONFIG_ENV_OFFSET	(CONFIG_ENV_ADDR)
50 #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
51 #define CONFIG_ENV_SIZE_REDUND	(CONFIG_SYS_MONITOR_LEN)
52 
53 /* SF MTD */
54 #if defined(CONFIG_SPI_FLASH_MTD) && !defined(CONFIG_SPL_BUILD)
55 #else
56 #undef CONFIG_SPI_FLASH_MTD
57 #endif
58 
59 /* Timer */
60 #define CONFIG_TMU_TIMER
61 #define CONFIG_SYS_TIMER_COUNTS_DOWN
62 #define CONFIG_SYS_TIMER_COUNTER	(TMU_BASE + 0xc)	/* TCNT0 */
63 #define CONFIG_SYS_TIMER_RATE		(CONFIG_SYS_CLK_FREQ / 8)
64 
65 #endif	/* __RCAR_GEN2_COMMON_H */
66