config.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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)
  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 kwbimage.cfg from board specific folder 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 $(CONFIG_BOARDDIR)/kwbimage.cfg
  34. #endif /* CONFIG_SYS_KWD_CONFIG */
  35. /* Add target to build it automatically upon "make" */
  36. #ifdef CONFIG_SPL
  37. #define CONFIG_BUILD_TARGET "u-boot-spl.kwb"
  38. #endif
  39. /* end of 16M scrubbed by training in bootrom */
  40. #define CONFIG_SYS_INIT_SP_ADDR 0x00FF0000
  41. #define CONFIG_NR_DRAM_BANKS_MAX 2
  42. #define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE
  43. /*
  44. * SPI Flash configuration
  45. */
  46. #ifdef CONFIG_CMD_SF
  47. #ifndef CONFIG_ENV_SPI_BUS
  48. # define CONFIG_ENV_SPI_BUS 0
  49. #endif
  50. #ifndef CONFIG_ENV_SPI_CS
  51. # define CONFIG_ENV_SPI_CS 0
  52. #endif
  53. #ifndef CONFIG_ENV_SPI_MAX_HZ
  54. # define CONFIG_ENV_SPI_MAX_HZ 50000000
  55. #endif
  56. #endif
  57. /* Needed for SPI NOR booting in SPL */
  58. #define CONFIG_DM_SEQ_ALIAS 1
  59. /*
  60. * Ethernet Driver configuration
  61. */
  62. #ifdef CONFIG_CMD_NET
  63. #define CONFIG_MII /* expose smi ove miiphy interface */
  64. #define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
  65. #define CONFIG_ARP_TIMEOUT 200
  66. #define CONFIG_NET_RETRY_COUNT 50
  67. #endif /* CONFIG_CMD_NET */
  68. /*
  69. * I2C related stuff
  70. */
  71. #ifdef CONFIG_CMD_I2C
  72. #ifndef CONFIG_SYS_I2C_SOFT
  73. #define CONFIG_I2C_MVTWSI
  74. #endif
  75. #define CONFIG_SYS_I2C_SLAVE 0x0
  76. #define CONFIG_SYS_I2C_SPEED 100000
  77. #endif
  78. /* Use common timer */
  79. #define CONFIG_SYS_TIMER_COUNTS_DOWN
  80. #define CONFIG_SYS_TIMER_COUNTER (MVEBU_TIMER_BASE + 0x14)
  81. #define CONFIG_SYS_TIMER_RATE 25000000
  82. #endif /* __MVEBU_CONFIG_H */