Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * Configuration settings for the Freescale i.MX7. |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __MX7_COMMON_H |
| 9 | #define __MX7_COMMON_H |
| 10 | |
| 11 | #include <linux/sizes.h> |
Simon Glass | fb64e36 | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 12 | #include <linux/stringify.h> |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 13 | #include <asm/arch/imx-regs.h> |
Stefano Babic | 33731bc | 2017-06-29 10:16:06 +0200 | [diff] [blame] | 14 | #include <asm/mach-imx/gpio.h> |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 15 | |
| 16 | #ifndef CONFIG_MX7 |
| 17 | #define CONFIG_MX7 |
| 18 | #endif |
| 19 | |
| 20 | /* Timer settings */ |
| 21 | #define CONFIG_MXC_GPT_HCLK |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 22 | #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */ |
Andre Przywara | 70c7893 | 2017-02-16 01:20:19 +0000 | [diff] [blame] | 23 | #define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK |
Gong Qianyu | 52de2e5 | 2015-10-26 19:47:42 +0800 | [diff] [blame] | 24 | #define CONFIG_SYS_FSL_CLK |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 25 | |
Peng Fan | 3783b9b | 2016-01-04 15:27:22 +0800 | [diff] [blame] | 26 | #define CONFIG_SYS_BOOTM_LEN 0x1000000 |
| 27 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 28 | /* Enable iomux-lpsr support */ |
| 29 | #define CONFIG_IOMUX_LPSR |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 30 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 31 | #define CONFIG_LOADADDR 0x80800000 |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 32 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 33 | /* allow to overwrite serial and ethaddr */ |
| 34 | #define CONFIG_ENV_OVERWRITE |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 35 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 36 | /* Miscellaneous configurable options */ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 37 | #define CONFIG_SYS_CBSIZE 512 |
| 38 | #define CONFIG_SYS_MAXARGS 32 |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 39 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 40 | /* UART */ |
| 41 | #define CONFIG_MXC_UART |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 42 | |
| 43 | /* MMC */ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 44 | |
Peng Fan | 2da05db | 2015-10-23 10:13:05 +0800 | [diff] [blame] | 45 | #define CONFIG_ARMV7_SECURE_BASE 0x00900000 |
Peng Fan | 2da05db | 2015-10-23 10:13:05 +0800 | [diff] [blame] | 46 | |
Anson Huang | 769f48e | 2018-01-07 14:34:30 +0800 | [diff] [blame] | 47 | #define CONFIG_ARMV7_PSCI_1_0 |
| 48 | |
Eran Matityahu | 9fb00ca | 2018-02-28 09:51:34 +0200 | [diff] [blame] | 49 | #ifdef CONFIG_SPL_BUILD |
| 50 | #define CONFIG_SPL_DRIVERS_MISC_SUPPORT |
| 51 | #endif |
Gary Bisson | c595814 | 2016-08-25 19:03:19 +0200 | [diff] [blame] | 52 | |
Jun Nie | c9495bc | 2019-05-08 14:38:29 +0800 | [diff] [blame] | 53 | /* |
| 54 | * If we have defined the OPTEE ram size and not OPTEE it means that we were |
| 55 | * launched by OPTEE, because of that we shall skip all the low level |
| 56 | * initialization since it was already done by ATF or OPTEE |
| 57 | */ |
| 58 | #if (CONFIG_OPTEE_TZDRAM_SIZE != 0) |
| 59 | #ifndef CONFIG_OPTEE |
| 60 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 61 | #endif |
| 62 | #endif |
| 63 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 64 | #endif |