picosam9g45.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. /*
  2. * Configuration settings for the mini-box PICOSAM9G45 board.
  3. * (C) Copyright 2015 Inter Act B.V.
  4. *
  5. * Based on:
  6. * U-Boot file: include/configs/at91sam9m10g45ek.h
  7. * (C) Copyright 2007-2008
  8. * Stelian Pop <stelian@popies.net>
  9. * Lead Tech Design <www.leadtechdesign.com>
  10. *
  11. * SPDX-License-Identifier: GPL-2.0+
  12. */
  13. #ifndef __CONFIG_H
  14. #define __CONFIG_H
  15. #include <asm/hardware.h>
  16. #define CONFIG_SYS_TEXT_BASE 0x23f00000
  17. #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
  18. /* ARM asynchronous clock */
  19. #define CONFIG_SYS_AT91_SLOW_CLOCK 32768
  20. #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */
  21. #define CONFIG_PICOSAM
  22. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  23. #define CONFIG_SETUP_MEMORY_TAGS
  24. #define CONFIG_INITRD_TAG
  25. #define CONFIG_SKIP_LOWLEVEL_INIT
  26. #define CONFIG_BOARD_EARLY_INIT_F
  27. /* general purpose I/O */
  28. #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
  29. #define CONFIG_AT91_GPIO
  30. #define CONFIG_AT91_GPIO_PULLUP 1 /* keep pullups on peripheral pins */
  31. /* serial console */
  32. #define CONFIG_ATMEL_USART
  33. #define CONFIG_USART_BASE ATMEL_BASE_DBGU
  34. #define CONFIG_USART_ID ATMEL_ID_SYS
  35. /* LCD */
  36. #define LCD_BPP LCD_COLOR8
  37. #define CONFIG_LCD_LOGO
  38. #undef LCD_TEST_PATTERN
  39. #define CONFIG_LCD_INFO
  40. #define CONFIG_LCD_INFO_BELOW_LOGO
  41. #define CONFIG_SYS_WHITE_ON_BLACK
  42. #define CONFIG_ATMEL_LCD
  43. #define CONFIG_ATMEL_LCD_RGB565
  44. /* board specific(not enough SRAM) */
  45. #define CONFIG_AT91SAM9G45_LCD_BASE 0x23E00000
  46. /* LED */
  47. #define CONFIG_AT91_LED
  48. #define CONFIG_GREEN_LED AT91_PIN_PD31 /* this is the user1 led */
  49. /*
  50. * BOOTP options
  51. */
  52. #define CONFIG_BOOTP_BOOTFILESIZE
  53. #define CONFIG_BOOTP_BOOTPATH
  54. #define CONFIG_BOOTP_GATEWAY
  55. #define CONFIG_BOOTP_HOSTNAME
  56. /* Enable the watchdog */
  57. #define CONFIG_AT91SAM9_WATCHDOG
  58. #define CONFIG_HW_WATCHDOG
  59. /*
  60. * Command line configuration.
  61. */
  62. /* No NOR flash */
  63. #define CONFIG_SYS_NO_FLASH
  64. /* SDRAM */
  65. #define CONFIG_NR_DRAM_BANKS 2
  66. #define PHYS_SDRAM_1 ATMEL_BASE_CS1 /* on DDRSDRC1 */
  67. #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
  68. #define PHYS_SDRAM_2 ATMEL_BASE_CS6 /* on DDRSDRC0 */
  69. #define PHYS_SDRAM_2_SIZE 0x08000000 /* 128 MB */
  70. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  71. #define CONFIG_SYS_INIT_SP_ADDR \
  72. (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
  73. /* MMC */
  74. #ifdef CONFIG_CMD_MMC
  75. #define CONFIG_GENERIC_MMC
  76. #define CONFIG_GENERIC_ATMEL_MCI
  77. #endif
  78. #if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC)
  79. #define CONFIG_DOS_PARTITION
  80. #endif
  81. /* Ethernet */
  82. #define CONFIG_MACB
  83. #define CONFIG_RMII
  84. #define CONFIG_NET_RETRY_COUNT 20
  85. #define CONFIG_RESET_PHY_R
  86. #define CONFIG_AT91_WANTS_COMMON_PHY
  87. /* USB */
  88. #define CONFIG_USB_EHCI
  89. #define CONFIG_USB_EHCI_ATMEL
  90. #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2
  91. #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
  92. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
  93. #define CONFIG_SYS_MEMTEST_END 0x23e00000
  94. #ifdef CONFIG_SYS_USE_MMC
  95. /* bootstrap + u-boot + env + linux in mmc */
  96. #define FAT_ENV_INTERFACE "mmc"
  97. /*
  98. * We don't specify the part number, if device 0 has partition table, it means
  99. * the first partition; it no partition table, then take whole device as a
  100. * FAT file system.
  101. */
  102. #define FAT_ENV_DEVICE_AND_PART "0"
  103. #define FAT_ENV_FILE "uboot.env"
  104. #define CONFIG_ENV_IS_IN_FAT
  105. #define CONFIG_FAT_WRITE
  106. #define CONFIG_ENV_SIZE 0x4000
  107. #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
  108. "root=/dev/mmcblk0p2 rw rootwait"
  109. #define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x21000000 dtb; " \
  110. "fatload mmc 0:1 0x22000000 zImage; " \
  111. "bootz 0x22000000 - 0x21000000"
  112. #endif
  113. #define CONFIG_BAUDRATE 115200
  114. #define CONFIG_SYS_CBSIZE 256
  115. #define CONFIG_SYS_MAXARGS 16
  116. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
  117. + sizeof(CONFIG_SYS_PROMPT) + 16)
  118. #define CONFIG_SYS_LONGHELP
  119. #define CONFIG_CMDLINE_EDITING
  120. #define CONFIG_AUTO_COMPLETE
  121. /*
  122. * Size of malloc() pool
  123. */
  124. #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
  125. /* Defines for SPL */
  126. #define CONFIG_SPL_FRAMEWORK
  127. #define CONFIG_SPL_TEXT_BASE 0x300000
  128. #define CONFIG_SPL_MAX_SIZE 0x010000
  129. #define CONFIG_SPL_STACK 0x310000
  130. #define CONFIG_SYS_MONITOR_LEN 0x80000
  131. #ifdef CONFIG_SYS_USE_MMC
  132. #define CONFIG_SPL_BSS_START_ADDR 0x20000000
  133. #define CONFIG_SPL_BSS_MAX_SIZE 0x00080000
  134. #define CONFIG_SYS_SPL_MALLOC_START 0x20080000
  135. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x00080000
  136. #define CONFIG_SPL_LDSCRIPT arch/arm/mach-at91/arm926ejs/u-boot-spl.lds
  137. #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
  138. #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
  139. #define CONFIG_SPL_ATMEL_SIZE
  140. #define CONFIG_SYS_MASTER_CLOCK 132096000
  141. #define CONFIG_SYS_AT91_PLLA 0x20c73f03
  142. #define CONFIG_SYS_MCKR 0x1301
  143. #define CONFIG_SYS_MCKR_CSS 0x1302
  144. #endif
  145. #endif