wb50n.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Configuation settings for the WB50N CPU Module.
  4. */
  5. #ifndef __CONFIG_H
  6. #define __CONFIG_H
  7. #include <asm/hardware.h>
  8. /* ARM asynchronous clock */
  9. #define CONFIG_SYS_AT91_SLOW_CLOCK 32768
  10. #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */
  11. #define CONFIG_ARCH_CPU_INIT
  12. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  13. #define CONFIG_SETUP_MEMORY_TAGS
  14. #define CONFIG_INITRD_TAG
  15. #ifndef CONFIG_SPL_BUILD
  16. #define CONFIG_SKIP_LOWLEVEL_INIT
  17. #endif
  18. /* general purpose I/O */
  19. #define CONFIG_AT91_GPIO
  20. /* serial console */
  21. #define CONFIG_ATMEL_USART
  22. #define CONFIG_USART_BASE ATMEL_BASE_DBGU
  23. #define CONFIG_USART_ID ATMEL_ID_DBGU
  24. /*
  25. * BOOTP options
  26. */
  27. #define CONFIG_BOOTP_BOOTFILESIZE
  28. /* SDRAM */
  29. #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS
  30. #define CONFIG_SYS_SDRAM_SIZE 0x04000000
  31. #ifdef CONFIG_SPL_BUILD
  32. #define CONFIG_SYS_INIT_SP_ADDR 0x310000
  33. #else
  34. #define CONFIG_SYS_INIT_SP_ADDR \
  35. (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
  36. #endif
  37. #define CONFIG_SYS_MEMTEST_START 0x21000000
  38. #define CONFIG_SYS_MEMTEST_END 0x22000000
  39. /* NAND flash */
  40. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  41. #define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
  42. /* our ALE is AD21 */
  43. #define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
  44. /* our CLE is AD22 */
  45. #define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
  46. #define CONFIG_SYS_NAND_ONFI_DETECTION
  47. /* Ethernet Hardware */
  48. #define CONFIG_MACB
  49. #define CONFIG_RMII
  50. #define CONFIG_NET_RETRY_COUNT 20
  51. #define CONFIG_MACB_SEARCH_PHY
  52. #define CONFIG_RGMII
  53. #define CONFIG_ETHADDR C0:EE:40:00:00:00
  54. #define CONFIG_ENV_OVERWRITE 1
  55. #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
  56. #define CONFIG_EXTRA_ENV_SETTINGS \
  57. "autoload=no\0" \
  58. "autostart=no\0"
  59. /* bootstrap + u-boot + env in nandflash */
  60. #define CONFIG_ENV_OFFSET 0xA0000
  61. #define CONFIG_ENV_OFFSET_REDUND 0xC0000
  62. #define CONFIG_ENV_SIZE 0x20000
  63. #define CONFIG_BOOTCOMMAND \
  64. "nand read 0x22000000 0x000e0000 0x500000; " \
  65. "bootm"
  66. #define CONFIG_BOOTARGS \
  67. "rw rootfstype=ubifs ubi.mtd=6 root=ubi0:rootfs"
  68. #define CONFIG_BAUDRATE 115200
  69. #define CONFIG_SYS_CBSIZE 1024
  70. #define CONFIG_SYS_MAXARGS 16
  71. #define CONFIG_SYS_PBSIZE \
  72. (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  73. /* Size of malloc() pool */
  74. #define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024)
  75. /* SPL */
  76. #define CONFIG_SPL_TEXT_BASE 0x300000
  77. #define CONFIG_SPL_MAX_SIZE 0x10000
  78. #define CONFIG_SPL_BSS_START_ADDR 0x20000000
  79. #define CONFIG_SPL_BSS_MAX_SIZE 0x80000
  80. #define CONFIG_SYS_SPL_MALLOC_START 0x20080000
  81. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000
  82. #define CONFIG_SYS_MONITOR_LEN (512 << 10)
  83. #define CONFIG_SPL_NAND_DRIVERS
  84. #define CONFIG_SPL_NAND_BASE
  85. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x20000
  86. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  87. #define CONFIG_SYS_NAND_PAGE_SIZE 0x800
  88. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  89. #define CONFIG_SYS_NAND_OOBSIZE 64
  90. #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000
  91. #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0
  92. #endif