rk3288_common.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2015 Google, Inc
  4. */
  5. #ifndef __CONFIG_RK3288_COMMON_H
  6. #define __CONFIG_RK3288_COMMON_H
  7. #include <asm/arch-rockchip/hardware.h>
  8. #include "rockchip-common.h"
  9. #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
  10. #define CONFIG_SYS_MALLOC_LEN (32 << 20)
  11. #define CONFIG_SYS_CBSIZE 1024
  12. #define CONFIG_SYS_TIMER_RATE (24 * 1000 * 1000)
  13. #define CONFIG_SYS_TIMER_BASE 0xff810020 /* TIMER7 */
  14. #define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
  15. #ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM
  16. /* Bootrom will load u-boot binary to 0x0 once return from SPL */
  17. #endif
  18. #define CONFIG_SYS_INIT_SP_ADDR 0x00100000
  19. #define CONFIG_SYS_LOAD_ADDR 0x00800800
  20. #define CONFIG_SPL_STACK 0xff718000
  21. /* RAW SD card / eMMC locations. */
  22. #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
  23. /* FAT sd card locations. */
  24. #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
  25. #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
  26. #define CONFIG_SYS_SDRAM_BASE 0
  27. #define SDRAM_BANK_SIZE (2UL << 30)
  28. #define SDRAM_MAX_SIZE 0xfe000000
  29. #ifndef CONFIG_SPL_BUILD
  30. /* usb otg */
  31. /* usb mass storage */
  32. #define CONFIG_CMD_USB_MASS_STORAGE
  33. /* usb host support */
  34. #define ENV_MEM_LAYOUT_SETTINGS \
  35. "scriptaddr=0x00000000\0" \
  36. "pxefile_addr_r=0x00100000\0" \
  37. "fdt_addr_r=0x01f00000\0" \
  38. "kernel_addr_r=0x02000000\0" \
  39. "ramdisk_addr_r=0x04000000\0"
  40. #include <config_distro_bootcmd.h>
  41. /* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so
  42. * limit the fdt reallocation to that */
  43. #define CONFIG_EXTRA_ENV_SETTINGS \
  44. "fdt_high=0x0fffffff\0" \
  45. "initrd_high=0x0fffffff\0" \
  46. "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
  47. "partitions=" PARTS_DEFAULT \
  48. ENV_MEM_LAYOUT_SETTINGS \
  49. ROCKCHIP_DEVICE_SETTINGS \
  50. BOOTENV
  51. #endif
  52. #define CONFIG_PREBOOT
  53. #endif