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