x530.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2018 Allied Telesis Labs
  4. */
  5. #ifndef _CONFIG_X530_H
  6. #define _CONFIG_X530_H
  7. /*
  8. * High Level Configuration Options (easy to change)
  9. */
  10. #define CONFIG_DISPLAY_BOARDINFO_LATE
  11. #define CONFIG_SYS_TCLK 250000000 /* 250MHz */
  12. /*
  13. * NS16550 Configuration
  14. */
  15. #define CONFIG_SYS_NS16550_SERIAL
  16. #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_TCLK
  17. #if !defined(CONFIG_DM_SERIAL)
  18. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  19. #define CONFIG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE
  20. #endif
  21. /*
  22. * Serial Port configuration
  23. * The following definitions let you select what serial you want to use
  24. * for your console driver.
  25. */
  26. #define CONFIG_CONS_INDEX 1 /*Console on UART0 */
  27. /*
  28. * Commands configuration
  29. */
  30. #define CONFIG_CMD_PCI
  31. /* NAND */
  32. #define CONFIG_SYS_NAND_ONFI_DETECTION
  33. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  34. #define BBT_CUSTOM_SCAN
  35. #define BBT_CUSTOM_SCAN_PAGE 0
  36. #define BBT_CUSTOM_SCAN_POSITION 2048
  37. /* SPI NOR flash default params, used by sf commands */
  38. #define MTDIDS_DEFAULT "nand0=nand"
  39. #define MTDPARTS_DEFAULT "mtdparts=nand:240M(user),8M(errlog),8M(nand-bbt)"
  40. #define MTDPARTS_MTDOOPS "errlog"
  41. /* Partition support */
  42. /* Additional FS support/configuration */
  43. /* USB/EHCI configuration */
  44. #define CONFIG_EHCI_IS_TDI
  45. /* Environment in SPI NOR flash */
  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_SCAN_SHOW
  51. #endif
  52. /* NAND */
  53. #define CONFIG_SYS_NAND_ONFI_DETECTION
  54. #define CONFIG_CMD_UBI
  55. #define CONFIG_CMD_UBIFS
  56. #define CONFIG_LZO
  57. #define CONFIG_CMD_MTDPARTS
  58. #define CONFIG_SYS_MALLOC_LEN (4 << 20)
  59. #include <asm/arch/config.h>
  60. /*
  61. * Other required minimal configurations
  62. */
  63. #define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */
  64. #define CONFIG_SYS_ALT_MEMTEST
  65. /* Keep device tree and initrd in low memory so the kernel can access them */
  66. #define CONFIG_EXTRA_ENV_SETTINGS \
  67. "fdt_high=0x10000000\0" \
  68. "initrd_high=0x10000000\0"
  69. #define CONFIG_SYS_LOAD_ADDR 0x1000000
  70. #define CONFIG_UBI_PART user
  71. #define CONFIG_UBIFS_VOLUME user
  72. /* SPL */
  73. /* Defines for SPL */
  74. #define CONFIG_SPL_SIZE (140 << 10)
  75. #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - 0x0030)
  76. #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE)
  77. #define CONFIG_SPL_BSS_MAX_SIZE (16 << 10)
  78. #ifdef CONFIG_SPL_BUILD
  79. #define CONFIG_SYS_MALLOC_SIMPLE
  80. #endif
  81. #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10))
  82. #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4)
  83. /* SPL related SPI defines */
  84. #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS
  85. #endif /* _CONFIG_X530_H */