183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2076446f1SDmitry Lifshitz /* 3076446f1SDmitry Lifshitz * Config file for Compulab CM-T54 board 4076446f1SDmitry Lifshitz * 5076446f1SDmitry Lifshitz * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ 6076446f1SDmitry Lifshitz * 7076446f1SDmitry Lifshitz * Author: Dmitry Lifshitz <lifshitz@compulab.co.il> 8076446f1SDmitry Lifshitz */ 9076446f1SDmitry Lifshitz 10076446f1SDmitry Lifshitz #ifndef __CONFIG_CM_T54_H 11076446f1SDmitry Lifshitz #define __CONFIG_CM_T54_H 12076446f1SDmitry Lifshitz 13076446f1SDmitry Lifshitz #define CONFIG_CM_T54 14076446f1SDmitry Lifshitz #define CONFIG_DRAM_2G 15076446f1SDmitry Lifshitz 16*c90a760fSSam Protsenko #define PARTS_DEFAULT 17*c90a760fSSam Protsenko 18076446f1SDmitry Lifshitz #include <configs/ti_omap5_common.h> 19076446f1SDmitry Lifshitz 20a9375f33SDmitry Lifshitz /* EEPROM related defines */ 21a9375f33SDmitry Lifshitz #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 22a9375f33SDmitry Lifshitz #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 2352658fdaSNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_BUS 0 24a9375f33SDmitry Lifshitz 25076446f1SDmitry Lifshitz /* Enable SD/MMC CD and WP GPIOs */ 26076446f1SDmitry Lifshitz #define OMAP_HSMMC_USE_GPIO 27076446f1SDmitry Lifshitz 28076446f1SDmitry Lifshitz /* UART setup */ 29076446f1SDmitry Lifshitz #define CONFIG_SYS_NS16550_COM4 UART4_BASE 30076446f1SDmitry Lifshitz 31076446f1SDmitry Lifshitz /* MMC ENV related defines */ 32076446f1SDmitry Lifshitz #undef CONFIG_ENV_OFFSET 33076446f1SDmitry Lifshitz #undef CONFIG_ENV_SIZE 34076446f1SDmitry Lifshitz 35076446f1SDmitry Lifshitz #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ 361c8c36f5SDmitry Lifshitz #define CONFIG_SYS_MMC_ENV_PART 0 37076446f1SDmitry Lifshitz #define CONFIG_ENV_OFFSET 0xc0000 /* (in bytes) 768 KB */ 38076446f1SDmitry Lifshitz #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */ 39076446f1SDmitry Lifshitz #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) 40076446f1SDmitry Lifshitz #define CONFIG_SYS_REDUNDAND_ENVIRONMENT 41076446f1SDmitry Lifshitz 42076446f1SDmitry Lifshitz /* Enhance our eMMC support / experience. */ 43076446f1SDmitry Lifshitz #define CONFIG_HSMMC2_8BIT 44076446f1SDmitry Lifshitz #define CONFIG_SUPPORT_EMMC_BOOT 45076446f1SDmitry Lifshitz 4696b5bf11SDmitry Lifshitz /* SATA Boot related defines */ 4796b5bf11SDmitry Lifshitz #define CONFIG_SPL_SATA_BOOT_DEVICE 0 4896b5bf11SDmitry Lifshitz #define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1 4996b5bf11SDmitry Lifshitz 5096b5bf11SDmitry Lifshitz #define CONFIG_SCSI_AHCI_PLAT 5196b5bf11SDmitry Lifshitz #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 5296b5bf11SDmitry Lifshitz #define CONFIG_SYS_SCSI_MAX_LUN 1 5396b5bf11SDmitry Lifshitz #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ 5496b5bf11SDmitry Lifshitz CONFIG_SYS_SCSI_MAX_LUN) 55076446f1SDmitry Lifshitz /* USB UHH support options */ 56076446f1SDmitry Lifshitz #define CONFIG_EHCI_HCD_INIT_AFTER_RESET 57076446f1SDmitry Lifshitz 58076446f1SDmitry Lifshitz #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */ 59076446f1SDmitry Lifshitz #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */ 60076446f1SDmitry Lifshitz 61076446f1SDmitry Lifshitz /* Enabled commands */ 62076446f1SDmitry Lifshitz 6366b7e420SNikita Kiryanov /* EEPROM */ 6466b7e420SNikita Kiryanov #define CONFIG_ENV_EEPROM_IS_ON_I2C 6566b7e420SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 6666b7e420SNikita Kiryanov #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 6766b7e420SNikita Kiryanov #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 6866b7e420SNikita Kiryanov #define CONFIG_SYS_EEPROM_SIZE 256 6966b7e420SNikita Kiryanov 70076446f1SDmitry Lifshitz /* USB Networking options */ 71076446f1SDmitry Lifshitz 72076446f1SDmitry Lifshitz /* 73076446f1SDmitry Lifshitz * Miscellaneous configurable options 74076446f1SDmitry Lifshitz */ 75076446f1SDmitry Lifshitz #undef CONFIG_SYS_AUTOLOAD 76076446f1SDmitry Lifshitz #undef CONFIG_EXTRA_ENV_SETTINGS 77076446f1SDmitry Lifshitz #undef CONFIG_BOOTCOMMAND 78076446f1SDmitry Lifshitz 79076446f1SDmitry Lifshitz #define CONFIG_SYS_AUTOLOAD "no" 80076446f1SDmitry Lifshitz 81076446f1SDmitry Lifshitz #define CONFIG_EXTRA_ENV_SETTINGS \ 82076446f1SDmitry Lifshitz DEFAULT_LINUX_BOOT_ENV \ 83076446f1SDmitry Lifshitz "baudrate=115200\0" \ 84076446f1SDmitry Lifshitz "bootdelay=3\0" \ 85076446f1SDmitry Lifshitz "autoload=no\0" \ 86076446f1SDmitry Lifshitz "bootscr=bootscr.img\0" \ 87076446f1SDmitry Lifshitz "fdtfile=omap5-sbc-t54.dtb\0" \ 88076446f1SDmitry Lifshitz "kernel=zImage-cm-t54\0" \ 89076446f1SDmitry Lifshitz "ramdisk=ramdisk-cm-t54.img\0" \ 90076446f1SDmitry Lifshitz "console=ttyO3\0" \ 91076446f1SDmitry Lifshitz "ramdisksize=16384\0" \ 92076446f1SDmitry Lifshitz "mmcdev=0\0" \ 93076446f1SDmitry Lifshitz "mmcroot=/dev/mmcblk1p2\0" \ 94076446f1SDmitry Lifshitz "mmcargs=setenv bootargs console=${console} " \ 95076446f1SDmitry Lifshitz "root=${mmcroot} rw rootwait\0" \ 96076446f1SDmitry Lifshitz "ramroot=/dev/ram0\0" \ 97076446f1SDmitry Lifshitz "ramargs=setenv bootargs console=${console} " \ 98076446f1SDmitry Lifshitz "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \ 99076446f1SDmitry Lifshitz "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \ 100076446f1SDmitry Lifshitz "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ 101076446f1SDmitry Lifshitz "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \ 102076446f1SDmitry Lifshitz "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \ 103076446f1SDmitry Lifshitz "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \ 104076446f1SDmitry Lifshitz "source ${loadaddr}\0" \ 105076446f1SDmitry Lifshitz "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \ 106076446f1SDmitry Lifshitz "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ 107076446f1SDmitry Lifshitz "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \ 108076446f1SDmitry Lifshitz "if run mmcloadbootscript; " \ 109076446f1SDmitry Lifshitz "then run mmcbootscript; " \ 110076446f1SDmitry Lifshitz "fi; " \ 111076446f1SDmitry Lifshitz "if run mmcloadkernel; then " \ 112076446f1SDmitry Lifshitz "if run mmcloadfdt; then " \ 113076446f1SDmitry Lifshitz "if run mmcloadramdisk; then " \ 114076446f1SDmitry Lifshitz "run ramargs; " \ 115076446f1SDmitry Lifshitz "run mmcbootlinux; " \ 116076446f1SDmitry Lifshitz "fi; " \ 117076446f1SDmitry Lifshitz "run mmcargs; " \ 118076446f1SDmitry Lifshitz "setenv rdaddr - ; " \ 119076446f1SDmitry Lifshitz "run mmcbootlinux; " \ 120076446f1SDmitry Lifshitz "fi; " \ 121076446f1SDmitry Lifshitz "fi; " \ 122076446f1SDmitry Lifshitz "fi;\0" 123076446f1SDmitry Lifshitz 124076446f1SDmitry Lifshitz #define CONFIG_BOOTCOMMAND \ 125076446f1SDmitry Lifshitz "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;" 126076446f1SDmitry Lifshitz 127076446f1SDmitry Lifshitz #endif /* __CONFIG_CM_T54_H */ 128