Dmitry Lifshitz | 10a59d0 | 2016-12-28 18:28:33 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Configuration settings for CompuLab CL-SOM-AM57x board |
| 3 | * |
| 4 | * (C) Copyright 2016 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_CL_SOM_AM57X_H |
| 12 | #define __CONFIG_CL_SOM_AM57X_H |
| 13 | |
| 14 | #define CONFIG_DRA7XX |
| 15 | |
| 16 | #define CONFIG_NR_DRAM_BANKS 2 |
| 17 | |
| 18 | #define CONSOLEDEV "ttyO2" |
| 19 | #define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */ |
| 20 | #define CONFIG_CONS_INDEX 3 |
| 21 | #define CONFIG_BAUDRATE 115200 |
| 22 | |
| 23 | #define CONFIG_SYS_OMAP_ABE_SYSCK |
| 24 | |
| 25 | #include <configs/ti_omap5_common.h> |
| 26 | |
Dmitry Lifshitz | 39f9cf0 | 2016-12-28 18:28:34 +0200 | [diff] [blame] | 27 | /* misc */ |
| 28 | #define CONFIG_MISC_INIT_R |
| 29 | #define CONFIG_REVISION_TAG |
| 30 | |
Dmitry Lifshitz | 10a59d0 | 2016-12-28 18:28:33 +0200 | [diff] [blame] | 31 | /* PMIC I2C bus number */ |
| 32 | #define CONFIG_SYS_SPD_BUS_NUM 3 |
| 33 | |
| 34 | /* SPI Flash support */ |
| 35 | #undef CONFIG_OMAP3_SPI |
| 36 | |
| 37 | #define CONFIG_TI_SPI_MMAP |
| 38 | #define CONFIG_SF_DEFAULT_SPEED 48000000 |
| 39 | #define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3 |
| 40 | |
| 41 | /* SPI SPL defines */ |
| 42 | /* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */ |
| 43 | #define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024) |
| 44 | #define CONFIG_SPL_SPI_SUPPORT |
| 45 | #define CONFIG_SPL_SPI_FLASH_SUPPORT |
| 46 | #define CONFIG_SPL_SPI_LOAD |
| 47 | |
| 48 | /* SD/MMC RAW boot */ |
| 49 | #undef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME |
| 50 | #undef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION |
| 51 | |
| 52 | /* Environment */ |
| 53 | #define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB env size */ |
| 54 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
| 55 | |
| 56 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 57 | #define CONFIG_ENV_SECT_SIZE (64 * 1024) |
| 58 | #define CONFIG_ENV_OFFSET (768 * 1024) |
| 59 | #define CONFIG_ENV_SPI_MAX_HZ 48000000 |
| 60 | |
Dmitry Lifshitz | 39f9cf0 | 2016-12-28 18:28:34 +0200 | [diff] [blame] | 61 | /* EEPROM */ |
| 62 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 63 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
| 64 | #define CONFIG_SYS_I2C_EEPROM_BUS 3 |
| 65 | |
| 66 | #define CONFIG_CMD_EEPROM |
| 67 | #define CONFIG_CMD_EEPROM_LAYOUT |
| 68 | #define CONFIG_ENV_EEPROM_IS_ON_I2C |
| 69 | #define CONFIG_SYS_EEPROM_SIZE 256 |
| 70 | |
Dmitry Lifshitz | 10a59d0 | 2016-12-28 18:28:33 +0200 | [diff] [blame] | 71 | #ifndef CONFIG_SPL_BUILD |
| 72 | /* SATA */ |
| 73 | #define CONFIG_CMD_SCSI |
| 74 | #define CONFIG_LIBATA |
| 75 | #define CONFIG_SCSI_AHCI |
| 76 | #define CONFIG_SCSI_AHCI_PLAT |
| 77 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 |
| 78 | #define CONFIG_SYS_SCSI_MAX_LUN 1 |
| 79 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ |
| 80 | CONFIG_SYS_SCSI_MAX_LUN) |
| 81 | /* PCA9555 GPIO expander support */ |
| 82 | #define CONFIG_PCA953X |
| 83 | #define CONFIG_CMD_PCA953X |
| 84 | #define CONFIG_CMD_PCA953X_INFO |
| 85 | #define CONFIG_SYS_I2C_PCA953X_ADDR 0x20 |
| 86 | #define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} } |
| 87 | |
Dmitry Lifshitz | 10a59d0 | 2016-12-28 18:28:33 +0200 | [diff] [blame] | 88 | /* USB xHCI HOST */ |
| 89 | #define CONFIG_USB_XHCI_OMAP |
| 90 | #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 |
| 91 | |
| 92 | #define CONFIG_OMAP_USB_PHY |
| 93 | #define CONFIG_OMAP_USB3PHY1_HOST |
| 94 | |
| 95 | /* USB Networking options */ |
| 96 | #define CONFIG_USB_HOST_ETHER |
| 97 | #define CONFIG_USB_ETHER_SMSC95XX |
| 98 | #define CONFIG_USB_ETHER_RNDIS |
| 99 | #define CONFIG_USB_ETHER_ASIX |
| 100 | #define CONFIG_USB_ETHER_MCS7830 |
| 101 | |
Uri Mashiach | 475d67c | 2017-01-23 13:14:18 +0200 | [diff] [blame] | 102 | #endif /* !CONFIG_SPL_BUILD */ |
| 103 | |
Dmitry Lifshitz | 1f182e1 | 2016-12-28 18:28:35 +0200 | [diff] [blame] | 104 | /* CPSW Ethernet */ |
| 105 | #define CONFIG_DRIVER_TI_CPSW |
| 106 | #define CONFIG_MII |
| 107 | #define CONFIG_BOOTP_DEFAULT |
| 108 | #define CONFIG_BOOTP_SEND_HOSTNAME |
| 109 | #define CONFIG_BOOTP_GATEWAY |
| 110 | #define CONFIG_PHY_GIGE |
| 111 | #define CONFIG_PHY_ATHEROS |
| 112 | #define CONFIG_PHYLIB |
| 113 | #define CONFIG_SYS_RX_ETH_BUFFER 64 |
| 114 | #define PHY_ANEG_TIMEOUT 8000 |
| 115 | |
| 116 | #define CONFIG_BOOTP_DNS |
| 117 | #define CONFIG_BOOTP_DNS2 |
| 118 | #define CONFIG_BOOTP_SUBNETMASK |
| 119 | #define CONFIG_NET_RETRY_COUNT 10 |
| 120 | |
Uri Mashiach | 30a6712 | 2016-12-28 18:28:36 +0200 | [diff] [blame] | 121 | /* Default environment */ |
| 122 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 123 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 124 | DEFAULT_LINUX_BOOT_ENV \ |
| 125 | "autoload=no\0" \ |
| 126 | "baudrate=115200\0" \ |
| 127 | "console=ttyO2,115200n8\0" \ |
| 128 | "bootdelay=3\0" \ |
| 129 | "fdtfile=am57xx-sbc-am57x.dtb\0" \ |
| 130 | "kernel=zImage-cl-som-am57x\0" \ |
| 131 | "bootscr=bootscr.img\0" \ |
| 132 | "displaytype=hdmi\0" \ |
| 133 | "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \ |
| 134 | "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ |
| 135 | "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \ |
| 136 | "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \ |
| 137 | "run mmcloadkernel run mmcloadfdt\0" \ |
| 138 | "mmcroot=/dev/mmcblk1p2\0" \ |
| 139 | "mmcrootfstype=ext4 rw rootwait\0" \ |
| 140 | "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \ |
| 141 | "rootfstype=${mmcrootfstype}\0" \ |
| 142 | "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \ |
| 143 | "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \ |
| 144 | "echo Running bootscript from MMC/SD Card ... && " \ |
| 145 | "source ${loadaddr}\0" \ |
| 146 | "mmcboot=setenv mmcdev 0 && run load_mmc && " \ |
| 147 | "run mmcargs && echo Booting from MMC/SD Card ... && " \ |
| 148 | "run bootkernel\0" \ |
| 149 | "emmcroot=/dev/mmcblk0p2\0" \ |
| 150 | "emmcrootfstype=ext4 rw rootwait\0" \ |
| 151 | "emmcargs=setenv bootargs console=${console} " \ |
| 152 | "root=${emmcroot} " \ |
| 153 | "rootfstype=${emmcrootfstype}\0" \ |
| 154 | "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \ |
| 155 | "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \ |
| 156 | "echo Running bootscript from eMMC ... && " \ |
| 157 | "source ${loadaddr}\0" \ |
| 158 | "emmcboot=setenv mmcdev 1 && run load_mmc && " \ |
| 159 | "run emmcargs && echo Booting from eMMC ... && " \ |
| 160 | "run bootkernel\0" \ |
| 161 | "sataroot=/dev/sda2\0" \ |
| 162 | "satarootfstype=ext4 rw rootwait\0" \ |
| 163 | "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \ |
| 164 | "load scsi 0 ${fdtaddr} ${fdtfile}\0" \ |
| 165 | "sataargs=setenv bootargs console=${console} " \ |
| 166 | "root=${sataroot} " \ |
| 167 | "rootfstype=${satarootfstype}\0" \ |
| 168 | "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \ |
| 169 | "echo Running bootscript from SATA ... && " \ |
| 170 | "source ${loadaddr}\0" \ |
| 171 | "sataboot=run load_sata && run sataargs && " \ |
| 172 | "echo Booting from SATA ... && " \ |
| 173 | "run bootkernel\0" \ |
| 174 | |
| 175 | #undef CONFIG_BOOTCOMMAND |
| 176 | #define CONFIG_BOOTCOMMAND \ |
| 177 | "run mmcbootscript || run mmcboot || " \ |
| 178 | "run satabootscript || run sataboot || " \ |
| 179 | "run emmcbootscript || run emmcboot" |
| 180 | |
| 181 | |
Dmitry Lifshitz | 10a59d0 | 2016-12-28 18:28:33 +0200 | [diff] [blame] | 182 | #endif /* __CONFIG_CL_SOM_AM57X_H */ |