blob: 910140ab4b708c833be0eb1aaccb6beabd4d66c9 [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
Peng Fan81590632016-08-11 14:02:57 +080010#include <asm/arch/imx-regs.h>
11#include <linux/sizes.h>
Simon Glassfb64e362020-05-10 11:40:09 -060012#include <linux/stringify.h>
Peng Fan81590632016-08-11 14:02:57 +080013#include "mx6_common.h"
Stefano Babic33731bc2017-06-29 10:16:06 +020014#include <asm/mach-imx/gpio.h>
Peng Fan81590632016-08-11 14:02:57 +080015
Peng Fan81590632016-08-11 14:02:57 +080016#define PHYS_SDRAM_SIZE SZ_512M
17
Tom Rinia17aa192022-12-04 10:04:55 -050018#define CFG_MXC_UART_BASE UART1_BASE
Peng Fan81590632016-08-11 14:02:57 +080019
20/* MMC Configs */
21#ifdef CONFIG_FSL_USDHC
Tom Rini376b88a2022-10-28 20:27:13 -040022#define CFG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
23#define CFG_SYS_FSL_USDHC_NUM 2
Peng Fan81590632016-08-11 14:02:57 +080024#endif
Peng Fan81590632016-08-11 14:02:57 +080025
Tom Rinic9edebe2022-12-04 10:03:50 -050026#define CFG_EXTRA_ENV_SETTINGS \
Peng Fan81590632016-08-11 14:02:57 +080027 "script=boot.scr\0" \
28 "image=zImage\0" \
29 "console=ttymxc0\0" \
30 "fdt_high=0xffffffff\0" \
31 "initrd_high=0xffffffff\0" \
Peng Fan5098eae2019-08-08 09:55:57 +000032 "fdt_file=undefined\0" \
Peng Fan81590632016-08-11 14:02:57 +080033 "fdt_addr=0x83000000\0" \
34 "boot_fdt=try\0" \
35 "ip_dyn=yes\0" \
36 "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" \
37 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050038 "mmcpart=1\0" \
Peng Fanbb4bb582022-04-15 12:23:41 +080039 "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
Peng Fan81590632016-08-11 14:02:57 +080040 "mmcautodetect=yes\0" \
41 "mmcargs=setenv bootargs console=${console},${baudrate} " \
42 "root=${mmcroot}\0" \
43 "loadbootscript=" \
44 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
45 "bootscript=echo Running bootscript from mmc ...; " \
46 "source\0" \
47 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
48 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
49 "mmcboot=echo Booting from mmc ...; " \
50 "run mmcargs; " \
51 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
52 "if run loadfdt; then " \
53 "bootz ${loadaddr} - ${fdt_addr}; " \
54 "else " \
55 "if test ${boot_fdt} = try; then " \
56 "bootz; " \
57 "else " \
58 "echo WARN: Cannot load the DT; " \
59 "fi; " \
60 "fi; " \
61 "else " \
62 "bootz; " \
63 "fi;\0" \
Peng Fan5098eae2019-08-08 09:55:57 +000064 "findfdt="\
65 "if test $fdt_file = undefined; then " \
66 "if test $board_name = ULZ-EVK && test $board_rev = 14X14; then " \
67 "setenv fdt_file imx6ulz-14x14-evk.dtb; fi; " \
68 "if test $board_name = EVK && test $board_rev = 14X14; then " \
69 "setenv fdt_file imx6ull-14x14-evk.dtb; fi; " \
70 "if test $fdt_file = undefined; then " \
71 "echo WARNING: Could not determine dtb to use; " \
72 "fi; " \
73 "fi;\0" \
Peng Fan81590632016-08-11 14:02:57 +080074 "netargs=setenv bootargs console=${console},${baudrate} " \
75 "root=/dev/nfs " \
76 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
77 "netboot=echo Booting from net ...; " \
78 "run netargs; " \
79 "if test ${ip_dyn} = yes; then " \
80 "setenv get_cmd dhcp; " \
81 "else " \
82 "setenv get_cmd tftp; " \
83 "fi; " \
84 "${get_cmd} ${image}; " \
85 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
86 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
87 "bootz ${loadaddr} - ${fdt_addr}; " \
88 "else " \
89 "if test ${boot_fdt} = try; then " \
90 "bootz; " \
91 "else " \
92 "echo WARN: Cannot load the DT; " \
93 "fi; " \
94 "fi; " \
95 "else " \
96 "bootz; " \
97 "fi;\0" \
98
Peng Fan81590632016-08-11 14:02:57 +080099/* Miscellaneous configurable options */
Peng Fan81590632016-08-11 14:02:57 +0800100
Peng Fan81590632016-08-11 14:02:57 +0800101/* Physical Memory Map */
Peng Fan81590632016-08-11 14:02:57 +0800102#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
103
Tom Rinibb4dd962022-11-16 13:10:37 -0500104#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini6a5dccc2022-11-16 13:10:41 -0500105#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
106#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Peng Fan81590632016-08-11 14:02:57 +0800107
Masahiro Yamada8cea9b52017-02-11 22:43:54 +0900108/* environment organization */
Peng Fan81590632016-08-11 14:02:57 +0800109
Fabio Estevam4ada4f02020-02-03 14:23:58 -0300110#ifdef CONFIG_CMD_NET
Tom Rinib70d5d42022-12-04 10:03:52 -0500111#define CFG_FEC_ENET_DEV 1
Fabio Estevam4ada4f02020-02-03 14:23:58 -0300112#endif
113
Peng Fan81590632016-08-11 14:02:57 +0800114#endif