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