rk3399_common.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2016 Rockchip Electronics Co., Ltd
  4. */
  5. #ifndef __CONFIG_RK3399_COMMON_H
  6. #define __CONFIG_RK3399_COMMON_H
  7. #include "rockchip-common.h"
  8. #define CONFIG_SYS_CBSIZE 1024
  9. #define CONFIG_SKIP_LOWLEVEL_INIT
  10. #define COUNTER_FREQUENCY 24000000
  11. #define CONFIG_ROCKCHIP_STIMER_BASE 0xff8680a0
  12. #define CONFIG_IRAM_BASE 0xff8c0000
  13. #define CONFIG_SYS_INIT_SP_ADDR 0x00300000
  14. #define CONFIG_SYS_LOAD_ADDR 0x00800800
  15. #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_TPL_BOOTROM_SUPPORT)
  16. #define CONFIG_SPL_STACK 0x00400000
  17. #define CONFIG_SPL_MAX_SIZE 0x40000
  18. #define CONFIG_SPL_BSS_START_ADDR 0x00400000
  19. #define CONFIG_SPL_BSS_MAX_SIZE 0x2000
  20. #else
  21. #define CONFIG_SPL_STACK 0xff8effff
  22. #define CONFIG_SPL_MAX_SIZE 0x30000 - 0x2000
  23. /* BSS setup */
  24. #define CONFIG_SPL_BSS_START_ADDR 0xff8e0000
  25. #define CONFIG_SPL_BSS_MAX_SIZE 0x10000
  26. #endif
  27. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */
  28. /* MMC/SD IP block */
  29. #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
  30. /* RAW SD card / eMMC locations. */
  31. /* FAT sd card locations. */
  32. #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
  33. #define CONFIG_SYS_SDRAM_BASE 0
  34. #define SDRAM_MAX_SIZE 0xf8000000
  35. #ifndef CONFIG_SPL_BUILD
  36. #define ENV_MEM_LAYOUT_SETTINGS \
  37. "scriptaddr=0x00500000\0" \
  38. "pxefile_addr_r=0x00600000\0" \
  39. "fdt_addr_r=0x01f00000\0" \
  40. "kernel_addr_r=0x02080000\0" \
  41. "ramdisk_addr_r=0x06000000\0"
  42. #ifndef ROCKCHIP_DEVICE_SETTINGS
  43. #define ROCKCHIP_DEVICE_SETTINGS
  44. #endif
  45. #include <config_distro_bootcmd.h>
  46. #define CONFIG_EXTRA_ENV_SETTINGS \
  47. ENV_MEM_LAYOUT_SETTINGS \
  48. "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
  49. "partitions=" PARTS_DEFAULT \
  50. ROCKCHIP_DEVICE_SETTINGS \
  51. BOOTENV
  52. #endif
  53. /* enable usb config for usb ether */
  54. #endif