xref: /rk3399_ARM-atf/plat/nvidia/tegra/include/tegra_platform.h (revision d3b71331eb61b416abc1fcd119ad50e95584e014)
1 /*
2  * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef TEGRA_PLATFORM_H
8 #define TEGRA_PLATFORM_H
9 
10 #include <cdefs.h>
11 #include <stdbool.h>
12 #include <utils_def.h>
13 
14 /*******************************************************************************
15  * Tegra major, minor version helper macros
16  ******************************************************************************/
17 #define MAJOR_VERSION_SHIFT		U(0x4)
18 #define MAJOR_VERSION_MASK		U(0xF)
19 #define MINOR_VERSION_SHIFT		U(0x10)
20 #define MINOR_VERSION_MASK		U(0xF)
21 #define CHIP_ID_SHIFT			U(8)
22 #define CHIP_ID_MASK			U(0xFF)
23 #define PRE_SI_PLATFORM_SHIFT		U(0x14)
24 #define PRE_SI_PLATFORM_MASK		U(0xF)
25 
26 /*
27  * Tegra chip ID values
28  */
29 uint32_t tegra_get_chipid_major(void);
30 uint32_t tegra_get_chipid_minor(void);
31 
32 /*
33  * Tegra chip ID identifiers
34  */
35 bool tegra_chipid_is_t132(void);
36 bool tegra_chipid_is_t186(void);
37 bool tegra_chipid_is_t210(void);
38 bool tegra_chipid_is_t210_b01(void);
39 
40 
41 /*
42  * Tegra platform identifiers
43  */
44 bool tegra_platform_is_silicon(void);
45 bool tegra_platform_is_qt(void);
46 bool tegra_platform_is_emulation(void);
47 bool tegra_platform_is_linsim(void);
48 bool tegra_platform_is_fpga(void);
49 bool tegra_platform_is_unit_fpga(void);
50 bool tegra_platform_is_virt_dev_kit(void);
51 
52 #endif /* TEGRA_PLATFORM_H */
53