pdu001.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * pdu001.h
  4. *
  5. * Copyright (C) 2018 EETS GmbH - http://www.eets.ch/
  6. *
  7. * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
  8. */
  9. #ifndef __CONFIG_PDU001_H
  10. #define __CONFIG_PDU001_H
  11. #include <configs/ti_am335x_common.h>
  12. /* No more need for I2C legacy compatibility for this board.
  13. * CONFIG_DM_I2C_COMPAT is defined in ti_armv7_common.h. See the comment there
  14. * for the right moment to delete the following line.
  15. */
  16. #undef CONFIG_DM_I2C_COMPAT
  17. /* Using 32K of volatile storage for environment */
  18. #define CONFIG_ENV_SIZE 0x4000
  19. #define MACH_TYPE_PDU001 5075
  20. #define CONFIG_MACH_TYPE MACH_TYPE_PDU001
  21. #define CONFIG_BOARD_LATE_INIT
  22. /* Clock Defines */
  23. #define V_OSCK 24000000 /* Clock output from T2 */
  24. #define V_SCLK (V_OSCK)
  25. #if CONFIG_CONS_INDEX == 1
  26. #define CONSOLE_DEV "ttyO0"
  27. #elif CONFIG_CONS_INDEX == 2
  28. #define CONSOLE_DEV "ttyO1"
  29. #elif CONFIG_CONS_INDEX == 3
  30. #define CONSOLE_DEV "ttyO2"
  31. #elif CONFIG_CONS_INDEX == 4
  32. #define CONSOLE_DEV "ttyO3"
  33. #elif CONFIG_CONS_INDEX == 5
  34. #define CONSOLE_DEV "ttyO4"
  35. #elif CONFIG_CONS_INDEX == 6
  36. #define CONSOLE_DEV "ttyO5"
  37. #endif
  38. #define CONFIG_BOOTCOMMAND \
  39. "run eval_boot_device;" \
  40. "setenv bootargs console=${console} " \
  41. "vt.global_cursor_default=0 " \
  42. "root=/dev/mmcblk${mmc_boot}p${root_fs_partition} " \
  43. "rootfstype=ext4 " \
  44. "rootwait " \
  45. "rootdelay=1;" \
  46. "fatload mmc ${mmc_boot} ${fdtaddr} ${fdtfile};" \
  47. "fatload mmc ${mmc_boot} ${loadaddr} ${bootfile};" \
  48. "bootz ${loadaddr} - ${fdtaddr}"
  49. #ifndef CONFIG_SPL_BUILD
  50. #define CONFIG_EXTRA_ENV_SETTINGS \
  51. DEFAULT_LINUX_BOOT_ENV \
  52. "fdtfile=am335x-pdu001.dtb\0" \
  53. "bootfile=zImage\0" \
  54. "console=" CONSOLE_DEV ",115200n8\0" \
  55. "root_fs_partition=2\0" \
  56. "eval_boot_device=" \
  57. "if test $boot_device = emmc; then " \
  58. "setenv mmc_boot 0;" \
  59. "elif test $boot_device = sdcard; then " \
  60. "setenv mmc_boot 1;" \
  61. "else " \
  62. "echo Bootdevice is neither MMC0 nor MMC1;" \
  63. "reset;" \
  64. "fi;" \
  65. "\0"
  66. #endif
  67. /* NS16550 Configuration */
  68. #define CONFIG_SYS_NS16550_COM1 UART0_BASE
  69. #define CONFIG_SYS_NS16550_COM2 UART1_BASE
  70. #define CONFIG_SYS_NS16550_COM3 UART2_BASE
  71. #define CONFIG_SYS_NS16550_COM4 UART3_BASE
  72. #define CONFIG_SYS_NS16550_COM5 UART4_BASE
  73. #define CONFIG_SYS_NS16550_COM6 UART5_BASE
  74. #define CONFIG_BAUDRATE 115200
  75. #endif /* ! __CONFIG_PDU001_H */