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_FLASH 53 #define CONFIG_SPI 54 #define CONFIG_SF_DEFAULT_SPEED 20000000 55 56 #ifndef CONFIG_SPL_BUILD 57 /* usb otg */ 58 #define CONFIG_ROCKCHIP_USB2_PHY 59 60 /* usb mass storage */ 61 #define CONFIG_USB_FUNCTION_MASS_STORAGE 62 #define CONFIG_CMD_USB_MASS_STORAGE 63 64 /* usb host support */ 65 #define ENV_MEM_LAYOUT_SETTINGS \ 66 "scriptaddr=0x00000000\0" \ 67 "pxefile_addr_r=0x00100000\0" \ 68 "fdt_addr_r=0x08300000\0" \ 69 "kernel_addr_r=0x02008000\0" \ 70 "ramdisk_addr_r=0x0a200000\0" 71 72 #include <config_distro_bootcmd.h> 73 74 /* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so 75 * limit the fdt reallocation to that */ 76 #define CONFIG_EXTRA_ENV_SETTINGS \ 77 "fdt_high=0x0fffffff\0" \ 78 "initrd_high=0x0fffffff\0" \ 79 "partitions=" PARTS_DEFAULT \ 80 ENV_MEM_LAYOUT_SETTINGS \ 81 ROCKCHIP_DEVICE_SETTINGS \ 82 RKIMG_DET_BOOTDEV \ 83 BOOTENV 84 #endif 85 86 #define CONFIG_PREBOOT 87 88 #endif 89