1a13110a9SKlaus Goger /*
2a13110a9SKlaus Goger  * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
3a13110a9SKlaus Goger  *
4a13110a9SKlaus Goger  * SPDX-License-Identifier:     GPL-2.0+
5a13110a9SKlaus Goger  */
6a13110a9SKlaus Goger 
7a13110a9SKlaus Goger #ifndef __PUMA_RK3399_H
8a13110a9SKlaus Goger #define __PUMA_RK3399_H
9a13110a9SKlaus Goger 
10a13110a9SKlaus Goger #include <configs/rk3399_common.h>
11a13110a9SKlaus Goger 
12a13110a9SKlaus Goger /*
13a13110a9SKlaus Goger  * SPL @ 32kB for ~130kB
14a13110a9SKlaus Goger  * ENV @ 240KB for 8kB
15a13110a9SKlaus Goger  * FIT payload (ATF, U-Boot, FDT) @ 256kB
16a13110a9SKlaus Goger  */
17a13110a9SKlaus Goger #undef CONFIG_ENV_OFFSET
18a13110a9SKlaus Goger #define CONFIG_ENV_OFFSET (240 * 1024)
19a13110a9SKlaus Goger 
20*b5557ffcSKlaus Goger #if defined(CONFIG_ENV_IS_IN_MMC)
21a13110a9SKlaus Goger #define CONFIG_SYS_MMC_ENV_DEV 1
22*b5557ffcSKlaus Goger #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
23*b5557ffcSKlaus Goger #define CONFIG_ENV_SECT_SIZE		(8 * 1024)
24*b5557ffcSKlaus Goger #define CONFIG_ENV_SPI_BUS		CONFIG_SF_DEFAULT_BUS
25*b5557ffcSKlaus Goger #define CONFIG_ENV_SPI_CS		CONFIG_SF_DEFAULT_CS
26*b5557ffcSKlaus Goger #define CONFIG_ENV_SPI_MODE		CONFIG_SF_DEFAULT_MODE
27*b5557ffcSKlaus Goger #define CONFIG_ENV_SPI_MAX_HZ	CONFIG_SF_DEFAULT_SPEED
28*b5557ffcSKlaus Goger #endif
29a13110a9SKlaus Goger 
30a13110a9SKlaus Goger #define SDRAM_BANK_SIZE			(2UL << 30)
31a13110a9SKlaus Goger 
329415b9a7SPhilipp Tomsich #define CONFIG_MISC_INIT_R
339415b9a7SPhilipp Tomsich #define CONFIG_SERIAL_TAG
349415b9a7SPhilipp Tomsich #define CONFIG_ENV_OVERWRITE
359415b9a7SPhilipp Tomsich 
366c53d680SPhilipp Tomsich #define CONFIG_BMP_16BPP
376c53d680SPhilipp Tomsich #define CONFIG_BMP_24BPP
386c53d680SPhilipp Tomsich #define CONFIG_BMP_32BPP
396c53d680SPhilipp Tomsich 
40a13110a9SKlaus Goger #endif
41