pdu001.h 2.0 KB

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