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