db-mv784mp-gp.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /*
  2. * Copyright (C) 2014 Stefan Roese <sr@denx.de>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _CONFIG_DB_MV7846MP_GP_H
  7. #define _CONFIG_DB_MV7846MP_GP_H
  8. /*
  9. * High Level Configuration Options (easy to change)
  10. */
  11. #define CONFIG_ARMADA_XP /* SOC Family Name */
  12. #define CONFIG_DB_784MP_GP /* Board target name for DDR training */
  13. #ifdef CONFIG_SPL_BUILD
  14. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  15. #endif
  16. #define CONFIG_DISPLAY_BOARDINFO_LATE
  17. /*
  18. * TEXT_BASE needs to be below 16MiB, since this area is scrubbed
  19. * for DDR ECC byte filling in the SPL before loading the main
  20. * U-Boot into it.
  21. */
  22. #define CONFIG_SYS_TEXT_BASE 0x00800000
  23. #define CONFIG_SYS_TCLK 250000000 /* 250MHz */
  24. /*
  25. * Commands configuration
  26. */
  27. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  28. #define CONFIG_CMD_DHCP
  29. #define CONFIG_CMD_ENV
  30. #define CONFIG_CMD_I2C
  31. #define CONFIG_CMD_IDE
  32. #define CONFIG_CMD_NAND
  33. #define CONFIG_CMD_PCI
  34. #define CONFIG_CMD_PING
  35. #define CONFIG_CMD_SF
  36. #define CONFIG_CMD_SPI
  37. #define CONFIG_CMD_TFTPPUT
  38. #define CONFIG_CMD_TIME
  39. /* I2C */
  40. #define CONFIG_SYS_I2C
  41. #define CONFIG_SYS_I2C_MVTWSI
  42. #define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
  43. #define CONFIG_SYS_I2C_SLAVE 0x0
  44. #define CONFIG_SYS_I2C_SPEED 100000
  45. /* USB/EHCI configuration */
  46. #define CONFIG_EHCI_IS_TDI
  47. #define CONFIG_USB_MAX_CONTROLLER_COUNT 3
  48. /* SPI NOR flash default params, used by sf commands */
  49. #define CONFIG_SF_DEFAULT_SPEED 1000000
  50. #define CONFIG_SF_DEFAULT_MODE SPI_MODE_3
  51. /* Environment in SPI NOR flash */
  52. #define CONFIG_ENV_IS_IN_SPI_FLASH
  53. #define CONFIG_ENV_OFFSET (1 << 20) /* 1MiB in */
  54. #define CONFIG_ENV_SIZE (64 << 10) /* 64KiB */
  55. #define CONFIG_ENV_SECT_SIZE (64 << 10) /* 64KiB sectors */
  56. #define CONFIG_PHY_MARVELL /* there is a marvell phy */
  57. #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */
  58. #define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */
  59. #define CONFIG_SYS_ALT_MEMTEST
  60. /* SATA support */
  61. #ifdef CONFIG_CMD_IDE
  62. #define __io
  63. #define CONFIG_IDE_PREINIT
  64. #define CONFIG_MVSATA_IDE
  65. /* Needs byte-swapping for ATA data register */
  66. #define CONFIG_IDE_SWAP_IO
  67. #define CONFIG_SYS_ATA_REG_OFFSET 0x0100 /* Offset for register access */
  68. #define CONFIG_SYS_ATA_DATA_OFFSET 0x0100 /* Offset for data I/O */
  69. #define CONFIG_SYS_ATA_ALT_OFFSET 0x0100
  70. /* Each 8-bit ATA register is aligned to a 4-bytes address */
  71. #define CONFIG_SYS_ATA_STRIDE 4
  72. /* CONFIG_CMD_IDE requires some #defines for ATA registers */
  73. #define CONFIG_SYS_IDE_MAXBUS 2
  74. #define CONFIG_SYS_IDE_MAXDEVICE CONFIG_SYS_IDE_MAXBUS
  75. /* ATA registers base is at SATA controller base */
  76. #define CONFIG_SYS_ATA_BASE_ADDR MVEBU_AXP_SATA_BASE
  77. #define CONFIG_SYS_ATA_IDE0_OFFSET 0x2000
  78. #define CONFIG_SYS_ATA_IDE1_OFFSET 0x4000
  79. #define CONFIG_DOS_PARTITION
  80. #endif /* CONFIG_CMD_IDE */
  81. /* PCIe support */
  82. #ifndef CONFIG_SPL_BUILD
  83. #define CONFIG_PCI
  84. #define CONFIG_PCI_MVEBU
  85. #define CONFIG_PCI_PNP
  86. #define CONFIG_PCI_SCAN_SHOW
  87. #endif
  88. /* NAND */
  89. #define CONFIG_SYS_NAND_USE_FLASH_BBT
  90. #define CONFIG_SYS_NAND_ONFI_DETECTION
  91. /*
  92. * mv-common.h should be defined after CMD configs since it used them
  93. * to enable certain macros
  94. */
  95. #include "mv-common.h"
  96. /*
  97. * Memory layout while starting into the bin_hdr via the
  98. * BootROM:
  99. *
  100. * 0x4000.4000 - 0x4003.4000 headers space (192KiB)
  101. * 0x4000.4030 bin_hdr start address
  102. * 0x4003.4000 - 0x4004.7c00 BootROM memory allocations (15KiB)
  103. * 0x4007.fffc BootROM stack top
  104. *
  105. * The address space between 0x4007.fffc and 0x400f.fff is not locked in
  106. * L2 cache thus cannot be used.
  107. */
  108. /* SPL */
  109. /* Defines for SPL */
  110. #define CONFIG_SPL_FRAMEWORK
  111. #define CONFIG_SPL_TEXT_BASE 0x40004030
  112. #define CONFIG_SPL_MAX_SIZE ((128 << 10) - 0x4030)
  113. #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + (128 << 10))
  114. #define CONFIG_SPL_BSS_MAX_SIZE (16 << 10)
  115. #ifdef CONFIG_SPL_BUILD
  116. #define CONFIG_SYS_MALLOC_SIMPLE
  117. #endif
  118. #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10))
  119. #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4)
  120. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  121. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  122. #define CONFIG_SPL_SERIAL_SUPPORT
  123. #define CONFIG_SPL_I2C_SUPPORT
  124. /* SPL related SPI defines */
  125. #define CONFIG_SPL_SPI_SUPPORT
  126. #define CONFIG_SPL_SPI_FLASH_SUPPORT
  127. #define CONFIG_SPL_SPI_LOAD
  128. #define CONFIG_SPL_SPI_BUS 0
  129. #define CONFIG_SPL_SPI_CS 0
  130. #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
  131. #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS
  132. /* Enable DDR support in SPL (DDR3 training from Marvell bin_hdr) */
  133. #define CONFIG_SYS_MVEBU_DDR_AXP
  134. #define CONFIG_SPD_EEPROM 0x4e
  135. #endif /* _CONFIG_DB_MV7846MP_GP_H */