db-88f6820-gp.h 3.1 KB

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