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 | |
Felix Brack | 85ab045 | 2018-01-23 18:27:22 +0100 | [diff] [blame] | 17 | /* 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 | |
| 35 | #define CONFIG_BOOTCOMMAND \ |
| 36 | "run eval_boot_device;" \ |
Felix Brack | ffa6602 | 2020-12-18 09:03:50 +0100 | [diff] [blame] | 37 | "part uuid mmc ${mmc_boot}:${root_fs_partition} root_fs_partuuid;" \ |
Felix Brack | 85ab045 | 2018-01-23 18:27:22 +0100 | [diff] [blame] | 38 | "setenv bootargs console=${console} " \ |
| 39 | "vt.global_cursor_default=0 " \ |
Felix Brack | ffa6602 | 2020-12-18 09:03:50 +0100 | [diff] [blame] | 40 | "root=PARTUUID=${root_fs_partuuid} " \ |
Felix Brack | 85ab045 | 2018-01-23 18:27:22 +0100 | [diff] [blame] | 41 | "rootfstype=ext4 " \ |
| 42 | "rootwait " \ |
| 43 | "rootdelay=1;" \ |
| 44 | "fatload mmc ${mmc_boot} ${fdtaddr} ${fdtfile};" \ |
| 45 | "fatload mmc ${mmc_boot} ${loadaddr} ${bootfile};" \ |
| 46 | "bootz ${loadaddr} - ${fdtaddr}" |
| 47 | |
| 48 | #ifndef CONFIG_SPL_BUILD |
| 49 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 50 | DEFAULT_LINUX_BOOT_ENV \ |
| 51 | "fdtfile=am335x-pdu001.dtb\0" \ |
| 52 | "bootfile=zImage\0" \ |
| 53 | "console=" CONSOLE_DEV ",115200n8\0" \ |
| 54 | "root_fs_partition=2\0" \ |
| 55 | "eval_boot_device=" \ |
| 56 | "if test $boot_device = emmc; then " \ |
| 57 | "setenv mmc_boot 0;" \ |
| 58 | "elif test $boot_device = sdcard; then " \ |
| 59 | "setenv mmc_boot 1;" \ |
| 60 | "else " \ |
| 61 | "echo Bootdevice is neither MMC0 nor MMC1;" \ |
| 62 | "reset;" \ |
| 63 | "fi;" \ |
| 64 | "\0" |
| 65 | #endif |
| 66 | |
| 67 | /* NS16550 Configuration */ |
| 68 | #define CONFIG_SYS_NS16550_COM1 UART0_BASE |
| 69 | #define CONFIG_SYS_NS16550_COM2 UART1_BASE |
| 70 | #define CONFIG_SYS_NS16550_COM3 UART2_BASE |
| 71 | #define CONFIG_SYS_NS16550_COM4 UART3_BASE |
| 72 | #define CONFIG_SYS_NS16550_COM5 UART4_BASE |
| 73 | #define CONFIG_SYS_NS16550_COM6 UART5_BASE |
Felix Brack | 85ab045 | 2018-01-23 18:27:22 +0100 | [diff] [blame] | 74 | |
| 75 | #endif /* ! __CONFIG_PDU001_H */ |