Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013 Stefan Roese <sr@denx.de> |
| 4 | * |
| 5 | * Configuration settings for the ProjectionDesign / Barco |
| 6 | * Titanium board. |
| 7 | * |
| 8 | * Based on mx6qsabrelite.h which is: |
| 9 | * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #ifndef __CONFIG_H |
| 13 | #define __CONFIG_H |
| 14 | |
Eric Nelson | 02824dc | 2013-11-26 17:40:30 -0700 | [diff] [blame] | 15 | #include "mx6_common.h" |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 16 | |
Tom Rini | cd7b634 | 2017-01-25 20:42:38 -0500 | [diff] [blame] | 17 | /* Provide the MACH_TYPE value that the vendor kernel requires. */ |
| 18 | #define CONFIG_MACH_TYPE 3769 |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 19 | |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 20 | /* Size of malloc() pool */ |
| 21 | #define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024) |
| 22 | |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 23 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 24 | |
| 25 | /* I2C Configs */ |
trem | b089d03 | 2013-09-21 18:13:36 +0200 | [diff] [blame] | 26 | #define CONFIG_SYS_I2C |
| 27 | #define CONFIG_SYS_I2C_MXC |
Albert ARIBAUD \\(3ADEV\\) | 03544c6 | 2015-09-21 22:43:38 +0200 | [diff] [blame] | 28 | #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ |
| 29 | #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ |
York Sun | f8cb101 | 2015-03-20 10:20:40 -0700 | [diff] [blame] | 30 | #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 31 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 32 | |
| 33 | /* MMC Configs */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 34 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 35 | #define CONFIG_SYS_FSL_USDHC_NUM 1 |
| 36 | |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 37 | #define CONFIG_FEC_MXC |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 38 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 39 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 40 | #define CONFIG_FEC_MXC_PHYADDR 4 |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 41 | |
| 42 | /* USB Configs */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 43 | #define CONFIG_MXC_USB_PORT 1 |
| 44 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 45 | #define CONFIG_MXC_USB_FLAGS 0 |
| 46 | |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 47 | #define CONFIG_HOSTNAME "titanium" |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 48 | #define CONFIG_UBI_PART ubi |
| 49 | #define CONFIG_UBIFS_VOLUME rootfs0 |
| 50 | |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 51 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 52 | "kernel=" CONFIG_HOSTNAME "/uImage\0" \ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 53 | "kernel_fs=/boot/uImage\0" \ |
| 54 | "kernel_addr=11000000\0" \ |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 55 | "dtb=" CONFIG_HOSTNAME "/" \ |
| 56 | CONFIG_HOSTNAME ".dtb\0" \ |
| 57 | "dtb_fs=/boot/" CONFIG_HOSTNAME ".dtb\0" \ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 58 | "dtb_addr=12800000\0" \ |
| 59 | "script=boot.scr\0" \ |
| 60 | "uimage=uImage\0" \ |
| 61 | "console=ttymxc0\0" \ |
| 62 | "baudrate=115200\0" \ |
| 63 | "fdt_high=0xffffffff\0" \ |
| 64 | "initrd_high=0xffffffff\0" \ |
| 65 | "mmcdev=0\0" \ |
| 66 | "mmcpart=1\0" \ |
| 67 | "uimage=uImage\0" \ |
| 68 | "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \ |
| 69 | " ${script}\0" \ |
| 70 | "bootscript=echo Running bootscript from mmc ...; source\0" \ |
| 71 | "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ |
| 72 | "mmcroot=/dev/mmcblk0p2\0" \ |
| 73 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 74 | "root=${mmcroot} rootwait rw\0" \ |
| 75 | "bootmmc=run mmcargs; fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \ |
| 76 | " ${uimage}; bootm\0" \ |
| 77 | "addip=setenv bootargs ${bootargs} " \ |
| 78 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
| 79 | ":${hostname}:${netdev}:off panic=1\0" \ |
| 80 | "addcon=setenv bootargs ${bootargs} console=ttymxc0," \ |
| 81 | "${baudrate}\0" \ |
| 82 | "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ |
| 83 | "rootpath=/opt/eldk-5.3/armv7a/rootfs-minimal-mtdutils\0" \ |
| 84 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
| 85 | "nfsroot=${serverip}:${rootpath}\0" \ |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 86 | "ubifs=" CONFIG_HOSTNAME "/ubifs.img\0" \ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 87 | "part=" __stringify(CONFIG_UBI_PART) "\0" \ |
| 88 | "boot_vol=0\0" \ |
| 89 | "vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0" \ |
| 90 | "load_ubifs=tftp ${kernel_addr} ${ubifs}\0" \ |
| 91 | "update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}" \ |
| 92 | " ${filesize}\0" \ |
| 93 | "upd_ubifs=run load_ubifs update_ubifs\0" \ |
| 94 | "init_ubi=nand erase.part ubi;ubi part ${part};" \ |
| 95 | "ubi create ${vol} c800000\0" \ |
Tom Rini | 43ede0b | 2017-10-22 17:55:07 -0400 | [diff] [blame] | 96 | "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ |
| 97 | "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 98 | "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip" \ |
| 99 | " addcon addmtd;" \ |
| 100 | "bootm ${kernel_addr} - ${dtb_addr}\0" \ |
| 101 | "ubifsargs=set bootargs ubi.mtd=ubi " \ |
| 102 | "root=ubi:rootfs${boot_vol} rootfstype=ubifs\0" \ |
| 103 | "ubifs_mount=ubi part ubi;ubifsmount ubi:rootfs${boot_vol}\0" \ |
| 104 | "ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};" \ |
| 105 | "ubifsload ${dtb_addr} ${dtb_fs};\0" \ |
| 106 | "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon " \ |
| 107 | "addmtd;bootm ${kernel_addr} - ${dtb_addr}\0" \ |
| 108 | "load_kernel=tftp ${kernel_addr} ${kernel}\0" \ |
| 109 | "load_dtb=tftp ${dtb_addr} ${dtb}\0" \ |
| 110 | "net_nfs=run load_dtb load_kernel; " \ |
| 111 | "run nfsargs addip addcon addmtd;" \ |
| 112 | "bootm ${kernel_addr} - ${dtb_addr}\0" \ |
| 113 | "delenv=env default -a -f; saveenv; reset\0" |
| 114 | |
| 115 | #define CONFIG_BOOTCOMMAND "run nand_ubifs" |
| 116 | |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 117 | /* Physical Memory Map */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 118 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 119 | #define PHYS_SDRAM_SIZE (512 << 20) |
| 120 | |
| 121 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 122 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 123 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 124 | |
| 125 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 126 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 127 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 128 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 129 | |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 130 | /* Enable NAND support */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 131 | #ifdef CONFIG_CMD_NAND |
| 132 | |
| 133 | /* NAND stuff */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 134 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 135 | #define CONFIG_SYS_NAND_BASE 0x40000000 |
| 136 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
| 137 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
| 138 | |
| 139 | /* DMA stuff, needed for GPMI/MXS NAND support */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 140 | |
| 141 | /* Environment in NAND */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 142 | |
| 143 | #else /* CONFIG_CMD_NAND */ |
| 144 | |
| 145 | /* Environment in MMC */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 146 | |
| 147 | #endif /* CONFIG_CMD_NAND */ |
| 148 | |
| 149 | /* UBI/UBIFS config options */ |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 150 | |
Stefan Roese | b29ca4a | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 151 | #endif /* __CONFIG_H */ |