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