blob: ab56ea0205da5e273ecbeb26d4a3806ab247c4f7 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peng Fandbf316a2015-07-20 19:28:35 +08002/*
3 * Copyright (C) 2015 Freescale Semiconductor, Inc.
4 *
5 * Configuration settings for the Freescale i.MX6UL 14x14 EVK board.
Peng Fandbf316a2015-07-20 19:28:35 +08006 */
7#ifndef __MX6UL_14X14_EVK_CONFIG_H
8#define __MX6UL_14X14_EVK_CONFIG_H
9
Peng Fandbf316a2015-07-20 19:28:35 +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 Fandbf316a2015-07-20 19:28:35 +080013#include "mx6_common.h"
Stefano Babic33731bc2017-06-29 10:16:06 +020014#include <asm/mach-imx/gpio.h>
Peng Fandbf316a2015-07-20 19:28:35 +080015
Peng Fan5630c982015-09-06 15:02:34 +080016#define is_mx6ul_9x9_evk() CONFIG_IS_ENABLED(TARGET_MX6UL_9X9_EVK)
17
Peng Fandbf316a2015-07-20 19:28:35 +080018/* SPL options */
Peng Fandbf316a2015-07-20 19:28:35 +080019#include "imx6_spl.h"
20
Peng Fandbf316a2015-07-20 19:28:35 +080021#define CONFIG_MXC_UART_BASE UART1_BASE
22
Peng Fandbf316a2015-07-20 19:28:35 +080023/* 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
Peng Fandbf316a2015-07-20 19:28:35 +080034#endif
35
Peng Fandbf316a2015-07-20 19:28:35 +080036#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" \
Peng Fan5630c982015-09-06 15:02:34 +080042 "fdt_file=undefined\0" \
Peng Fandbf316a2015-07-20 19:28:35 +080043 "fdt_addr=0x83000000\0" \
44 "boot_fdt=try\0" \
45 "ip_dyn=yes\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040046 "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Peng Fan60c72b62015-10-29 15:54:48 +080047 "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" \
Peng Fandbf316a2015-07-20 19:28:35 +080048 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050049 "mmcpart=1\0" \
Peng Fanbb4bb582022-04-15 12:23:41 +080050 "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
Peng Fandbf316a2015-07-20 19:28:35 +080051 "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; " \
Peng Fan5630c982015-09-06 15:02:34 +080098 "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" \
Peng Fandbf316a2015-07-20 19:28:35 +0800108
Peng Fandbf316a2015-07-20 19:28:35 +0800109/* Miscellaneous configurable options */
Peng Fandbf316a2015-07-20 19:28:35 +0800110
Peng Fandbf316a2015-07-20 19:28:35 +0800111/* Physical Memory Map */
Peng Fandbf316a2015-07-20 19:28:35 +0800112#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
Masahiro Yamada8cea9b52017-02-11 22:43:54 +0900118/* environment organization */
Peng Fandbf316a2015-07-20 19:28:35 +0800119
Peng Fandbf316a2015-07-20 19:28:35 +0800120/* USB Configs */
Peng Fandbf316a2015-07-20 19:28:35 +0800121#ifdef CONFIG_CMD_USB
Peng Fandbf316a2015-07-20 19:28:35 +0800122#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
123#define CONFIG_MXC_USB_FLAGS 0
Peng Fandbf316a2015-07-20 19:28:35 +0800124#endif
125
Peng Fan32cfb352015-08-12 17:46:52 +0800126#ifdef CONFIG_CMD_NET
Peng Fan32cfb352015-08-12 17:46:52 +0800127#define CONFIG_FEC_ENET_DEV 1
128
129#if (CONFIG_FEC_ENET_DEV == 0)
Peng Fan32cfb352015-08-12 17:46:52 +0800130#define CONFIG_FEC_MXC_PHYADDR 0x2
Peng Fan32cfb352015-08-12 17:46:52 +0800131#elif (CONFIG_FEC_ENET_DEV == 1)
Peng Fan32cfb352015-08-12 17:46:52 +0800132#define CONFIG_FEC_MXC_PHYADDR 0x1
Peng Fan32cfb352015-08-12 17:46:52 +0800133#endif
Peng Fan32cfb352015-08-12 17:46:52 +0800134#endif
135
Peng Fan60c72b62015-10-29 15:54:48 +0800136#define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
Peng Fan60c72b62015-10-29 15:54:48 +0800137
Peng Fandbf316a2015-07-20 19:28:35 +0800138#endif