Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 2 | /* |
| 3 | * Config file for Compulab CM-T54 board |
| 4 | * |
| 5 | * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ |
| 6 | * |
| 7 | * Author: Dmitry Lifshitz <lifshitz@compulab.co.il> |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __CONFIG_CM_T54_H |
| 11 | #define __CONFIG_CM_T54_H |
| 12 | |
| 13 | #define CONFIG_CM_T54 |
| 14 | #define CONFIG_DRAM_2G |
| 15 | |
| 16 | #include <configs/ti_omap5_common.h> |
| 17 | |
Dmitry Lifshitz | 0cc0b24 | 2014-04-27 13:18:46 +0300 | [diff] [blame] | 18 | /* EEPROM related defines */ |
Dmitry Lifshitz | 0cc0b24 | 2014-04-27 13:18:46 +0300 | [diff] [blame] | 19 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 20 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
Nikita Kiryanov | a8eeecb | 2014-08-20 15:08:52 +0300 | [diff] [blame] | 21 | #define CONFIG_SYS_I2C_EEPROM_BUS 0 |
Dmitry Lifshitz | 0cc0b24 | 2014-04-27 13:18:46 +0300 | [diff] [blame] | 22 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 23 | /* Enable SD/MMC CD and WP GPIOs */ |
| 24 | #define OMAP_HSMMC_USE_GPIO |
| 25 | |
| 26 | /* UART setup */ |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 27 | #define CONFIG_SYS_NS16550_COM4 UART4_BASE |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 28 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 29 | /* MMC ENV related defines */ |
| 30 | #undef CONFIG_ENV_OFFSET |
| 31 | #undef CONFIG_ENV_SIZE |
| 32 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 33 | #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ |
Dmitry Lifshitz | f0ead5d | 2014-04-27 13:18:48 +0300 | [diff] [blame] | 34 | #define CONFIG_SYS_MMC_ENV_PART 0 |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 35 | #define CONFIG_ENV_OFFSET 0xc0000 /* (in bytes) 768 KB */ |
| 36 | #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */ |
| 37 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
| 38 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 39 | |
| 40 | /* Enhance our eMMC support / experience. */ |
| 41 | #define CONFIG_HSMMC2_8BIT |
| 42 | #define CONFIG_SUPPORT_EMMC_BOOT |
| 43 | |
Dmitry Lifshitz | 60f53fc | 2014-12-15 16:02:59 +0200 | [diff] [blame] | 44 | /* SATA Boot related defines */ |
Dmitry Lifshitz | 60f53fc | 2014-12-15 16:02:59 +0200 | [diff] [blame] | 45 | #define CONFIG_SPL_SATA_BOOT_DEVICE 0 |
| 46 | #define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1 |
| 47 | |
Dmitry Lifshitz | 60f53fc | 2014-12-15 16:02:59 +0200 | [diff] [blame] | 48 | #define CONFIG_SCSI_AHCI_PLAT |
| 49 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 |
| 50 | #define CONFIG_SYS_SCSI_MAX_LUN 1 |
| 51 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ |
| 52 | CONFIG_SYS_SCSI_MAX_LUN) |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 53 | /* USB UHH support options */ |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 54 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 55 | |
| 56 | #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */ |
| 57 | #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */ |
| 58 | |
| 59 | /* Enabled commands */ |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 60 | |
Nikita Kiryanov | 2ba4d14 | 2016-04-16 17:55:07 +0300 | [diff] [blame] | 61 | /* EEPROM */ |
Nikita Kiryanov | 2ba4d14 | 2016-04-16 17:55:07 +0300 | [diff] [blame] | 62 | #define CONFIG_ENV_EEPROM_IS_ON_I2C |
| 63 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
| 64 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 |
| 65 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 |
| 66 | #define CONFIG_SYS_EEPROM_SIZE 256 |
| 67 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 68 | /* USB Networking options */ |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 69 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 70 | /* |
| 71 | * Miscellaneous configurable options |
| 72 | */ |
| 73 | #undef CONFIG_SYS_AUTOLOAD |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 74 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 75 | #undef CONFIG_BOOTCOMMAND |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 76 | |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 77 | #define CONFIG_SYS_AUTOLOAD "no" |
Dmitry Lifshitz | c3ad3a0 | 2014-05-19 12:50:54 +0300 | [diff] [blame] | 78 | |
| 79 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 80 | DEFAULT_LINUX_BOOT_ENV \ |
| 81 | "baudrate=115200\0" \ |
| 82 | "bootdelay=3\0" \ |
| 83 | "autoload=no\0" \ |
| 84 | "bootscr=bootscr.img\0" \ |
| 85 | "fdtfile=omap5-sbc-t54.dtb\0" \ |
| 86 | "kernel=zImage-cm-t54\0" \ |
| 87 | "ramdisk=ramdisk-cm-t54.img\0" \ |
| 88 | "console=ttyO3\0" \ |
| 89 | "ramdisksize=16384\0" \ |
| 90 | "mmcdev=0\0" \ |
| 91 | "mmcroot=/dev/mmcblk1p2\0" \ |
| 92 | "mmcargs=setenv bootargs console=${console} " \ |
| 93 | "root=${mmcroot} rw rootwait\0" \ |
| 94 | "ramroot=/dev/ram0\0" \ |
| 95 | "ramargs=setenv bootargs console=${console} " \ |
| 96 | "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \ |
| 97 | "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \ |
| 98 | "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ |
| 99 | "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \ |
| 100 | "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \ |
| 101 | "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \ |
| 102 | "source ${loadaddr}\0" \ |
| 103 | "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \ |
| 104 | "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
| 105 | "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \ |
| 106 | "if run mmcloadbootscript; " \ |
| 107 | "then run mmcbootscript; " \ |
| 108 | "fi; " \ |
| 109 | "if run mmcloadkernel; then " \ |
| 110 | "if run mmcloadfdt; then " \ |
| 111 | "if run mmcloadramdisk; then " \ |
| 112 | "run ramargs; " \ |
| 113 | "run mmcbootlinux; " \ |
| 114 | "fi; " \ |
| 115 | "run mmcargs; " \ |
| 116 | "setenv rdaddr - ; " \ |
| 117 | "run mmcbootlinux; " \ |
| 118 | "fi; " \ |
| 119 | "fi; " \ |
| 120 | "fi;\0" |
| 121 | |
| 122 | #define CONFIG_BOOTCOMMAND \ |
| 123 | "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;" |
| 124 | |
| 125 | #endif /* __CONFIG_CM_T54_H */ |