kontron_sl28.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. #ifndef __SL28_H
  3. #define __SL28_H
  4. #include <asm/arch/stream_id_lsch3.h>
  5. #include <asm/arch/config.h>
  6. #include <asm/arch/soc.h>
  7. /* we don't use hwconfig but this has to be defined.. */
  8. #define HWCONFIG_BUFFER_SIZE 256
  9. /* we don't have secure memory unless we have a BL31 */
  10. #ifndef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
  11. #undef CONFIG_SYS_MEM_RESERVE_SECURE
  12. #endif
  13. /* DDR */
  14. #define CONFIG_DDR_ECC
  15. #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
  16. #define CONFIG_MEM_INIT_VALUE 0xdeadbeef
  17. #define CONFIG_VERY_BIG_RAM
  18. #define CONFIG_CHIP_SELECTS_PER_CTRL 4
  19. #define CONFIG_DIMM_SLOTS_PER_CTLR 1
  20. #define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000
  21. #define CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY 0
  22. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
  23. #define CONFIG_SYS_DDR_BLOCK2_BASE 0x2080000000ULL
  24. #define CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS 1
  25. /* early stack pointer */
  26. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_FSL_OCRAM_BASE + 0xeff0)
  27. /* memtest command */
  28. #define CONFIG_SYS_MEMTEST_START 0x80000000
  29. #define CONFIG_SYS_MEMTEST_END 0x9fffffff
  30. /* SMP */
  31. #define CPU_RELEASE_ADDR secondary_boot_addr
  32. /* generic timer */
  33. #define COUNTER_FREQUENCY 25000000
  34. /* size of malloc() pool */
  35. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2048 * 1024)
  36. /* early heap for SPL DM */
  37. #define CONFIG_MALLOC_F_ADDR CONFIG_SYS_FSL_OCRAM_BASE
  38. /* serial port */
  39. #define CONFIG_SYS_NS16550_SERIAL
  40. #define CONFIG_SYS_NS16550_REG_SIZE 1
  41. #define CONFIG_SYS_NS16550_CLK (get_bus_freq(0) / 2)
  42. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  43. #define CONFIG_SYS_CLK_FREQ 100000000
  44. #define CONFIG_DDR_CLK_FREQ 100000000
  45. #define COUNTER_FREQUENCY_REAL (CONFIG_SYS_CLK_FREQ / 4)
  46. /* MMC */
  47. #ifdef CONFIG_MMC
  48. #define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33
  49. #endif
  50. /* ethernet */
  51. #define CONFIG_SYS_RX_ETH_BUFFER 8
  52. /* SPL */
  53. #define CONFIG_SPL_BSS_START_ADDR 0x80100000
  54. #define CONFIG_SPL_BSS_MAX_SIZE 0x00100000
  55. #define CONFIG_SPL_MAX_SIZE 0x20000
  56. #define CONFIG_SPL_STACK (CONFIG_SYS_FSL_OCRAM_BASE + 0x9ff0)
  57. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x00100000
  58. #define CONFIG_SYS_SPL_MALLOC_START 0x80200000
  59. #define CONFIG_SYS_MONITOR_LEN (1024 * 1024)
  60. /* environment */
  61. /* see include/configs/ti_armv7_common.h */
  62. #define CONFIG_SYS_LOAD_ADDR 0x82000000
  63. #define ENV_MEM_LAYOUT_SETTINGS \
  64. "loadaddr=0x82000000\0" \
  65. "kernel_addr_r=0x82000000\0" \
  66. "fdt_addr_r=0x88000000\0" \
  67. "bootm_size=0x10000000\0" \
  68. "pxefile_addr_r=0x80100000\0" \
  69. "scriptaddr=0x80000000\0" \
  70. "ramdisk_addr_r=0x88080000\0"
  71. #define BOOT_TARGET_DEVICES(func) \
  72. func(MMC, mmc, 1) \
  73. func(MMC, mmc, 0) \
  74. func(NVME, nvme, 0) \
  75. func(USB, usb, 0) \
  76. func(DHCP, dhcp, 0) \
  77. func(PXE, pxe, 0)
  78. #include <config_distro_bootcmd.h>
  79. #define CONFIG_EXTRA_ENV_SETTINGS \
  80. "env_addr=0x203e0004\0" \
  81. "envload=env import -d -b ${env_addr}\0" \
  82. "install_rcw=source 20200000\0" \
  83. "fdtfile=freescale/fsl-ls1028a-kontron-sl28.dtb\0" \
  84. ENV_MEM_LAYOUT_SETTINGS \
  85. BOOTENV
  86. #endif /* __SL28_H */