1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Configuration settings for CompuLab CL-SOM-AM57x board 4 * 5 * (C) Copyright 2016 CompuLab, Ltd. http://compulab.co.il/ 6 * 7 * Author: Dmitry Lifshitz <lifshitz@compulab.co.il> 8 */ 9 10 #ifndef __CONFIG_CL_SOM_AM57X_H 11 #define __CONFIG_CL_SOM_AM57X_H 12 13 #define CONSOLEDEV "ttyO2" 14 #define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */ 15 16 #define CONFIG_SYS_OMAP_ABE_SYSCK 17 18 #define PARTS_DEFAULT 19 20 #include <configs/ti_omap5_common.h> 21 22 /* misc */ 23 #define CONFIG_REVISION_TAG 24 25 /* PMIC I2C bus number */ 26 #define CONFIG_SYS_SPD_BUS_NUM 3 27 28 /* SPI Flash support */ 29 #define CONFIG_TI_SPI_MMAP 30 31 /* SPI SPL defines */ 32 /* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */ 33 #define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024) 34 #define CONFIG_SPL_SPI_SUPPORT 35 36 /* SD/MMC RAW/FS boot */ 37 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" 38 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 39 40 /* Environment */ 41 #define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB env size */ 42 43 #define CONFIG_ENV_SECT_SIZE (64 * 1024) 44 #define CONFIG_ENV_OFFSET (768 * 1024) 45 46 /* EEPROM */ 47 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 48 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 49 #define CONFIG_SYS_I2C_EEPROM_BUS 3 50 51 #define CONFIG_ENV_EEPROM_IS_ON_I2C 52 #define CONFIG_SYS_EEPROM_SIZE 256 53 54 #ifndef CONFIG_SPL_BUILD 55 /* SATA */ 56 #define CONFIG_SCSI_AHCI_PLAT 57 #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 58 #define CONFIG_SYS_SCSI_MAX_LUN 1 59 #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ 60 CONFIG_SYS_SCSI_MAX_LUN) 61 /* PCA9555 GPIO expander support */ 62 #define CONFIG_PCA953X 63 #define CONFIG_SYS_I2C_PCA953X_ADDR 0x20 64 #define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} } 65 66 #endif /* !CONFIG_SPL_BUILD */ 67 68 /* USB xHCI HOST */ 69 #define CONFIG_USB_XHCI_OMAP 70 71 #define CONFIG_OMAP_USB3PHY1_HOST 72 73 /* USB Networking options */ 74 75 /* CPSW Ethernet */ 76 #define CONFIG_BOOTP_DEFAULT 77 #define CONFIG_BOOTP_SEND_HOSTNAME 78 #define CONFIG_PHY_ATHEROS 79 #define CONFIG_SYS_RX_ETH_BUFFER 64 80 #define PHY_ANEG_TIMEOUT 8000 81 82 #define CONFIG_BOOTP_DNS2 83 #define CONFIG_NET_RETRY_COUNT 10 84 85 /* Default environment */ 86 #undef CONFIG_EXTRA_ENV_SETTINGS 87 #define CONFIG_EXTRA_ENV_SETTINGS \ 88 DEFAULT_LINUX_BOOT_ENV \ 89 "autoload=no\0" \ 90 "baudrate=115200\0" \ 91 "console=ttyO2,115200n8\0" \ 92 "bootdelay=3\0" \ 93 "fdtfile=am57xx-sbc-am57x.dtb\0" \ 94 "kernel=zImage-cl-som-am57x\0" \ 95 "bootscr=bootscr.img\0" \ 96 "displaytype=hdmi\0" \ 97 "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \ 98 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ 99 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \ 100 "emmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ 101 "emmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \ 102 "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \ 103 "run mmcloadkernel && run mmcloadfdt\0" \ 104 "mmcroot=/dev/mmcblk1p2\0" \ 105 "mmcrootfstype=ext4 rw rootwait\0" \ 106 "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \ 107 "rootfstype=${mmcrootfstype}\0" \ 108 "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \ 109 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \ 110 "echo Running bootscript from MMC/SD Card ... && " \ 111 "source ${loadaddr}\0" \ 112 "mmcboot=setenv mmcdev 0 && run load_mmc && " \ 113 "run mmcargs && echo Booting from MMC/SD Card ... && " \ 114 "run bootkernel\0" \ 115 "emmcroot=/dev/mmcblk0p2\0" \ 116 "emmcrootfstype=ext4 rw rootwait\0" \ 117 "emmcargs=setenv bootargs console=${console} " \ 118 "root=${emmcroot} " \ 119 "rootfstype=${emmcrootfstype}\0" \ 120 "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \ 121 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \ 122 "echo Running bootscript from eMMC ... && " \ 123 "source ${loadaddr}\0" \ 124 "emmcboot=setenv mmcdev 1 && run load_mmc && " \ 125 "run emmcargs && echo Booting from eMMC ... && " \ 126 "run bootkernel\0" \ 127 "sataroot=/dev/sda2\0" \ 128 "satarootfstype=ext4 rw rootwait\0" \ 129 "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \ 130 "load scsi 0 ${fdtaddr} ${fdtfile}\0" \ 131 "sataargs=setenv bootargs console=${console} " \ 132 "root=${sataroot} " \ 133 "rootfstype=${satarootfstype}\0" \ 134 "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \ 135 "echo Running bootscript from SATA ... && " \ 136 "source ${loadaddr}\0" \ 137 "sataboot=run load_sata && run sataargs && " \ 138 "echo Booting from SATA ... && " \ 139 "run bootkernel\0" 140 141 #undef CONFIG_BOOTCOMMAND 142 #define CONFIG_BOOTCOMMAND \ 143 "run mmcbootscript || run mmcboot || " \ 144 "run satabootscript || run sataboot || " \ 145 "run emmcbootscript || run emmcboot" 146 147 148 #endif /* __CONFIG_CL_SOM_AM57X_H */ 149