xref: /optee_os/core/arch/arm/plat-imx/imx.h (revision c3d61baa2e324dab3d3de3650020e1d932e59b85)
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright 2017-2019 NXP
4  *
5  * Peng Fan <peng.fan@nxp.com>
6  */
7 #ifndef PLAT_IMX_IMX_H
8 #define PLAT_IMX_IMX_H
9 
10 #include <stdint.h>
11 #include <stdbool.h>
12 
13 #define SOC_MX6SL	0x60
14 #define SOC_MX6DL	0x61
15 #define SOC_MX6SX	0x62
16 #define SOC_MX6Q	0x63
17 #define SOC_MX6UL	0x64
18 #define SOC_MX6ULL	0x65
19 #define SOC_MX6SLL	0x67
20 #define SOC_MX6D	0x6A
21 #define SOC_MX7D	0x72
22 #define SOC_MX7ULP	0xE1
23 
24 uint32_t imx_get_src_gpr(int cpu);
25 void imx_set_src_gpr(int cpu, uint32_t val);
26 bool soc_is_imx6(void);
27 bool soc_is_imx6sx(void);
28 bool soc_is_imx6sl(void);
29 bool soc_is_imx6sll(void);
30 bool soc_is_imx6ul(void);
31 bool soc_is_imx6ull(void);
32 bool soc_is_imx6sdl(void);
33 bool soc_is_imx6dq(void);
34 bool soc_is_imx6dqp(void);
35 bool soc_is_imx7ds(void);
36 bool soc_is_imx7ulp(void);
37 uint16_t soc_revision(void);
38 void imx_gpcv2_set_core1_pdn_by_software(void);
39 void imx_gpcv2_set_core1_pup_by_software(void);
40 void imx_gpcv2_set_core_pgc(bool enable, uint32_t offset);
41 
42 #ifdef CFG_TZC380
43 void imx_configure_tzasc(void);
44 #else
45 static inline void imx_configure_tzasc(void) {}
46 #endif /* CFG_TZC380 */
47 #endif
48