blob: 0715509ec8803da3f6fd54005f6f1da322148e5f [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0 */
Stephen Warren57ab23f2013-02-26 12:28:29 +00002/*
3 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
Stephen Warren57ab23f2013-02-26 12:28:29 +00004 */
5
6#ifndef __MX6_COMMON_H
7#define __MX6_COMMON_H
8
Simon Glassfb64e362020-05-10 11:40:09 -06009#include <linux/stringify.h>
10
Stefan Agnerbe8b7c52018-01-05 15:08:19 +010011#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
12#define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */
13#define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK
14#else
Fabio Estevam13409292014-01-29 17:39:49 -020015#ifndef CONFIG_SYS_L2CACHE_OFF
16#define CONFIG_SYS_L2_PL310
17#define CONFIG_SYS_PL310_BASE L2_PL310_BASE
18#endif
19
Peng Fand2d4fcb2015-07-20 19:28:26 +080020#endif
21#define CONFIG_BOARD_POSTCLK_INIT
Ye.Li2b7f8772014-10-30 18:20:59 +080022#define CONFIG_MXC_GPT_HCLK
Gabriel Huau170ceaf2014-07-26 11:35:43 -070023
Peng Fan3783b9b2016-01-04 15:27:22 +080024#define CONFIG_SYS_BOOTM_LEN 0x1000000
25
Peter Robinson4b671502015-05-22 17:30:45 +010026#include <linux/sizes.h>
27#include <asm/arch/imx-regs.h>
Stefano Babic33731bc2017-06-29 10:16:06 +020028#include <asm/mach-imx/gpio.h>
Peter Robinson4b671502015-05-22 17:30:45 +010029
Peter Robinsone193ff22015-05-22 17:30:46 +010030#ifndef CONFIG_MX6
31#define CONFIG_MX6
32#endif
33
Gong Qianyu52de2e52015-10-26 19:47:42 +080034#define CONFIG_SYS_FSL_CLK
Peter Robinsone193ff22015-05-22 17:30:46 +010035
Peter Robinson3028f622015-05-22 17:30:47 +010036/* ATAGs */
37#define CONFIG_CMDLINE_TAG
38#define CONFIG_SETUP_MEMORY_TAGS
39#define CONFIG_INITRD_TAG
40#define CONFIG_REVISION_TAG
41
Peter Robinson490a61e2015-05-22 17:30:49 +010042/* Boot options */
Fabio Estevam1b691df2018-01-03 12:33:05 -020043#if defined(CONFIG_MX6SL) || defined(CONFIG_MX6SLL) || \
44 defined(CONFIG_MX6SX) || \
45 defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL)
Fabio Estevam8c717e52015-05-28 12:33:34 -030046#define CONFIG_LOADADDR 0x82000000
Fabio Estevam8c717e52015-05-28 12:33:34 -030047#else
Peter Robinson490a61e2015-05-22 17:30:49 +010048#define CONFIG_LOADADDR 0x12000000
Fabio Estevam8c717e52015-05-28 12:33:34 -030049#endif
50#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
51
Peter Robinson61a1b9d2015-05-22 17:30:50 +010052/* allow to overwrite serial and ethaddr */
53#define CONFIG_ENV_OVERWRITE
Peter Robinson61a1b9d2015-05-22 17:30:50 +010054
55/* Miscellaneous configurable options */
Peter Robinson61a1b9d2015-05-22 17:30:50 +010056#define CONFIG_SYS_CBSIZE 512
57#define CONFIG_SYS_MAXARGS 32
Peter Robinson61a1b9d2015-05-22 17:30:50 +010058
Peter Robinsonbe6c5f12015-05-22 17:30:52 +010059/* MMC */
Peter Robinsonbe6c5f12015-05-22 17:30:52 +010060
Sven Ebenfeldeba5e332016-11-06 16:37:55 +010061#ifdef CONFIG_SPL_BUILD
62#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
63#endif
Gary Bisson70466e42016-08-25 19:03:18 +020064
Stephen Warren57ab23f2013-02-26 12:28:29 +000065#endif