db-88f6820-gp.h 3.0 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. #define CONFIG_SYS_TCLK 250000000 /* 250MHz */
  11. /*
  12. * Commands configuration
  13. */
  14. /* I2C */
  15. #define CONFIG_SYS_I2C
  16. #define CONFIG_SYS_I2C_MVTWSI
  17. #define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
  18. #define CONFIG_SYS_I2C_SLAVE 0x0
  19. #define CONFIG_SYS_I2C_SPEED 100000
  20. /*
  21. * SPI Flash configuration for the environemnt access
  22. */
  23. #define CONFIG_ENV_SPI_BUS 0
  24. #define CONFIG_ENV_SPI_CS 0
  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 PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */
  47. /* PCIe support */
  48. #ifndef CONFIG_SPL_BUILD
  49. #define CONFIG_PCI_MVEBU
  50. #define CONFIG_PCI_SCAN_SHOW
  51. #endif
  52. /* Keep device tree and initrd in lower memory so the kernel can access them */
  53. #define CONFIG_EXTRA_ENV_SETTINGS \
  54. "fdt_high=0x10000000\0" \
  55. "initrd_high=0x10000000\0"
  56. /* SPL */
  57. /*
  58. * Select the boot device here
  59. *
  60. * Currently supported are:
  61. * SPL_BOOT_SPI_NOR_FLASH - Booting via SPI NOR flash
  62. * SPL_BOOT_SDIO_MMC_CARD - Booting via SDIO/MMC card (partition 1)
  63. */
  64. #define SPL_BOOT_SPI_NOR_FLASH 1
  65. #define SPL_BOOT_SDIO_MMC_CARD 2
  66. #define CONFIG_SPL_BOOT_DEVICE SPL_BOOT_SPI_NOR_FLASH
  67. /* Defines for SPL */
  68. #define CONFIG_SPL_SIZE (140 << 10)
  69. #define CONFIG_SPL_TEXT_BASE 0x40000030
  70. #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - 0x0030)
  71. #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE)
  72. #define CONFIG_SPL_BSS_MAX_SIZE (16 << 10)
  73. #ifdef CONFIG_SPL_BUILD
  74. #define CONFIG_SYS_MALLOC_SIMPLE
  75. #endif
  76. #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10))
  77. #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4)
  78. #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
  79. /* SPL related SPI defines */
  80. #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x24000
  81. #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS
  82. #endif
  83. #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
  84. /* SPL related MMC defines */
  85. #define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10)
  86. #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS
  87. #ifdef CONFIG_SPL_BUILD
  88. #define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER 0x00180000 /* in SDRAM */
  89. #endif
  90. #endif
  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. #endif /* _CONFIG_DB_88F6820_GP_H */