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 0x03f00000 26 #define CONFIG_SPL_MAX_SIZE 0x40000 27 #define CONFIG_SPL_BSS_START_ADDR 0x03fe0000 28 #define CONFIG_SPL_BSS_MAX_SIZE 0x20000 29 #define CONFIG_SPL_STACK 0x03fe0000 30 31 #define GICD_BASE 0xff581000 32 #define GICC_BASE 0xff582000 33 34 #define ATAGS_OFFSET 0x62000 35 #define ATAGS_SIZE 0x01000 36 37 /* MMC/SD IP block */ 38 #define CONFIG_BOUNCE_BUFFER 39 40 #ifndef CONFIG_SPL_BUILD 41 /* tee area when dram is 64MB size */ 42 #define CONFIG_PRAM 1024 43 44 /* usb mass storage */ 45 #define CONFIG_USB_FUNCTION_MASS_STORAGE 46 #define CONFIG_ROCKUSB_G_DNL_PID 0x350f 47 48 #define CONFIG_LIB_HW_RAND 49 #define CONFIG_PREBOOT 50 51 /* 52 * fdt: 396K - 524K 53 * Image: 1M+32k - 16M 54 * zImage: 16M - 24M 55 * ramdisk: 24M - ... 56 */ 57 #define ENV_MEM_LAYOUT_SETTINGS \ 58 "scriptaddr=0x00b00000\0" \ 59 "pxefile_addr_r=0x00c00000\0" \ 60 "fdt_addr_r=0x00063000\0" \ 61 "kernel_addr_r=0x00108000\0" \ 62 "kernel_addr_c=0x01100000\0" \ 63 "ramdisk_addr_r=0x01800000\0" 64 65 #include <config_distro_bootcmd.h> 66 67 #define CONFIG_EXTRA_ENV_SETTINGS \ 68 ENV_MEM_LAYOUT_SETTINGS \ 69 "partitions=" PARTS_RKIMG \ 70 ROCKCHIP_DEVICE_SETTINGS \ 71 RKIMG_DET_BOOTDEV \ 72 BOOTENV 73 74 #undef RKIMG_BOOTCOMMAND 75 #ifdef CONFIG_FIT_SIGNATURE 76 #define RKIMG_BOOTCOMMAND \ 77 "boot_fit;" 78 #else 79 #define RKIMG_BOOTCOMMAND \ 80 "boot_fit;" \ 81 "boot_android ${devtype} ${devnum};" 82 #endif 83 84 #endif 85 #endif 86