1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * (C) Copyright 2024 Rockchip Electronics Co., Ltd 4 * 5 */ 6 7 #ifndef __CONFIG_RK3506_COMMON_H 8 #define __CONFIG_RK3506_COMMON_H 9 10 #include "rockchip-common.h" 11 12 #define COUNTER_FREQUENCY 24000000 13 #define CONFIG_SYS_MALLOC_LEN (16 << 20) 14 #define CONFIG_SYS_CBSIZE 1024 15 #define CONFIG_SYS_TEXT_BASE 0x00200000 16 #define CONFIG_SYS_INIT_SP_ADDR 0x00400000 17 #define CONFIG_SYS_LOAD_ADDR 0x00008000 18 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ 19 #define CONFIG_SYS_SDRAM_BASE 0 20 #define SDRAM_MAX_SIZE 0xc0000000 21 #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */ 22 23 /* SPL */ 24 #define CONFIG_SPL_FRAMEWORK 25 #define CONFIG_SPL_TEXT_BASE 0x00000000 26 #define CONFIG_SPL_MAX_SIZE 0x40000 27 #define CONFIG_SPL_BSS_START_ADDR 0x001fe000 28 #define CONFIG_SPL_BSS_MAX_SIZE 0x20000 29 #define CONFIG_SPL_STACK 0x001fe000 30 31 #define GICD_BASE 0xff581000 32 #define GICC_BASE 0xff582000 33 34 /* MMC/SD IP block */ 35 #define CONFIG_BOUNCE_BUFFER 36 37 #ifndef CONFIG_SPL_BUILD 38 /* tee area when dram is 64MB size */ 39 #define CONFIG_PRAM 1024 40 41 /* usb mass storage */ 42 #define CONFIG_USB_FUNCTION_MASS_STORAGE 43 #define CONFIG_ROCKUSB_G_DNL_PID 0x350f 44 45 #define CONFIG_LIB_HW_RAND 46 #define CONFIG_PREBOOT 47 48 /* 49 * Image: 0 - 8M 50 * fdt: 8 - 9M 51 * zImage: 9 - 13M 52 * ramdisk: 13 ... 53 */ 54 #define ENV_MEM_LAYOUT_SETTINGS \ 55 "scriptaddr=0x00b00000\0" \ 56 "pxefile_addr_r=0x00c00000\0" \ 57 "fdt_addr_r=0x01f00000\0" \ 58 "kernel_addr_c=0x01100000\0" \ 59 "kernel_addr_r=0x00108000\0" \ 60 "ramdisk_addr_r=0x02000000\0" 61 62 #include <config_distro_bootcmd.h> 63 64 #define CONFIG_EXTRA_ENV_SETTINGS \ 65 ENV_MEM_LAYOUT_SETTINGS \ 66 "partitions=" PARTS_RKIMG \ 67 ROCKCHIP_DEVICE_SETTINGS \ 68 RKIMG_DET_BOOTDEV \ 69 BOOTENV 70 71 #undef RKIMG_BOOTCOMMAND 72 #ifdef CONFIG_FIT_SIGNATURE 73 #define RKIMG_BOOTCOMMAND \ 74 "boot_fit;" 75 #else 76 #define RKIMG_BOOTCOMMAND \ 77 "boot_fit;" \ 78 "boot_android ${devtype} ${devnum};" 79 #endif 80 81 #endif 82 #endif 83