1 /* 2 * (C) Copyright 2015 Google, Inc 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #ifndef __CONFIG_RK3288_COMMON_H 8 #define __CONFIG_RK3288_COMMON_H 9 10 #include <asm/arch/hardware.h> 11 #include "rockchip-common.h" 12 13 #ifndef CONFIG_SPL_BUILD 14 #undef CONFIG_BOOTCOMMAND 15 #define CONFIG_BOOTCOMMAND RKIMG_BOOTCOMMAND 16 #endif 17 18 #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY 19 #define CONFIG_SYS_MALLOC_LEN (192 << 20) 20 #define CONFIG_SYS_CBSIZE 1024 21 22 #define CONFIG_SPL_FRAMEWORK 23 #define CONFIG_SYS_TEXT_BASE 0x00200000 24 #define CONFIG_SYS_INIT_SP_ADDR 0x00400000 25 #define CONFIG_SYS_LOAD_ADDR 0x00800800 26 #define CONFIG_SPL_STACK 0x00180000 27 #define CONFIG_SPL_TEXT_BASE 0x00000000 28 #define CONFIG_SPL_MAX_SIZE 0x100000 29 30 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ 31 #define GICD_BASE 0xffc01000 32 #define GICC_BASE 0xffc02000 33 34 #define CONFIG_ROCKUSB_G_DNL_PID 0x320A 35 36 #define CONFIG_SUPPORT_EMMC_RPMB 37 38 /* MMC/SD IP block */ 39 #define CONFIG_BOUNCE_BUFFER 40 41 /* RAW SD card / eMMC locations. */ 42 #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10) 43 44 /* FAT sd card locations. */ 45 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 46 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" 47 48 #define CONFIG_SYS_SDRAM_BASE 0 49 #define SDRAM_BANK_SIZE (2UL << 30) 50 #define SDRAM_MAX_SIZE 0xfe000000 51 52 #define CONFIG_SPI 53 54 #ifndef CONFIG_SPL_BUILD 55 /* usb otg */ 56 #define CONFIG_ROCKCHIP_USB2_PHY 57 58 /* usb mass storage */ 59 #define CONFIG_USB_FUNCTION_MASS_STORAGE 60 #define CONFIG_CMD_USB_MASS_STORAGE 61 62 /* usb host support */ 63 #define ENV_MEM_LAYOUT_SETTINGS \ 64 "scriptaddr=0x00000000\0" \ 65 "pxefile_addr_r=0x00100000\0" \ 66 "fdt_addr_r=0x08300000\0" \ 67 "kernel_addr_r=0x02008000\0" \ 68 "ramdisk_addr_r=0x0a200000\0" 69 70 #include <config_distro_bootcmd.h> 71 72 /* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so 73 * limit the fdt reallocation to that */ 74 #define CONFIG_EXTRA_ENV_SETTINGS \ 75 "fdt_high=0x0fffffff\0" \ 76 "initrd_high=0x0fffffff\0" \ 77 "partitions=" PARTS_DEFAULT \ 78 ENV_MEM_LAYOUT_SETTINGS \ 79 ROCKCHIP_DEVICE_SETTINGS \ 80 RKIMG_DET_BOOTDEV \ 81 BOOTENV 82 #endif 83 84 #define CONFIG_PREBOOT 85 86 #endif 87