blob: 2c3cd32cefa70b24a2ed6fd529bddd498f021e57 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peng Fan55a42b32016-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 Fan55a42b32016-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 Glass1af3c7f2020-05-10 11:40:09 -060013#include <linux/stringify.h>
Peng Fan55a42b32016-08-11 14:02:57 +080014#include "mx6_common.h"
Stefano Babic552a8482017-06-29 10:16:06 +020015#include <asm/mach-imx/gpio.h>
Peng Fan55a42b32016-08-11 14:02:57 +080016
Peng Fan55a42b32016-08-11 14:02:57 +080017#define PHYS_SDRAM_SIZE SZ_512M
18
Tom Rini4db38662022-12-04 10:04:55 -050019#define CFG_MXC_UART_BASE UART1_BASE
Peng Fan55a42b32016-08-11 14:02:57 +080020
21/* MMC Configs */
22#ifdef CONFIG_FSL_USDHC
Tom Rini6cc04542022-10-28 20:27:13 -040023#define CFG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
24#define CFG_SYS_FSL_USDHC_NUM 2
Peng Fan55a42b32016-08-11 14:02:57 +080025#endif
Peng Fan55a42b32016-08-11 14:02:57 +080026
Tom Rini0613c362022-12-04 10:03:50 -050027#define CFG_EXTRA_ENV_SETTINGS \
Peng Fan55a42b32016-08-11 14:02:57 +080028 "script=boot.scr\0" \
29 "image=zImage\0" \
30 "console=ttymxc0\0" \
31 "fdt_high=0xffffffff\0" \
32 "initrd_high=0xffffffff\0" \
Peng Fan1d293e62019-08-08 09:55:57 +000033 "fdt_file=undefined\0" \
Peng Fan55a42b32016-08-11 14:02:57 +080034 "fdt_addr=0x83000000\0" \
35 "boot_fdt=try\0" \
36 "ip_dyn=yes\0" \
37 "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" \
38 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinide35b8f2021-12-11 14:55:52 -050039 "mmcpart=1\0" \
Peng Fanadfaa422022-04-15 12:23:41 +080040 "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
Peng Fan55a42b32016-08-11 14:02:57 +080041 "mmcautodetect=yes\0" \
42 "mmcargs=setenv bootargs console=${console},${baudrate} " \
43 "root=${mmcroot}\0" \
44 "loadbootscript=" \
45 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
46 "bootscript=echo Running bootscript from mmc ...; " \
47 "source\0" \
48 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
49 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
50 "mmcboot=echo Booting from mmc ...; " \
51 "run mmcargs; " \
52 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
53 "if run loadfdt; then " \
54 "bootz ${loadaddr} - ${fdt_addr}; " \
55 "else " \
56 "if test ${boot_fdt} = try; then " \
57 "bootz; " \
58 "else " \
59 "echo WARN: Cannot load the DT; " \
60 "fi; " \
61 "fi; " \
62 "else " \
63 "bootz; " \
64 "fi;\0" \
Peng Fan1d293e62019-08-08 09:55:57 +000065 "findfdt="\
66 "if test $fdt_file = undefined; then " \
67 "if test $board_name = ULZ-EVK && test $board_rev = 14X14; then " \
68 "setenv fdt_file imx6ulz-14x14-evk.dtb; fi; " \
69 "if test $board_name = EVK && test $board_rev = 14X14; then " \
70 "setenv fdt_file imx6ull-14x14-evk.dtb; fi; " \
71 "if test $fdt_file = undefined; then " \
72 "echo WARNING: Could not determine dtb to use; " \
73 "fi; " \
74 "fi;\0" \
Peng Fan55a42b32016-08-11 14:02:57 +080075 "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
Peng Fan55a42b32016-08-11 14:02:57 +0800100/* Miscellaneous configurable options */
Peng Fan55a42b32016-08-11 14:02:57 +0800101
Peng Fan55a42b32016-08-11 14:02:57 +0800102/* Physical Memory Map */
Peng Fan55a42b32016-08-11 14:02:57 +0800103#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
104
Tom Riniaa6e94d2022-11-16 13:10:37 -0500105#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini65cc0e22022-11-16 13:10:41 -0500106#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
107#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Peng Fan55a42b32016-08-11 14:02:57 +0800108
Masahiro Yamadae856bdc2017-02-11 22:43:54 +0900109/* environment organization */
Peng Fan55a42b32016-08-11 14:02:57 +0800110
Fabio Estevam03279b72020-02-03 14:23:58 -0300111#ifdef CONFIG_CMD_NET
Tom Rini4daffb52022-12-04 10:03:52 -0500112#define CFG_FEC_ENET_DEV 1
Fabio Estevam03279b72020-02-03 14:23:58 -0300113#endif
114
Peng Fan55a42b32016-08-11 14:02:57 +0800115#endif