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