1 /* 2 * (C) Copyright 2017 Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #ifndef __CONFIG_RK3308_COMMON_H 8 #define __CONFIG_RK3308_COMMON_H 9 10 #include "rockchip-common.h" 11 12 #define CONFIG_SYS_MALLOC_LEN (10 << 20) 13 #define CONFIG_SYS_CBSIZE 1024 14 #define CONFIG_SKIP_LOWLEVEL_INIT 15 #define CONFIG_SYS_MAX_NAND_DEVICE 1 16 #define CONFIG_SYS_NAND_ONFI_DETECTION 17 #define CONFIG_SYS_NAND_PAGE_SIZE 2048 18 #define CONFIG_SYS_NAND_PAGE_COUNT 64 19 #define CONFIG_SYS_NAND_SIZE (256 * 1024 * 1024) 20 #define CONFIG_SPL_FRAMEWORK 21 #define CONFIG_SPL_TEXT_BASE 0x00000000 22 #define CONFIG_SPL_MAX_SIZE 0x20000 23 #define CONFIG_SPL_BSS_START_ADDR 0x00400000 24 #define CONFIG_SPL_BSS_MAX_SIZE 0x2000 25 26 #define CONFIG_SYS_NS16550_MEM32 27 28 #define CONFIG_SYS_TEXT_BASE 0x00600000 29 #define CONFIG_SYS_INIT_SP_ADDR 0x00800000 30 #define CONFIG_SYS_LOAD_ADDR 0x00C00800 31 #define CONFIG_SPL_STACK 0x00400000 32 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ 33 34 #define COUNTER_FREQUENCY 24000000 35 36 #define GICD_BASE 0xff581000 37 #define GICC_BASE 0xff582000 38 39 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ 40 41 /* MMC/SD IP block */ 42 #define CONFIG_BOUNCE_BUFFER 43 44 #define CONFIG_SYS_SDRAM_BASE 0 45 #define SDRAM_MAX_SIZE 0xff000000 46 #define SDRAM_BANK_SIZE (2UL << 30) 47 #ifdef CONFIG_DM_DVFS 48 #define CONFIG_PREBOOT "dvfs repeat" 49 #else 50 #define CONFIG_PREBOOT 51 #endif 52 53 #ifndef CONFIG_SPL_BUILD 54 55 /* usb mass storage */ 56 #define CONFIG_USB_FUNCTION_MASS_STORAGE 57 #define CONFIG_ROCKUSB_G_DNL_PID 0x330d 58 59 #ifdef CONFIG_ARM64 60 #define ENV_MEM_LAYOUT_SETTINGS \ 61 "scriptaddr=0x00500000\0" \ 62 "pxefile_addr_r=0x00600000\0" \ 63 "fdt_addr_r=0x01f00000\0" \ 64 "kernel_addr_no_bl32_r=0x00280000\0" \ 65 "kernel_addr_r=0x00680000\0" \ 66 "kernel_addr_c=0x02480000\0" \ 67 "ramdisk_addr_r=0x04000000\0" 68 #else 69 #define ENV_MEM_LAYOUT_SETTINGS \ 70 "scriptaddr=0x00500000\0" \ 71 "pxefile_addr_r=0x00600000\0" \ 72 "fdt_addr_r=0x02f00000\0" \ 73 "kernel_addr_r=0x00058000\0" \ 74 "kernel_addr_c=0x2008000\0" \ 75 "ramdisk_addr_r=0x03080000\0" 76 #endif 77 78 #include <config_distro_bootcmd.h> 79 #define CONFIG_EXTRA_ENV_SETTINGS \ 80 ENV_MEM_LAYOUT_SETTINGS \ 81 "partitions=" PARTS_DEFAULT \ 82 ROCKCHIP_DEVICE_SETTINGS \ 83 RKIMG_DET_BOOTDEV \ 84 BOOTENV_SHARED_RKNAND \ 85 BOOTENV 86 87 #endif 88 89 #endif 90