db-88f6820-gp.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /*
  2. * Copyright (C) 2014 Stefan Roese <sr@denx.de>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _CONFIG_DB_88F6820_GP_H
  7. #define _CONFIG_DB_88F6820_GP_H
  8. /*
  9. * High Level Configuration Options (easy to change)
  10. */
  11. #define CONFIG_DISPLAY_BOARDINFO_LATE
  12. /*
  13. * TEXT_BASE needs to be below 16MiB, since this area is scrubbed
  14. * for DDR ECC byte filling in the SPL before loading the main
  15. * U-Boot into it.
  16. */
  17. #define CONFIG_SYS_TEXT_BASE 0x00800000
  18. #define CONFIG_SYS_TCLK 250000000 /* 250MHz */
  19. /*
  20. * Commands configuration
  21. */
  22. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  23. #define CONFIG_CMD_ENV
  24. #define CONFIG_CMD_PCI
  25. #define CONFIG_SCSI
  26. /* I2C */
  27. #define CONFIG_SYS_I2C
  28. #define CONFIG_SYS_I2C_MVTWSI
  29. #define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
  30. #define CONFIG_SYS_I2C_SLAVE 0x0
  31. #define CONFIG_SYS_I2C_SPEED 100000
  32. /* SPI NOR flash default params, used by sf commands */
  33. #define CONFIG_SF_DEFAULT_SPEED 1000000
  34. #define CONFIG_SF_DEFAULT_MODE SPI_MODE_3
  35. /*
  36. * SDIO/MMC Card Configuration
  37. */
  38. #define CONFIG_MMC_SDMA
  39. #define CONFIG_GENERIC_MMC
  40. #define CONFIG_MV_SDHCI
  41. #define CONFIG_SYS_MMC_BASE MVEBU_SDIO_BASE
  42. /*
  43. * SATA/SCSI/AHCI configuration
  44. */
  45. #define CONFIG_LIBATA
  46. #define CONFIG_SCSI_AHCI
  47. #define CONFIG_SCSI_AHCI_PLAT
  48. #define CONFIG_SYS_SCSI_MAX_SCSI_ID 2
  49. #define CONFIG_SYS_SCSI_MAX_LUN 1
  50. #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
  51. CONFIG_SYS_SCSI_MAX_LUN)
  52. /* Partition support */
  53. #define CONFIG_DOS_PARTITION
  54. #define CONFIG_EFI_PARTITION
  55. /* Additional FS support/configuration */
  56. #define CONFIG_SUPPORT_VFAT
  57. /* USB/EHCI configuration */
  58. #define CONFIG_EHCI_IS_TDI
  59. /* Environment in SPI NOR flash */
  60. #define CONFIG_ENV_IS_IN_SPI_FLASH
  61. #define CONFIG_ENV_OFFSET (1 << 20) /* 1MiB in */
  62. #define CONFIG_ENV_SIZE (64 << 10) /* 64KiB */
  63. #define CONFIG_ENV_SECT_SIZE (256 << 10) /* 256KiB sectors */
  64. #define CONFIG_PHY_MARVELL /* there is a marvell phy */
  65. #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */
  66. /* PCIe support */
  67. #ifndef CONFIG_SPL_BUILD
  68. #define CONFIG_PCI_MVEBU
  69. #define CONFIG_PCI_SCAN_SHOW
  70. #endif
  71. #define CONFIG_SYS_ALT_MEMTEST
  72. /* Keep device tree and initrd in lower memory so the kernel can access them */
  73. #define CONFIG_EXTRA_ENV_SETTINGS \
  74. "fdt_high=0x10000000\0" \
  75. "initrd_high=0x10000000\0"
  76. /* SPL */
  77. /*
  78. * Select the boot device here
  79. *
  80. * Currently supported are:
  81. * SPL_BOOT_SPI_NOR_FLASH - Booting via SPI NOR flash
  82. * SPL_BOOT_SDIO_MMC_CARD - Booting via SDIO/MMC card (partition 1)
  83. */
  84. #define SPL_BOOT_SPI_NOR_FLASH 1
  85. #define SPL_BOOT_SDIO_MMC_CARD 2
  86. #define CONFIG_SPL_BOOT_DEVICE SPL_BOOT_SPI_NOR_FLASH
  87. /* Defines for SPL */
  88. #define CONFIG_SPL_FRAMEWORK
  89. #define CONFIG_SPL_SIZE (140 << 10)
  90. #define CONFIG_SPL_TEXT_BASE 0x40000030
  91. #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - 0x0030)
  92. #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE)
  93. #define CONFIG_SPL_BSS_MAX_SIZE (16 << 10)
  94. #ifdef CONFIG_SPL_BUILD
  95. #define CONFIG_SYS_MALLOC_SIMPLE
  96. #endif
  97. #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10))
  98. #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4)
  99. #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
  100. /* SPL related SPI defines */
  101. #define CONFIG_SPL_SPI_LOAD
  102. #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x24000
  103. #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS
  104. #endif
  105. #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
  106. /* SPL related MMC defines */
  107. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1
  108. #define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10)
  109. #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS
  110. #ifdef CONFIG_SPL_BUILD
  111. #define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER 0x00180000 /* in SDRAM */
  112. #endif
  113. #endif
  114. /*
  115. * mv-common.h should be defined after CMD configs since it used them
  116. * to enable certain macros
  117. */
  118. #include "mv-common.h"
  119. #endif /* _CONFIG_DB_88F6820_GP_H */