picosam9g45.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Configuration settings for the mini-box PICOSAM9G45 board.
  4. * (C) Copyright 2015 Inter Act B.V.
  5. *
  6. * Based on:
  7. * U-Boot file: include/configs/at91sam9m10g45ek.h
  8. * (C) Copyright 2007-2008
  9. * Stelian Pop <stelian@popies.net>
  10. * Lead Tech Design <www.leadtechdesign.com>
  11. */
  12. #ifndef __CONFIG_H
  13. #define __CONFIG_H
  14. #include <asm/hardware.h>
  15. #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
  16. /* ARM asynchronous clock */
  17. #define CONFIG_SYS_AT91_SLOW_CLOCK 32768
  18. #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */
  19. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  20. #define CONFIG_SETUP_MEMORY_TAGS
  21. #define CONFIG_INITRD_TAG
  22. #define CONFIG_SKIP_LOWLEVEL_INIT
  23. /* general purpose I/O */
  24. #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
  25. #define CONFIG_AT91_GPIO_PULLUP 1 /* keep pullups on peripheral pins */
  26. /* serial console */
  27. #define CONFIG_USART_BASE ATMEL_BASE_DBGU
  28. #define CONFIG_USART_ID ATMEL_ID_SYS
  29. /* LCD */
  30. #define LCD_BPP LCD_COLOR8
  31. #define CONFIG_LCD_LOGO
  32. #undef LCD_TEST_PATTERN
  33. #define CONFIG_LCD_INFO
  34. #define CONFIG_LCD_INFO_BELOW_LOGO
  35. #define CONFIG_ATMEL_LCD
  36. #define CONFIG_ATMEL_LCD_RGB565
  37. /* board specific(not enough SRAM) */
  38. #define CONFIG_AT91SAM9G45_LCD_BASE 0x23E00000
  39. /* LED */
  40. #define CONFIG_AT91_LED
  41. #define CONFIG_GREEN_LED AT91_PIN_PD31 /* this is the user1 led */
  42. /*
  43. * BOOTP options
  44. */
  45. #define CONFIG_BOOTP_BOOTFILESIZE
  46. /* SDRAM */
  47. #define PHYS_SDRAM_1 ATMEL_BASE_CS1 /* on DDRSDRC1 */
  48. #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
  49. #define PHYS_SDRAM_2 ATMEL_BASE_CS6 /* on DDRSDRC0 */
  50. #define PHYS_SDRAM_2_SIZE 0x08000000 /* 128 MB */
  51. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  52. #define CONFIG_SYS_INIT_SP_ADDR \
  53. (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
  54. /* MMC */
  55. #ifdef CONFIG_CMD_MMC
  56. #define CONFIG_GENERIC_ATMEL_MCI
  57. #endif
  58. /* Ethernet */
  59. #define CONFIG_MACB
  60. #define CONFIG_RMII
  61. #define CONFIG_NET_RETRY_COUNT 20
  62. #define CONFIG_RESET_PHY_R
  63. #define CONFIG_AT91_WANTS_COMMON_PHY
  64. #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
  65. #ifdef CONFIG_SYS_USE_MMC
  66. /* bootstrap + u-boot + env + linux in mmc */
  67. #define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x21000000 dtb; " \
  68. "fatload mmc 0:1 0x22000000 zImage; " \
  69. "bootz 0x22000000 - 0x21000000"
  70. #endif
  71. /*
  72. * Size of malloc() pool
  73. */
  74. #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
  75. /* Defines for SPL */
  76. #define CONFIG_SPL_MAX_SIZE 0x010000
  77. #define CONFIG_SPL_STACK 0x310000
  78. #define CONFIG_SYS_MONITOR_LEN 0x80000
  79. #ifdef CONFIG_SYS_USE_MMC
  80. #define CONFIG_SPL_BSS_START_ADDR 0x20000000
  81. #define CONFIG_SPL_BSS_MAX_SIZE 0x00080000
  82. #define CONFIG_SYS_SPL_MALLOC_START 0x20080000
  83. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x00080000
  84. #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
  85. #define CONFIG_SPL_ATMEL_SIZE
  86. #define CONFIG_SYS_MASTER_CLOCK 132096000
  87. #define CONFIG_SYS_AT91_PLLA 0x20c73f03
  88. #define CONFIG_SYS_MCKR 0x1301
  89. #define CONFIG_SYS_MCKR_CSS 0x1302
  90. #endif
  91. #endif