config.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * (C) Copyright 2011
  3. * Marvell Semiconductor <www.marvell.com>
  4. * Written-by: Lei Wen <leiwen@marvell.com>
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. /*
  9. * This file should be included in board config header file.
  10. *
  11. * It supports common definitions for MVEBU platforms
  12. */
  13. #ifndef _MVEBU_CONFIG_H
  14. #define _MVEBU_CONFIG_H
  15. #include <asm/arch/soc.h>
  16. #if defined(CONFIG_ARMADA_XP)
  17. #define MV88F78X60 /* for the DDR training bin_hdr code */
  18. #endif
  19. #define CONFIG_SYS_CACHELINE_SIZE 32
  20. /*
  21. * By default kwbimage.cfg from board specific folder is used
  22. * If for some board, different configuration file need to be used,
  23. * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file
  24. */
  25. #ifndef CONFIG_SYS_KWD_CONFIG
  26. #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg
  27. #endif /* CONFIG_SYS_KWD_CONFIG */
  28. /* Add target to build it automatically upon "make" */
  29. #ifdef CONFIG_SPL
  30. #define CONFIG_BUILD_TARGET "u-boot-spl.kwb"
  31. #endif
  32. /* end of 16M scrubbed by training in bootrom */
  33. #define CONFIG_SYS_INIT_SP_ADDR 0x00FF0000
  34. #define CONFIG_NR_DRAM_BANKS_MAX 2
  35. #define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE
  36. /*
  37. * SPI Flash configuration
  38. */
  39. #ifdef CONFIG_CMD_SF
  40. #define CONFIG_KIRKWOOD_SPI
  41. #ifndef CONFIG_ENV_SPI_BUS
  42. # define CONFIG_ENV_SPI_BUS 0
  43. #endif
  44. #ifndef CONFIG_ENV_SPI_CS
  45. # define CONFIG_ENV_SPI_CS 0
  46. #endif
  47. #ifndef CONFIG_ENV_SPI_MAX_HZ
  48. # define CONFIG_ENV_SPI_MAX_HZ 50000000
  49. #endif
  50. #endif
  51. /* Needed for SPI NOR booting in SPL */
  52. #define CONFIG_DM_SEQ_ALIAS 1
  53. /*
  54. * Ethernet Driver configuration
  55. */
  56. #ifdef CONFIG_CMD_NET
  57. #define CONFIG_CMD_MII
  58. #define CONFIG_MII /* expose smi ove miiphy interface */
  59. #define CONFIG_MVNETA /* Enable Marvell Gbe Controller Driver */
  60. #define CONFIG_PHYLIB
  61. #define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
  62. #define CONFIG_PHY_GIGE /* GbE speed/duplex detect */
  63. #define CONFIG_ARP_TIMEOUT 200
  64. #define CONFIG_NET_RETRY_COUNT 50
  65. #endif /* CONFIG_CMD_NET */
  66. /*
  67. * I2C related stuff
  68. */
  69. #ifdef CONFIG_CMD_I2C
  70. #ifndef CONFIG_SYS_I2C_SOFT
  71. #define CONFIG_I2C_MVTWSI
  72. #endif
  73. #define CONFIG_SYS_I2C_SLAVE 0x0
  74. #define CONFIG_SYS_I2C_SPEED 100000
  75. #endif
  76. /* Use common timer */
  77. #define CONFIG_SYS_TIMER_COUNTS_DOWN
  78. #define CONFIG_SYS_TIMER_COUNTER (MVEBU_TIMER_BASE + 0x14)
  79. #define CONFIG_SYS_TIMER_RATE 25000000
  80. #endif /* __MVEBU_CONFIG_H */