pcm051.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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_MACH_TYPE MACH_TYPE_PCM051
  22. /* set to negative value for no autoboot */
  23. #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
  24. "bootcmd_" #devtypel #instance "=" \
  25. "setenv mmcdev " #instance"; "\
  26. "setenv bootpart " #instance":2 ; "\
  27. "run mmcboot\0"
  28. #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
  29. #devtypel #instance " "
  30. #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
  31. "bootcmd_" #devtypel "=" \
  32. "run nandboot\0"
  33. #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
  34. #devtypel #instance " "
  35. #define BOOT_TARGET_DEVICES(func) \
  36. func(MMC, mmc, 0) \
  37. func(LEGACY_MMC, legacy_mmc, 0) \
  38. func(MMC, mmc, 1) \
  39. func(LEGACY_MMC, legacy_mmc, 1) \
  40. func(NAND, nand, 0)
  41. #define CONFIG_BOOTCOMMAND \
  42. "run distro_bootcmd"
  43. #include <config_distro_bootcmd.h>
  44. #include <environment/ti/dfu.h>
  45. #include <environment/ti/mmc.h>
  46. #define CONFIG_EXTRA_ENV_SETTINGS \
  47. DEFAULT_LINUX_BOOT_ENV \
  48. DEFAULT_MMC_TI_ARGS \
  49. "bootfile=uImage\0" \
  50. "fdtfile=am335x-wega-rdk.dtb\0" \
  51. "console=ttyO0,115200n8\0" \
  52. "optargs=\0" \
  53. "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
  54. "ramrootfstype=ext2\0" \
  55. "bootenv=uEnv.txt\0" \
  56. "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  57. "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
  58. "source ${loadaddr}\0" \
  59. "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
  60. "importbootenv=echo Importing environment from mmc ...; " \
  61. "env import -t $loadaddr $filesize\0" \
  62. "ramargs=setenv bootargs console=${console} " \
  63. "${optargs} " \
  64. "root=${ramroot} " \
  65. "rootfstype=${ramrootfstype}\0" \
  66. "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
  67. "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
  68. "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
  69. "mmcboot=echo Booting from mmc ...; " \
  70. "run args_mmc; " \
  71. "bootm ${loadaddr}\0" \
  72. "ramboot=echo Booting from ramdisk ...; " \
  73. "run ramargs; " \
  74. "bootm ${loadaddr}\0" \
  75. BOOTENV
  76. /* Clock Defines */
  77. #define V_OSCK 25000000 /* Clock output from T2 */
  78. #define V_SCLK (V_OSCK)
  79. /*
  80. * memtest works on 8 MB in DRAM after skipping 32MB from
  81. * start addr of ram disk
  82. */
  83. #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + (64 << 20))
  84. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
  85. + (8 * 1024 * 1024))
  86. /* NS16550 Configuration */
  87. #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
  88. #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
  89. #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
  90. #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
  91. #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
  92. #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
  93. /* I2C Configuration */
  94. #define CONFIG_ENV_EEPROM_IS_ON_I2C
  95. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
  96. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
  97. #define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \
  98. 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
  99. /* CPU */
  100. #ifdef CONFIG_SPI_BOOT
  101. #define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000
  102. #endif
  103. /*
  104. * USB configuration
  105. */
  106. #define CONFIG_AM335X_USB0
  107. #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
  108. #define CONFIG_AM335X_USB1
  109. #define CONFIG_AM335X_USB1_MODE MUSB_HOST
  110. #define CONFIG_PHY_SMSC
  111. #endif /* ! __CONFIG_PCM051_H */