blob: 24d7dcd427c2232e48cbfdd2fc38c27b6ff76a14 [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 *
Nishanth Menoneaa39c62023-11-01 15:56:03 -05007 * Copyright (C) 2011 Texas Instruments Incorporated - https://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
Felix Brack1ba8c9e2018-01-23 18:27:22 +010017/* Clock Defines */
18#define V_OSCK 24000000 /* Clock output from T2 */
19#define V_SCLK (V_OSCK)
20
21#if CONFIG_CONS_INDEX == 1
22 #define CONSOLE_DEV "ttyO0"
23#elif CONFIG_CONS_INDEX == 2
24 #define CONSOLE_DEV "ttyO1"
25#elif CONFIG_CONS_INDEX == 3
26 #define CONSOLE_DEV "ttyO2"
27#elif CONFIG_CONS_INDEX == 4
28 #define CONSOLE_DEV "ttyO3"
29#elif CONFIG_CONS_INDEX == 5
30 #define CONSOLE_DEV "ttyO4"
31#elif CONFIG_CONS_INDEX == 6
32 #define CONSOLE_DEV "ttyO5"
33#endif
34
Tom Rinic9edebe2022-12-04 10:03:50 -050035#define CFG_EXTRA_ENV_SETTINGS \
Felix Brack1ba8c9e2018-01-23 18:27:22 +010036 DEFAULT_LINUX_BOOT_ENV \
37 "fdtfile=am335x-pdu001.dtb\0" \
38 "bootfile=zImage\0" \
39 "console=" CONSOLE_DEV ",115200n8\0" \
40 "root_fs_partition=2\0" \
41 "eval_boot_device=" \
42 "if test $boot_device = emmc; then " \
43 "setenv mmc_boot 0;" \
44 "elif test $boot_device = sdcard; then " \
45 "setenv mmc_boot 1;" \
46 "else " \
47 "echo Bootdevice is neither MMC0 nor MMC1;" \
48 "reset;" \
49 "fi;" \
50 "\0"
Felix Brack1ba8c9e2018-01-23 18:27:22 +010051
52/* NS16550 Configuration */
Tom Rinidf6a2152022-11-16 13:10:28 -050053#define CFG_SYS_NS16550_COM1 UART0_BASE
54#define CFG_SYS_NS16550_COM2 UART1_BASE
55#define CFG_SYS_NS16550_COM3 UART2_BASE
56#define CFG_SYS_NS16550_COM4 UART3_BASE
57#define CFG_SYS_NS16550_COM5 UART4_BASE
58#define CFG_SYS_NS16550_COM6 UART5_BASE
Felix Brack1ba8c9e2018-01-23 18:27:22 +010059
60#endif /* ! __CONFIG_PDU001_H */