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 | 0cc0b24 | 2014-04-27 13:18:46 +0300 | [diff] [blame] | 19 | /* EEPROM related defines */ |
| 20 | #define CONFIG_SYS_I2C_OMAP34XX |
| 21 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 22 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
Nikita Kiryanov | a8eeecb | 2014-08-20 15:08:52 +0300 | [diff] [blame] | 23 | #define CONFIG_SYS_I2C_EEPROM_BUS 0 |
Dmitry Lifshitz | 0cc0b24 | 2014-04-27 13:18:46 +0300 | [diff] [blame] | 24 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 25 | /* Enable SD/MMC CD and WP GPIOs */ |
| 26 | #define OMAP_HSMMC_USE_GPIO |
| 27 | |
| 28 | /* UART setup */ |
| 29 | #define CONFIG_CONS_INDEX 4 |
| 30 | #define CONFIG_SYS_NS16550_COM4 UART4_BASE |
| 31 | #define CONFIG_BAUDRATE 115200 |
| 32 | |
| 33 | /* SD/MMC RAW boot */ |
| 34 | #undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR |
| 35 | #undef CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS |
| 36 | |
| 37 | #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* 0x40000 - 256 KB */ |
| 38 | #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x300 /* 384 KB */ |
| 39 | |
| 40 | /* MMC ENV related defines */ |
| 41 | #undef CONFIG_ENV_OFFSET |
| 42 | #undef CONFIG_ENV_SIZE |
| 43 | |
| 44 | #define CONFIG_ENV_IS_IN_MMC |
| 45 | #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ |
Dmitry Lifshitz | f0ead5d | 2014-04-27 13:18:48 +0300 | [diff] [blame] | 46 | #define CONFIG_SYS_MMC_ENV_PART 0 |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 47 | #define CONFIG_ENV_OFFSET 0xc0000 /* (in bytes) 768 KB */ |
| 48 | #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */ |
| 49 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
| 50 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 51 | |
| 52 | /* Enhance our eMMC support / experience. */ |
| 53 | #define CONFIG_HSMMC2_8BIT |
| 54 | #define CONFIG_SUPPORT_EMMC_BOOT |
| 55 | |
Dmitry Lifshitz | 60f53fc | 2014-12-15 16:02:59 +0200 | [diff] [blame] | 56 | /* SATA Boot related defines */ |
Dmitry Lifshitz | 60f53fc | 2014-12-15 16:02:59 +0200 | [diff] [blame] | 57 | #define CONFIG_SPL_SATA_BOOT_DEVICE 0 |
| 58 | #define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1 |
| 59 | |
Simon Glass | 8706b81 | 2016-05-01 11:36:02 -0600 | [diff] [blame] | 60 | #define CONFIG_SCSI |
Dmitry Lifshitz | 60f53fc | 2014-12-15 16:02:59 +0200 | [diff] [blame] | 61 | #define CONFIG_LIBATA |
| 62 | #define CONFIG_SCSI_AHCI |
| 63 | #define CONFIG_SCSI_AHCI_PLAT |
| 64 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 |
| 65 | #define CONFIG_SYS_SCSI_MAX_LUN 1 |
| 66 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ |
| 67 | CONFIG_SYS_SCSI_MAX_LUN) |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 68 | /* USB UHH support options */ |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 69 | #define CONFIG_USB_EHCI |
| 70 | #define CONFIG_USB_EHCI_OMAP |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 71 | #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 |
| 72 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 73 | |
| 74 | #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */ |
| 75 | #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */ |
| 76 | |
| 77 | /* Enabled commands */ |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 78 | |
Nikita Kiryanov | 2ba4d14 | 2016-04-16 17:55:07 +0300 | [diff] [blame] | 79 | /* EEPROM */ |
| 80 | #define CONFIG_CMD_EEPROM |
| 81 | #define CONFIG_ENV_EEPROM_IS_ON_I2C |
| 82 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
| 83 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 |
| 84 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 |
| 85 | #define CONFIG_SYS_EEPROM_SIZE 256 |
| 86 | |
| 87 | #define CONFIG_CMD_EEPROM_LAYOUT |
| 88 | #define CONFIG_EEPROM_LAYOUT_HELP_STRING "v2, v3" |
| 89 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 90 | /* USB Networking options */ |
| 91 | #define CONFIG_USB_HOST_ETHER |
| 92 | #define CONFIG_USB_ETHER_SMSC95XX |
| 93 | #define CONFIG_USB_ETHER_RNDIS |
| 94 | #define CONFIG_USB_ETHER_ASIX |
| 95 | #define CONFIG_USB_ETHER_MCS7830 |
| 96 | |
| 97 | /* Max time to hold reset on this board, see doc/README.omap-reset-time */ |
| 98 | #define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC 16296 |
| 99 | |
| 100 | /* |
| 101 | * Miscellaneous configurable options |
| 102 | */ |
| 103 | #undef CONFIG_SYS_AUTOLOAD |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 104 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 105 | #undef CONFIG_BOOTCOMMAND |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 106 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 107 | #define CONFIG_SYS_AUTOLOAD "no" |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 108 | |
| 109 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 110 | DEFAULT_LINUX_BOOT_ENV \ |
| 111 | "baudrate=115200\0" \ |
| 112 | "bootdelay=3\0" \ |
| 113 | "autoload=no\0" \ |
| 114 | "bootscr=bootscr.img\0" \ |
| 115 | "fdtfile=omap5-sbc-t54.dtb\0" \ |
| 116 | "kernel=zImage-cm-t54\0" \ |
| 117 | "ramdisk=ramdisk-cm-t54.img\0" \ |
| 118 | "console=ttyO3\0" \ |
| 119 | "ramdisksize=16384\0" \ |
| 120 | "mmcdev=0\0" \ |
| 121 | "mmcroot=/dev/mmcblk1p2\0" \ |
| 122 | "mmcargs=setenv bootargs console=${console} " \ |
| 123 | "root=${mmcroot} rw rootwait\0" \ |
| 124 | "ramroot=/dev/ram0\0" \ |
| 125 | "ramargs=setenv bootargs console=${console} " \ |
| 126 | "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \ |
| 127 | "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \ |
| 128 | "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ |
| 129 | "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \ |
| 130 | "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \ |
| 131 | "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \ |
| 132 | "source ${loadaddr}\0" \ |
| 133 | "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \ |
| 134 | "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
| 135 | "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \ |
| 136 | "if run mmcloadbootscript; " \ |
| 137 | "then run mmcbootscript; " \ |
| 138 | "fi; " \ |
| 139 | "if run mmcloadkernel; then " \ |
| 140 | "if run mmcloadfdt; then " \ |
| 141 | "if run mmcloadramdisk; then " \ |
| 142 | "run ramargs; " \ |
| 143 | "run mmcbootlinux; " \ |
| 144 | "fi; " \ |
| 145 | "run mmcargs; " \ |
| 146 | "setenv rdaddr - ; " \ |
| 147 | "run mmcbootlinux; " \ |
| 148 | "fi; " \ |
| 149 | "fi; " \ |
| 150 | "fi;\0" |
| 151 | |
| 152 | #define CONFIG_BOOTCOMMAND \ |
| 153 | "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;" |
| 154 | |
| 155 | #endif /* __CONFIG_CM_T54_H */ |