Merge tag 'u-boot-stm32-20220907' of https://source.denx.de/u-boot/custodians/u-boot-stm
[platform/kernel/u-boot.git] / include / configs / mx6ul_14x14_evk.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2015 Freescale Semiconductor, Inc.
4  *
5  * Configuration settings for the Freescale i.MX6UL 14x14 EVK board.
6  */
7 #ifndef __MX6UL_14X14_EVK_CONFIG_H
8 #define __MX6UL_14X14_EVK_CONFIG_H
9
10 #include <asm/arch/imx-regs.h>
11 #include <linux/sizes.h>
12 #include <linux/stringify.h>
13 #include "mx6_common.h"
14 #include <asm/mach-imx/gpio.h>
15
16 #define is_mx6ul_9x9_evk()      CONFIG_IS_ENABLED(TARGET_MX6UL_9X9_EVK)
17
18 /* SPL options */
19 #include "imx6_spl.h"
20
21 #define CONFIG_MXC_UART_BASE            UART1_BASE
22
23 /* MMC Configs */
24 #ifdef CONFIG_FSL_USDHC
25 #define CONFIG_SYS_FSL_ESDHC_ADDR       USDHC2_BASE_ADDR
26
27 /* NAND pin conflicts with usdhc2 */
28 #ifdef CONFIG_NAND_MXS
29 #define CONFIG_SYS_FSL_USDHC_NUM        1
30 #else
31 #define CONFIG_SYS_FSL_USDHC_NUM        2
32 #endif
33
34 #endif
35
36 #define CONFIG_EXTRA_ENV_SETTINGS \
37         "script=boot.scr\0" \
38         "image=zImage\0" \
39         "console=ttymxc0\0" \
40         "fdt_high=0xffffffff\0" \
41         "initrd_high=0xffffffff\0" \
42         "fdt_file=undefined\0" \
43         "fdt_addr=0x83000000\0" \
44         "boot_fdt=try\0" \
45         "ip_dyn=yes\0" \
46         "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
47         "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \
48         "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
49         "mmcpart=1\0" \
50         "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
51         "mmcautodetect=yes\0" \
52         "mmcargs=setenv bootargs console=${console},${baudrate} " \
53                 "root=${mmcroot}\0" \
54         "loadbootscript=" \
55                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
56         "bootscript=echo Running bootscript from mmc ...; " \
57                 "source\0" \
58         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
59         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
60         "mmcboot=echo Booting from mmc ...; " \
61                 "run mmcargs; " \
62                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
63                         "if run loadfdt; then " \
64                                 "bootz ${loadaddr} - ${fdt_addr}; " \
65                         "else " \
66                                 "if test ${boot_fdt} = try; then " \
67                                         "bootz; " \
68                                 "else " \
69                                         "echo WARN: Cannot load the DT; " \
70                                 "fi; " \
71                         "fi; " \
72                 "else " \
73                         "bootz; " \
74                 "fi;\0" \
75         "netargs=setenv bootargs console=${console},${baudrate} " \
76                 "root=/dev/nfs " \
77         "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
78                 "netboot=echo Booting from net ...; " \
79                 "run netargs; " \
80                 "if test ${ip_dyn} = yes; then " \
81                         "setenv get_cmd dhcp; " \
82                 "else " \
83                         "setenv get_cmd tftp; " \
84                 "fi; " \
85                 "${get_cmd} ${image}; " \
86                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
87                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
88                                 "bootz ${loadaddr} - ${fdt_addr}; " \
89                         "else " \
90                                 "if test ${boot_fdt} = try; then " \
91                                         "bootz; " \
92                                 "else " \
93                                         "echo WARN: Cannot load the DT; " \
94                                 "fi; " \
95                         "fi; " \
96                 "else " \
97                         "bootz; " \
98                 "fi;\0" \
99                 "findfdt="\
100                         "if test $fdt_file = undefined; then " \
101                                 "if test $board_name = EVK && test $board_rev = 9X9; then " \
102                                         "setenv fdt_file imx6ul-9x9-evk.dtb; fi; " \
103                                 "if test $board_name = EVK && test $board_rev = 14X14; then " \
104                                         "setenv fdt_file imx6ul-14x14-evk.dtb; fi; " \
105                                 "if test $fdt_file = undefined; then " \
106                                         "echo WARNING: Could not determine dtb to use; fi; " \
107                         "fi;\0" \
108
109 /* Miscellaneous configurable options */
110
111 /* Physical Memory Map */
112 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
113
114 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
115 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
116 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
117
118 /* environment organization */
119
120 /* USB Configs */
121 #ifdef CONFIG_CMD_USB
122 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
123 #define CONFIG_MXC_USB_FLAGS   0
124 #endif
125
126 #ifdef CONFIG_CMD_NET
127 #define CONFIG_FEC_ENET_DEV             1
128
129 #if (CONFIG_FEC_ENET_DEV == 0)
130 #define CONFIG_FEC_MXC_PHYADDR          0x2
131 #elif (CONFIG_FEC_ENET_DEV == 1)
132 #define CONFIG_FEC_MXC_PHYADDR          0x1
133 #endif
134 #endif
135
136 #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
137
138 #endif