xref: /optee_os/core/arch/arm/plat-imx/imx.h (revision 5b25c76ac40f830867e3d60800120ffd7874e8dc)
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 #define SOC_MX8QX	0xE2
24 #define SOC_MX8QM	0xE3
25 
26 #ifndef __ASSEMBLER__
27 uint32_t imx_get_src_gpr(int cpu);
28 void imx_set_src_gpr(int cpu, uint32_t val);
29 bool soc_is_imx6(void);
30 bool soc_is_imx6sx(void);
31 bool soc_is_imx6sl(void);
32 bool soc_is_imx6sll(void);
33 bool soc_is_imx6ul(void);
34 bool soc_is_imx6ull(void);
35 bool soc_is_imx6sdl(void);
36 bool soc_is_imx6dq(void);
37 bool soc_is_imx6dqp(void);
38 bool soc_is_imx7ds(void);
39 bool soc_is_imx7ulp(void);
40 uint16_t soc_revision(void);
41 void imx_gpcv2_set_core1_pdn_by_software(void);
42 void imx_gpcv2_set_core1_pup_by_software(void);
43 void imx_gpcv2_set_core_pgc(bool enable, uint32_t offset);
44 
45 #endif /* __ASSEMBLER__ */
46 #endif
47