xref: /rk3399_rockchip-uboot/include/configs/db-88f6820-amc.h (revision c0def248caa5e2e6ed63249d3713830bd27e31e6)
1*c0def248SChris Packham /*
2*c0def248SChris Packham  * Copyright (C) 2014 Stefan Roese <sr@denx.de>
3*c0def248SChris Packham  *
4*c0def248SChris Packham  * SPDX-License-Identifier:	GPL-2.0+
5*c0def248SChris Packham  */
6*c0def248SChris Packham 
7*c0def248SChris Packham #ifndef _CONFIG_DB_88F6820_AMC_H
8*c0def248SChris Packham #define _CONFIG_DB_88F6820_AMC_H
9*c0def248SChris Packham 
10*c0def248SChris Packham /*
11*c0def248SChris Packham  * High Level Configuration Options (easy to change)
12*c0def248SChris Packham  */
13*c0def248SChris Packham 
14*c0def248SChris Packham #define CONFIG_DISPLAY_BOARDINFO_LATE
15*c0def248SChris Packham 
16*c0def248SChris Packham /*
17*c0def248SChris Packham  * TEXT_BASE needs to be below 16MiB, since this area is scrubbed
18*c0def248SChris Packham  * for DDR ECC byte filling in the SPL before loading the main
19*c0def248SChris Packham  * U-Boot into it.
20*c0def248SChris Packham  */
21*c0def248SChris Packham #define	CONFIG_SYS_TEXT_BASE	0x00800000
22*c0def248SChris Packham #define CONFIG_SYS_TCLK		200000000	/* 200MHz */
23*c0def248SChris Packham 
24*c0def248SChris Packham /*
25*c0def248SChris Packham  * Commands configuration
26*c0def248SChris Packham  */
27*c0def248SChris Packham #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
28*c0def248SChris Packham #define CONFIG_CMD_ENV
29*c0def248SChris Packham #define CONFIG_CMD_PCI
30*c0def248SChris Packham 
31*c0def248SChris Packham /* I2C */
32*c0def248SChris Packham #define CONFIG_SYS_I2C
33*c0def248SChris Packham #define CONFIG_SYS_I2C_MVTWSI
34*c0def248SChris Packham #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
35*c0def248SChris Packham #define CONFIG_SYS_I2C_SLAVE		0x0
36*c0def248SChris Packham #define CONFIG_SYS_I2C_SPEED		100000
37*c0def248SChris Packham 
38*c0def248SChris Packham /* SPI NOR flash default params, used by sf commands */
39*c0def248SChris Packham #define CONFIG_SF_DEFAULT_BUS		1
40*c0def248SChris Packham #define CONFIG_SF_DEFAULT_SPEED		1000000
41*c0def248SChris Packham #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_3
42*c0def248SChris Packham 
43*c0def248SChris Packham /* Partition support */
44*c0def248SChris Packham #define CONFIG_DOS_PARTITION
45*c0def248SChris Packham #define CONFIG_EFI_PARTITION
46*c0def248SChris Packham 
47*c0def248SChris Packham /* Additional FS support/configuration */
48*c0def248SChris Packham #define CONFIG_SUPPORT_VFAT
49*c0def248SChris Packham 
50*c0def248SChris Packham /* USB/EHCI configuration */
51*c0def248SChris Packham #define CONFIG_EHCI_IS_TDI
52*c0def248SChris Packham 
53*c0def248SChris Packham /* Environment in SPI NOR flash */
54*c0def248SChris Packham #define CONFIG_ENV_IS_IN_SPI_FLASH
55*c0def248SChris Packham #define CONFIG_ENV_SPI_BUS		1
56*c0def248SChris Packham #define CONFIG_ENV_OFFSET		(1 << 20) /* 1MiB in */
57*c0def248SChris Packham #define CONFIG_ENV_SIZE			(64 << 10) /* 64KiB */
58*c0def248SChris Packham #define CONFIG_ENV_SECT_SIZE		(256 << 10) /* 256KiB sectors */
59*c0def248SChris Packham 
60*c0def248SChris Packham #define CONFIG_PHY_MARVELL		/* there is a marvell phy */
61*c0def248SChris Packham #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
62*c0def248SChris Packham 
63*c0def248SChris Packham /* PCIe support */
64*c0def248SChris Packham #ifndef CONFIG_SPL_BUILD
65*c0def248SChris Packham #define CONFIG_PCI
66*c0def248SChris Packham #define CONFIG_PCI_MVEBU
67*c0def248SChris Packham #define CONFIG_PCI_PNP
68*c0def248SChris Packham #define CONFIG_PCI_SCAN_SHOW
69*c0def248SChris Packham #endif
70*c0def248SChris Packham 
71*c0def248SChris Packham #define CONFIG_SYS_CONSOLE_INFO_QUIET	/* don't print console @ startup */
72*c0def248SChris Packham #define CONFIG_SYS_ALT_MEMTEST
73*c0def248SChris Packham 
74*c0def248SChris Packham /* Keep device tree and initrd in lower memory so the kernel can access them */
75*c0def248SChris Packham #define CONFIG_EXTRA_ENV_SETTINGS	\
76*c0def248SChris Packham 	"fdt_high=0x10000000\0"		\
77*c0def248SChris Packham 	"initrd_high=0x10000000\0"
78*c0def248SChris Packham 
79*c0def248SChris Packham /* SPL */
80*c0def248SChris Packham /*
81*c0def248SChris Packham  * Select the boot device here
82*c0def248SChris Packham  *
83*c0def248SChris Packham  * Currently supported are:
84*c0def248SChris Packham  * SPL_BOOT_SPI_NOR_FLASH	- Booting via SPI NOR flash
85*c0def248SChris Packham  *
86*c0def248SChris Packham  * MMC is not populated on this board.
87*c0def248SChris Packham  * NAND support may be added in the future.
88*c0def248SChris Packham  */
89*c0def248SChris Packham #define SPL_BOOT_SPI_NOR_FLASH		1
90*c0def248SChris Packham #define CONFIG_SPL_BOOT_DEVICE		SPL_BOOT_SPI_NOR_FLASH
91*c0def248SChris Packham 
92*c0def248SChris Packham /* Defines for SPL */
93*c0def248SChris Packham #define CONFIG_SPL_FRAMEWORK
94*c0def248SChris Packham #define CONFIG_SPL_SIZE			(140 << 10)
95*c0def248SChris Packham #define CONFIG_SPL_TEXT_BASE		0x40000030
96*c0def248SChris Packham #define CONFIG_SPL_MAX_SIZE		(CONFIG_SPL_SIZE - 0x0030)
97*c0def248SChris Packham 
98*c0def248SChris Packham #define CONFIG_SPL_BSS_START_ADDR	(0x40000000 + CONFIG_SPL_SIZE)
99*c0def248SChris Packham #define CONFIG_SPL_BSS_MAX_SIZE		(16 << 10)
100*c0def248SChris Packham 
101*c0def248SChris Packham #ifdef CONFIG_SPL_BUILD
102*c0def248SChris Packham #define CONFIG_SYS_MALLOC_SIMPLE
103*c0def248SChris Packham #endif
104*c0def248SChris Packham 
105*c0def248SChris Packham #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
106*c0def248SChris Packham #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
107*c0def248SChris Packham 
108*c0def248SChris Packham #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
109*c0def248SChris Packham /* SPL related SPI defines */
110*c0def248SChris Packham #define CONFIG_SPL_SPI_LOAD
111*c0def248SChris Packham #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x24000
112*c0def248SChris Packham #define CONFIG_SYS_U_BOOT_OFFS		CONFIG_SYS_SPI_U_BOOT_OFFS
113*c0def248SChris Packham #endif
114*c0def248SChris Packham 
115*c0def248SChris Packham /*
116*c0def248SChris Packham  * mv-common.h should be defined after CMD configs since it used them
117*c0def248SChris Packham  * to enable certain macros
118*c0def248SChris Packham  */
119*c0def248SChris Packham #include "mv-common.h"
120*c0def248SChris Packham #undef CONFIG_SYS_MAXARGS
121*c0def248SChris Packham #define CONFIG_SYS_MAXARGS 96
122*c0def248SChris Packham 
123*c0def248SChris Packham #endif /* _CONFIG_DB_88F6820_AMC_H */
124