blob: 6bcca11c4c2f91e7eed78cd7477911fcca25adcf [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peng Fan81590632016-08-11 14:02:57 +08002/*
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
4 *
5 * Configuration settings for the Freescale i.MX6UL 14x14 EVK board.
Peng Fan81590632016-08-11 14:02:57 +08006 */
7#ifndef __MX6ULLEVK_CONFIG_H
8#define __MX6ULLEVK_CONFIG_H
9
10
11#include <asm/arch/imx-regs.h>
12#include <linux/sizes.h>
Simon Glassfb64e362020-05-10 11:40:09 -060013#include <linux/stringify.h>
Peng Fan81590632016-08-11 14:02:57 +080014#include "mx6_common.h"
Stefano Babic33731bc2017-06-29 10:16:06 +020015#include <asm/mach-imx/gpio.h>
Peng Fan81590632016-08-11 14:02:57 +080016
Peng Fan81590632016-08-11 14:02:57 +080017#define PHYS_SDRAM_SIZE SZ_512M
18
Peng Fan81590632016-08-11 14:02:57 +080019#define CONFIG_MXC_UART_BASE UART1_BASE
20
21/* MMC Configs */
22#ifdef CONFIG_FSL_USDHC
23#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
24
25/* NAND pin conflicts with usdhc2 */
26#ifdef CONFIG_SYS_USE_NAND
27#define CONFIG_SYS_FSL_USDHC_NUM 1
28#else
29#define CONFIG_SYS_FSL_USDHC_NUM 2
30#endif
31#endif
32
Peng Fan81590632016-08-11 14:02:57 +080033#define CONFIG_EXTRA_ENV_SETTINGS \
34 "script=boot.scr\0" \
35 "image=zImage\0" \
36 "console=ttymxc0\0" \
37 "fdt_high=0xffffffff\0" \
38 "initrd_high=0xffffffff\0" \
Peng Fan5098eae2019-08-08 09:55:57 +000039 "fdt_file=undefined\0" \
Peng Fan81590632016-08-11 14:02:57 +080040 "fdt_addr=0x83000000\0" \
41 "boot_fdt=try\0" \
42 "ip_dyn=yes\0" \
43 "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" \
44 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050045 "mmcpart=1\0" \
Peng Fan81590632016-08-11 14:02:57 +080046 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
47 "mmcautodetect=yes\0" \
48 "mmcargs=setenv bootargs console=${console},${baudrate} " \
49 "root=${mmcroot}\0" \
50 "loadbootscript=" \
51 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
52 "bootscript=echo Running bootscript from mmc ...; " \
53 "source\0" \
54 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
55 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
56 "mmcboot=echo Booting from mmc ...; " \
57 "run mmcargs; " \
58 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
59 "if run loadfdt; then " \
60 "bootz ${loadaddr} - ${fdt_addr}; " \
61 "else " \
62 "if test ${boot_fdt} = try; then " \
63 "bootz; " \
64 "else " \
65 "echo WARN: Cannot load the DT; " \
66 "fi; " \
67 "fi; " \
68 "else " \
69 "bootz; " \
70 "fi;\0" \
Peng Fan5098eae2019-08-08 09:55:57 +000071 "findfdt="\
72 "if test $fdt_file = undefined; then " \
73 "if test $board_name = ULZ-EVK && test $board_rev = 14X14; then " \
74 "setenv fdt_file imx6ulz-14x14-evk.dtb; fi; " \
75 "if test $board_name = EVK && test $board_rev = 14X14; then " \
76 "setenv fdt_file imx6ull-14x14-evk.dtb; fi; " \
77 "if test $fdt_file = undefined; then " \
78 "echo WARNING: Could not determine dtb to use; " \
79 "fi; " \
80 "fi;\0" \
Peng Fan81590632016-08-11 14:02:57 +080081 "netargs=setenv bootargs console=${console},${baudrate} " \
82 "root=/dev/nfs " \
83 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
84 "netboot=echo Booting from net ...; " \
85 "run netargs; " \
86 "if test ${ip_dyn} = yes; then " \
87 "setenv get_cmd dhcp; " \
88 "else " \
89 "setenv get_cmd tftp; " \
90 "fi; " \
91 "${get_cmd} ${image}; " \
92 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
93 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
94 "bootz ${loadaddr} - ${fdt_addr}; " \
95 "else " \
96 "if test ${boot_fdt} = try; then " \
97 "bootz; " \
98 "else " \
99 "echo WARN: Cannot load the DT; " \
100 "fi; " \
101 "fi; " \
102 "else " \
103 "bootz; " \
104 "fi;\0" \
105
Peng Fan81590632016-08-11 14:02:57 +0800106/* Miscellaneous configurable options */
Peng Fan81590632016-08-11 14:02:57 +0800107
Peng Fan81590632016-08-11 14:02:57 +0800108/* Physical Memory Map */
Peng Fan81590632016-08-11 14:02:57 +0800109#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
110
111#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
112#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
113#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
114
115#define CONFIG_SYS_INIT_SP_OFFSET \
116 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
117#define CONFIG_SYS_INIT_SP_ADDR \
118 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
119
Masahiro Yamada8cea9b52017-02-11 22:43:54 +0900120/* environment organization */
Peng Fan81590632016-08-11 14:02:57 +0800121#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
122
Peng Fan81590632016-08-11 14:02:57 +0800123#define CONFIG_IOMUX_LPSR
124
Fabio Estevam4ada4f02020-02-03 14:23:58 -0300125#ifdef CONFIG_CMD_NET
126#define CONFIG_FEC_ENET_DEV 1
127#if (CONFIG_FEC_ENET_DEV == 0)
128#define CONFIG_ETHPRIME "eth0"
129#elif (CONFIG_FEC_ENET_DEV == 1)
130#define CONFIG_ETHPRIME "eth1"
131#endif
132#endif
133
Peng Fan81590632016-08-11 14:02:57 +0800134#endif