config.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2011
  4. * Marvell Semiconductor <www.marvell.com>
  5. * Written-by: Lei Wen <leiwen@marvell.com>
  6. */
  7. /*
  8. * This file should be included in board config header file.
  9. *
  10. * It supports common definitions for MVEBU platforms
  11. */
  12. #ifndef _MVEBU_CONFIG_H
  13. #define _MVEBU_CONFIG_H
  14. #include <asm/arch/soc.h>
  15. #if defined(CONFIG_ARMADA_XP) || defined(CONFIG_ARMADA_375) \
  16. || defined(CONFIG_ARMADA_38X) || defined(CONFIG_ARMADA_MSYS)
  17. /*
  18. * Set this for the common xor register definitions needed in dram.c
  19. * for A38x as well here.
  20. */
  21. #define MV88F78X60 /* for the DDR training bin_hdr code */
  22. #endif
  23. #define CONFIG_SYS_L2_PL310
  24. #ifdef CONFIG_SPL_BUILD
  25. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  26. #endif
  27. /*
  28. * By default the generated mvebu kwbimage.cfg is used
  29. * If for some board, different configuration file need to be used,
  30. * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file
  31. */
  32. #ifndef CONFIG_SYS_KWD_CONFIG
  33. #define CONFIG_SYS_KWD_CONFIG arch/arm/mach-mvebu/kwbimage.cfg
  34. #endif /* CONFIG_SYS_KWD_CONFIG */
  35. /* end of 16M scrubbed by training in bootrom */
  36. #define CONFIG_SYS_INIT_SP_ADDR 0x00FF0000
  37. #define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE
  38. /* Needed for SPI NOR booting in SPL */
  39. #define CONFIG_DM_SEQ_ALIAS 1
  40. /*
  41. * Ethernet Driver configuration
  42. */
  43. #ifdef CONFIG_CMD_NET
  44. #define CONFIG_ARP_TIMEOUT 200
  45. #define CONFIG_NET_RETRY_COUNT 50
  46. #endif /* CONFIG_CMD_NET */
  47. /*
  48. * I2C related stuff
  49. */
  50. #ifdef CONFIG_CMD_I2C
  51. #ifndef CONFIG_SYS_I2C_SOFT
  52. #define CONFIG_I2C_MVTWSI
  53. #endif
  54. #define CONFIG_SYS_I2C_SLAVE 0x0
  55. #define CONFIG_SYS_I2C_SPEED 100000
  56. #endif
  57. /* Use common timer */
  58. #define CONFIG_SYS_TIMER_COUNTS_DOWN
  59. #define CONFIG_SYS_TIMER_COUNTER (MVEBU_TIMER_BASE + 0x14)
  60. #define CONFIG_SYS_TIMER_RATE 25000000
  61. #endif /* __MVEBU_CONFIG_H */