pdu001.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. /* Using 32K of volatile storage for environment */
  13. #define MACH_TYPE_PDU001 5075
  14. #define CONFIG_MACH_TYPE MACH_TYPE_PDU001
  15. #define CONFIG_BOARD_LATE_INIT
  16. /* Clock Defines */
  17. #define V_OSCK 24000000 /* Clock output from T2 */
  18. #define V_SCLK (V_OSCK)
  19. #if CONFIG_CONS_INDEX == 1
  20. #define CONSOLE_DEV "ttyO0"
  21. #elif CONFIG_CONS_INDEX == 2
  22. #define CONSOLE_DEV "ttyO1"
  23. #elif CONFIG_CONS_INDEX == 3
  24. #define CONSOLE_DEV "ttyO2"
  25. #elif CONFIG_CONS_INDEX == 4
  26. #define CONSOLE_DEV "ttyO3"
  27. #elif CONFIG_CONS_INDEX == 5
  28. #define CONSOLE_DEV "ttyO4"
  29. #elif CONFIG_CONS_INDEX == 6
  30. #define CONSOLE_DEV "ttyO5"
  31. #endif
  32. #define CONFIG_BOOTCOMMAND \
  33. "run eval_boot_device;" \
  34. "setenv bootargs console=${console} " \
  35. "vt.global_cursor_default=0 " \
  36. "root=/dev/mmcblk${mmc_boot}p${root_fs_partition} " \
  37. "rootfstype=ext4 " \
  38. "rootwait " \
  39. "rootdelay=1;" \
  40. "fatload mmc ${mmc_boot} ${fdtaddr} ${fdtfile};" \
  41. "fatload mmc ${mmc_boot} ${loadaddr} ${bootfile};" \
  42. "bootz ${loadaddr} - ${fdtaddr}"
  43. #ifndef CONFIG_SPL_BUILD
  44. #define CONFIG_EXTRA_ENV_SETTINGS \
  45. DEFAULT_LINUX_BOOT_ENV \
  46. "fdtfile=am335x-pdu001.dtb\0" \
  47. "bootfile=zImage\0" \
  48. "console=" CONSOLE_DEV ",115200n8\0" \
  49. "root_fs_partition=2\0" \
  50. "eval_boot_device=" \
  51. "if test $boot_device = emmc; then " \
  52. "setenv mmc_boot 0;" \
  53. "elif test $boot_device = sdcard; then " \
  54. "setenv mmc_boot 1;" \
  55. "else " \
  56. "echo Bootdevice is neither MMC0 nor MMC1;" \
  57. "reset;" \
  58. "fi;" \
  59. "\0"
  60. #endif
  61. /* NS16550 Configuration */
  62. #define CONFIG_SYS_NS16550_COM1 UART0_BASE
  63. #define CONFIG_SYS_NS16550_COM2 UART1_BASE
  64. #define CONFIG_SYS_NS16550_COM3 UART2_BASE
  65. #define CONFIG_SYS_NS16550_COM4 UART3_BASE
  66. #define CONFIG_SYS_NS16550_COM5 UART4_BASE
  67. #define CONFIG_SYS_NS16550_COM6 UART5_BASE
  68. #define CONFIG_BAUDRATE 115200
  69. #endif /* ! __CONFIG_PDU001_H */