blob: 78a1a86431ce4ac8d887e59ad470c5d48a987dfd [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Felix Brack1ba8c9e2018-01-23 18:27:22 +01002/*
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/
Felix Brack1ba8c9e2018-01-23 18:27:22 +01008 */
9
10#ifndef __CONFIG_PDU001_H
11#define __CONFIG_PDU001_H
12
13#include <configs/ti_am335x_common.h>
14
Felix Brack1ba8c9e2018-01-23 18:27:22 +010015/* Using 32K of volatile storage for environment */
Felix Brack1ba8c9e2018-01-23 18:27:22 +010016
17#define MACH_TYPE_PDU001 5075
18#define CONFIG_MACH_TYPE MACH_TYPE_PDU001
19#define CONFIG_BOARD_LATE_INIT
20
21/* Clock Defines */
22#define V_OSCK 24000000 /* Clock output from T2 */
23#define V_SCLK (V_OSCK)
24
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
39#define CONFIG_BOOTCOMMAND \
40 "run eval_boot_device;" \
41 "setenv bootargs console=${console} " \
42 "vt.global_cursor_default=0 " \
43 "root=/dev/mmcblk${mmc_boot}p${root_fs_partition} " \
44 "rootfstype=ext4 " \
45 "rootwait " \
46 "rootdelay=1;" \
47 "fatload mmc ${mmc_boot} ${fdtaddr} ${fdtfile};" \
48 "fatload mmc ${mmc_boot} ${loadaddr} ${bootfile};" \
49 "bootz ${loadaddr} - ${fdtaddr}"
50
51#ifndef CONFIG_SPL_BUILD
52#define CONFIG_EXTRA_ENV_SETTINGS \
53 DEFAULT_LINUX_BOOT_ENV \
54 "fdtfile=am335x-pdu001.dtb\0" \
55 "bootfile=zImage\0" \
56 "console=" CONSOLE_DEV ",115200n8\0" \
57 "root_fs_partition=2\0" \
58 "eval_boot_device=" \
59 "if test $boot_device = emmc; then " \
60 "setenv mmc_boot 0;" \
61 "elif test $boot_device = sdcard; then " \
62 "setenv mmc_boot 1;" \
63 "else " \
64 "echo Bootdevice is neither MMC0 nor MMC1;" \
65 "reset;" \
66 "fi;" \
67 "\0"
68#endif
69
70/* NS16550 Configuration */
71#define CONFIG_SYS_NS16550_COM1 UART0_BASE
72#define CONFIG_SYS_NS16550_COM2 UART1_BASE
73#define CONFIG_SYS_NS16550_COM3 UART2_BASE
74#define CONFIG_SYS_NS16550_COM4 UART3_BASE
75#define CONFIG_SYS_NS16550_COM5 UART4_BASE
76#define CONFIG_SYS_NS16550_COM6 UART5_BASE
77#define CONFIG_BAUDRATE 115200
78
79#endif /* ! __CONFIG_PDU001_H */