mx23_olinuxino.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*
  2. * Copyright (C) 2013 Marek Vasut <marex@denx.de>
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. */
  19. #ifndef __MX23_OLINUXINO_CONFIG_H__
  20. #define __MX23_OLINUXINO_CONFIG_H__
  21. /*
  22. * SoC configurations
  23. */
  24. #define CONFIG_MX23 /* i.MX23 SoC */
  25. #define CONFIG_MXS_GPIO /* GPIO control */
  26. #define CONFIG_SYS_HZ 1000 /* Ticks per second */
  27. #define CONFIG_MACH_TYPE 4105
  28. #include <asm/arch/regs-base.h>
  29. #define CONFIG_SYS_NO_FLASH
  30. #define CONFIG_BOARD_EARLY_INIT_F
  31. #define CONFIG_ARCH_MISC_INIT
  32. /*
  33. * SPL
  34. */
  35. #define CONFIG_SPL
  36. #define CONFIG_SPL_NO_CPU_SUPPORT_CODE
  37. #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mxs"
  38. #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
  39. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  40. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  41. #define CONFIG_SPL_GPIO_SUPPORT
  42. /*
  43. * U-Boot Commands
  44. */
  45. #include <config_cmd_default.h>
  46. #define CONFIG_DISPLAY_CPUINFO
  47. #define CONFIG_DOS_PARTITION
  48. #define CONFIG_CMD_CACHE
  49. #define CONFIG_CMD_FAT
  50. #define CONFIG_CMD_GPIO
  51. /*
  52. * Memory configurations
  53. */
  54. #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
  55. #define PHYS_SDRAM_1 0x40000000 /* Base address */
  56. #define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */
  57. #define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
  58. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* Initial data */
  59. #define CONFIG_SYS_MEMTEST_START 0x40000000 /* Memtest start adr */
  60. #define CONFIG_SYS_MEMTEST_END 0x40400000 /* 4 MB RAM test */
  61. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  62. /* Point initial SP in SRAM so SPL can use it too. */
  63. #define CONFIG_SYS_INIT_RAM_ADDR 0x00000000
  64. #define CONFIG_SYS_INIT_RAM_SIZE (128 * 1024)
  65. #define CONFIG_SYS_INIT_SP_OFFSET \
  66. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  67. #define CONFIG_SYS_INIT_SP_ADDR \
  68. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  69. /*
  70. * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
  71. * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
  72. * binary. In case there was more of this mess, 0x100 bytes are skipped.
  73. */
  74. #define CONFIG_SYS_TEXT_BASE 0x40000100
  75. /*
  76. * U-Boot general configurations
  77. */
  78. #define CONFIG_SYS_LONGHELP
  79. #define CONFIG_SYS_PROMPT "=> "
  80. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */
  81. #define CONFIG_SYS_PBSIZE \
  82. (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  83. /* Print buffer size */
  84. #define CONFIG_SYS_MAXARGS 32 /* Max number of command args */
  85. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  86. /* Boot argument buffer size */
  87. #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
  88. #define CONFIG_AUTO_COMPLETE /* Command auto complete */
  89. #define CONFIG_CMDLINE_EDITING /* Command history etc */
  90. #define CONFIG_SYS_HUSH_PARSER
  91. /*
  92. * Serial Driver
  93. */
  94. #define CONFIG_PL011_SERIAL
  95. #define CONFIG_PL011_CLOCK 24000000
  96. #define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE }
  97. #define CONFIG_CONS_INDEX 0
  98. #define CONFIG_BAUDRATE 115200 /* Default baud rate */
  99. /*
  100. * APBH DMA
  101. */
  102. #define CONFIG_APBH_DMA
  103. /*
  104. * ENV -- nowhere so far
  105. */
  106. #define CONFIG_ENV_SIZE (16 * 1024)
  107. #define CONFIG_ENV_IS_NOWHERE
  108. /*
  109. * Boot Linux
  110. */
  111. #define CONFIG_CMDLINE_TAG
  112. #define CONFIG_SETUP_MEMORY_TAGS
  113. #define CONFIG_BOOTDELAY 3
  114. #define CONFIG_BOOTFILE "uImage"
  115. #define CONFIG_BOOTARGS "console=ttyAMA0,115200n8 "
  116. #define CONFIG_LOADADDR 0x42000000
  117. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  118. #define CONFIG_OF_LIBFDT
  119. #endif /* __MX23_OLINUXINO_CONFIG_H__ */