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