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