pcm051.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. * pcm051.h
  3. *
  4. * Phytec phyCORE-AM335x (pcm051) boards information header
  5. *
  6. * Copyright (C) 2013 Lemonage Software GmbH
  7. * Author Lars Poeschel <poeschel@lemonage.de>
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation version 2.
  12. *
  13. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  14. * kind, whether express or implied; without even the implied warranty
  15. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. */
  18. #ifndef __CONFIG_PCM051_H
  19. #define __CONFIG_PCM051_H
  20. #include <configs/ti_am335x_common.h>
  21. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  22. #define MACH_TYPE_PCM051 4144 /* Until the next sync */
  23. #define CONFIG_MACH_TYPE MACH_TYPE_PCM051
  24. /* set to negative value for no autoboot */
  25. #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  26. #define CONFIG_EXTRA_ENV_SETTINGS \
  27. "loadaddr=0x80007fc0\0" \
  28. "fdtaddr=0x80000000\0" \
  29. "rdaddr=0x81000000\0" \
  30. "bootfile=uImage\0" \
  31. "fdtfile=pcm051.dtb\0" \
  32. "console=ttyO0,115200n8\0" \
  33. "optargs=\0" \
  34. "mmcdev=0\0" \
  35. "mmcroot=/dev/mmcblk0p2 ro\0" \
  36. "mmcrootfstype=ext4 rootwait\0" \
  37. "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
  38. "ramrootfstype=ext2\0" \
  39. "mmcargs=setenv bootargs console=${console} " \
  40. "${optargs} " \
  41. "root=${mmcroot} " \
  42. "rootfstype=${mmcrootfstype}\0" \
  43. "bootenv=uEnv.txt\0" \
  44. "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  45. "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
  46. "source ${loadaddr}\0" \
  47. "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
  48. "importbootenv=echo Importing environment from mmc ...; " \
  49. "env import -t $loadaddr $filesize\0" \
  50. "ramargs=setenv bootargs console=${console} " \
  51. "${optargs} " \
  52. "root=${ramroot} " \
  53. "rootfstype=${ramrootfstype}\0" \
  54. "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
  55. "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
  56. "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
  57. "mmcboot=echo Booting from mmc ...; " \
  58. "run mmcargs; " \
  59. "bootm ${loadaddr}\0" \
  60. "ramboot=echo Booting from ramdisk ...; " \
  61. "run ramargs; " \
  62. "bootm ${loadaddr}\0" \
  63. #define CONFIG_BOOTCOMMAND \
  64. "mmc dev ${mmcdev}; if mmc rescan; then " \
  65. "echo SD/MMC found on device ${mmcdev};" \
  66. "if run loadbootscript; then " \
  67. "run bootscript;" \
  68. "else " \
  69. "if run loadbootenv; then " \
  70. "echo Loaded environment from ${bootenv};" \
  71. "run importbootenv;" \
  72. "fi;" \
  73. "if test -n $uenvcmd; then " \
  74. "echo Running uenvcmd ...;" \
  75. "run uenvcmd;" \
  76. "fi;" \
  77. "if run loaduimage; then " \
  78. "run mmcboot;" \
  79. "fi;" \
  80. "fi ;" \
  81. "fi;" \
  82. /* Clock Defines */
  83. #define V_OSCK 25000000 /* Clock output from T2 */
  84. #define V_SCLK (V_OSCK)
  85. /*
  86. * memtest works on 8 MB in DRAM after skipping 32MB from
  87. * start addr of ram disk
  88. */
  89. #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + (64 << 20))
  90. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
  91. + (8 * 1024 * 1024))
  92. #define CONFIG_SF_DEFAULT_SPEED 24000000
  93. #define CONFIG_CONS_INDEX 1
  94. /* NS16550 Configuration */
  95. #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
  96. #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
  97. #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
  98. #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
  99. #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
  100. #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
  101. /* I2C Configuration */
  102. #define CONFIG_CMD_EEPROM
  103. #define CONFIG_ENV_EEPROM_IS_ON_I2C
  104. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
  105. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
  106. #define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \
  107. 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
  108. /* CPU */
  109. #define CONFIG_ENV_IS_NOWHERE
  110. #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
  111. #ifdef CONFIG_SPI_BOOT
  112. #define CONFIG_SPL_SPI_LOAD
  113. #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
  114. #define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000
  115. #endif
  116. /*
  117. * USB configuration
  118. */
  119. #define CONFIG_USB_MUSB_DSPS
  120. #define CONFIG_ARCH_MISC_INIT
  121. #define CONFIG_USB_MUSB_PIO_ONLY
  122. #define CONFIG_AM335X_USB0
  123. #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
  124. #define CONFIG_AM335X_USB1
  125. #define CONFIG_AM335X_USB1_MODE MUSB_HOST
  126. #ifdef CONFIG_USB_MUSB_GADGET
  127. #define CONFIG_USB_ETHER
  128. #define CONFIG_USB_ETH_RNDIS
  129. #endif /* CONFIG_USB_MUSB_GADGET */
  130. #define CONFIG_PHY_GIGE
  131. #define CONFIG_PHYLIB
  132. #define CONFIG_PHY_SMSC
  133. #endif /* ! __CONFIG_PCM051_H */