Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Config file for Compulab CM-T54 board |
| 3 | * |
| 4 | * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ |
| 5 | * |
| 6 | * Author: Dmitry Lifshitz <lifshitz@compulab.co.il> |
| 7 | * |
| 8 | * SPDX-License-Identifier: GPL-2.0+ |
| 9 | */ |
| 10 | |
| 11 | #ifndef __CONFIG_CM_T54_H |
| 12 | #define __CONFIG_CM_T54_H |
| 13 | |
| 14 | #define CONFIG_CM_T54 |
| 15 | #define CONFIG_DRAM_2G |
| 16 | |
| 17 | #include <configs/ti_omap5_common.h> |
| 18 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 19 | #undef CONFIG_SPL_OS_BOOT |
| 20 | |
Dmitry Lifshitz | 0ff668f | 2014-07-31 14:30:41 +0300 | [diff] [blame] | 21 | /* Enable Generic board */ |
| 22 | #define CONFIG_SYS_GENERIC_BOARD |
| 23 | |
Dmitry Lifshitz | 0cc0b24 | 2014-04-27 13:18:46 +0300 | [diff] [blame] | 24 | /* Device Tree defines */ |
| 25 | #define CONFIG_OF_LIBFDT |
| 26 | #define CONFIG_OF_BOARD_SETUP |
| 27 | |
| 28 | /* EEPROM related defines */ |
| 29 | #define CONFIG_SYS_I2C_OMAP34XX |
| 30 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 31 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
Nikita Kiryanov | a8eeecb | 2014-08-20 15:08:52 +0300 | [diff] [blame] | 32 | #define CONFIG_SYS_I2C_EEPROM_BUS 0 |
Dmitry Lifshitz | 0cc0b24 | 2014-04-27 13:18:46 +0300 | [diff] [blame] | 33 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 34 | /* Enable SD/MMC CD and WP GPIOs */ |
| 35 | #define OMAP_HSMMC_USE_GPIO |
| 36 | |
| 37 | /* UART setup */ |
| 38 | #define CONFIG_CONS_INDEX 4 |
| 39 | #define CONFIG_SYS_NS16550_COM4 UART4_BASE |
| 40 | #define CONFIG_BAUDRATE 115200 |
| 41 | |
| 42 | /* SD/MMC RAW boot */ |
| 43 | #undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR |
| 44 | #undef CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS |
| 45 | |
| 46 | #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* 0x40000 - 256 KB */ |
| 47 | #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x300 /* 384 KB */ |
| 48 | |
| 49 | /* MMC ENV related defines */ |
| 50 | #undef CONFIG_ENV_OFFSET |
| 51 | #undef CONFIG_ENV_SIZE |
| 52 | |
| 53 | #define CONFIG_ENV_IS_IN_MMC |
| 54 | #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ |
Dmitry Lifshitz | f0ead5d | 2014-04-27 13:18:48 +0300 | [diff] [blame] | 55 | #define CONFIG_SYS_MMC_ENV_PART 0 |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 56 | #define CONFIG_ENV_OFFSET 0xc0000 /* (in bytes) 768 KB */ |
| 57 | #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */ |
| 58 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
| 59 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
| 60 | #define CONFIG_CMD_SAVEENV |
| 61 | |
| 62 | /* Enhance our eMMC support / experience. */ |
| 63 | #define CONFIG_HSMMC2_8BIT |
| 64 | #define CONFIG_SUPPORT_EMMC_BOOT |
| 65 | |
| 66 | /* USB UHH support options */ |
| 67 | #define CONFIG_CMD_USB |
| 68 | #define CONFIG_USB_HOST |
| 69 | #define CONFIG_USB_EHCI |
| 70 | #define CONFIG_USB_EHCI_OMAP |
| 71 | #define CONFIG_USB_STORAGE |
| 72 | #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 |
| 73 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 74 | |
| 75 | #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */ |
| 76 | #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */ |
| 77 | |
| 78 | /* Enabled commands */ |
| 79 | #define CONFIG_CMD_DHCP /* DHCP Support */ |
| 80 | #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ |
| 81 | #define CONFIG_CMD_PING |
| 82 | |
| 83 | /* USB Networking options */ |
| 84 | #define CONFIG_USB_HOST_ETHER |
| 85 | #define CONFIG_USB_ETHER_SMSC95XX |
| 86 | #define CONFIG_USB_ETHER_RNDIS |
| 87 | #define CONFIG_USB_ETHER_ASIX |
| 88 | #define CONFIG_USB_ETHER_MCS7830 |
| 89 | |
| 90 | /* Max time to hold reset on this board, see doc/README.omap-reset-time */ |
| 91 | #define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC 16296 |
| 92 | |
| 93 | /* |
| 94 | * Miscellaneous configurable options |
| 95 | */ |
| 96 | #undef CONFIG_SYS_AUTOLOAD |
| 97 | #undef CONFIG_SYS_PROMPT |
| 98 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 99 | #undef CONFIG_BOOTCOMMAND |
| 100 | #undef CONFIG_BOOTDELAY |
| 101 | |
| 102 | #define CONFIG_BOOTDELAY 3 |
| 103 | #define CONFIG_SYS_AUTOLOAD "no" |
| 104 | #define CONFIG_SYS_PROMPT "CM-T54 # " |
| 105 | |
| 106 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 107 | DEFAULT_LINUX_BOOT_ENV \ |
| 108 | "baudrate=115200\0" \ |
| 109 | "bootdelay=3\0" \ |
| 110 | "autoload=no\0" \ |
| 111 | "bootscr=bootscr.img\0" \ |
| 112 | "fdtfile=omap5-sbc-t54.dtb\0" \ |
| 113 | "kernel=zImage-cm-t54\0" \ |
| 114 | "ramdisk=ramdisk-cm-t54.img\0" \ |
| 115 | "console=ttyO3\0" \ |
| 116 | "ramdisksize=16384\0" \ |
| 117 | "mmcdev=0\0" \ |
| 118 | "mmcroot=/dev/mmcblk1p2\0" \ |
| 119 | "mmcargs=setenv bootargs console=${console} " \ |
| 120 | "root=${mmcroot} rw rootwait\0" \ |
| 121 | "ramroot=/dev/ram0\0" \ |
| 122 | "ramargs=setenv bootargs console=${console} " \ |
| 123 | "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \ |
| 124 | "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \ |
| 125 | "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ |
| 126 | "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \ |
| 127 | "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \ |
| 128 | "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \ |
| 129 | "source ${loadaddr}\0" \ |
| 130 | "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \ |
| 131 | "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
| 132 | "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \ |
| 133 | "if run mmcloadbootscript; " \ |
| 134 | "then run mmcbootscript; " \ |
| 135 | "fi; " \ |
| 136 | "if run mmcloadkernel; then " \ |
| 137 | "if run mmcloadfdt; then " \ |
| 138 | "if run mmcloadramdisk; then " \ |
| 139 | "run ramargs; " \ |
| 140 | "run mmcbootlinux; " \ |
| 141 | "fi; " \ |
| 142 | "run mmcargs; " \ |
| 143 | "setenv rdaddr - ; " \ |
| 144 | "run mmcbootlinux; " \ |
| 145 | "fi; " \ |
| 146 | "fi; " \ |
| 147 | "fi;\0" |
| 148 | |
| 149 | #define CONFIG_BOOTCOMMAND \ |
| 150 | "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;" |
| 151 | |
| 152 | #endif /* __CONFIG_CM_T54_H */ |