tegra_platform.h 2.1 KB
Newer Older
1
/*
2
 * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3
 * Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
4
 *
dp-arm's avatar
dp-arm committed
5
 * SPDX-License-Identifier: BSD-3-Clause
6
7
 */

8
9
#ifndef TEGRA_PLATFORM_H
#define TEGRA_PLATFORM_H
10

11
#include <cdefs.h>
12
#include <lib/utils_def.h>
13
#include <stdbool.h>
14
15
16
17
18
19
20
21
22
23
24
25

/*******************************************************************************
 * Tegra major, minor version helper macros
 ******************************************************************************/
#define MAJOR_VERSION_SHIFT		U(0x4)
#define MAJOR_VERSION_MASK		U(0xF)
#define MINOR_VERSION_SHIFT		U(0x10)
#define MINOR_VERSION_MASK		U(0xF)
#define CHIP_ID_SHIFT			U(8)
#define CHIP_ID_MASK			U(0xFF)
#define PRE_SI_PLATFORM_SHIFT		U(0x14)
#define PRE_SI_PLATFORM_MASK		U(0xF)
26

27
/*******************************************************************************
28
 * Tegra chip ID values
29
30
31
32
 ******************************************************************************/
#define TEGRA_CHIPID_TEGRA13		U(0x13)
#define TEGRA_CHIPID_TEGRA21		U(0x21)
#define TEGRA_CHIPID_TEGRA18		U(0x18)
33
#define TEGRA_CHIPID_TEGRA19		U(0x19)
34

35
36
37
38
39
40
/*******************************************************************************
 * JEDEC Standard Manufacturer's Identification Code and Bank ID
 ******************************************************************************/
#define JEDEC_NVIDIA_MFID		U(0x6B)
#define JEDEC_NVIDIA_BKID		U(3)

41
#ifndef __ASSEMBLER__
42
43
44

/*
 * Tegra chip ID major/minor identifiers
45
46
47
48
 */
uint32_t tegra_get_chipid_major(void);
uint32_t tegra_get_chipid_minor(void);

49
/*
50
 * Tegra chip ID identifiers
51
 */
52
53
54
55
bool tegra_chipid_is_t132(void);
bool tegra_chipid_is_t186(void);
bool tegra_chipid_is_t210(void);
bool tegra_chipid_is_t210_b01(void);
56
bool tegra_chipid_is_t194(void);
57

58
59
60
/*
 * Tegra platform identifiers
 */
61
62
63
64
65
66
67
bool tegra_platform_is_silicon(void);
bool tegra_platform_is_qt(void);
bool tegra_platform_is_emulation(void);
bool tegra_platform_is_linsim(void);
bool tegra_platform_is_fpga(void);
bool tegra_platform_is_unit_fpga(void);
bool tegra_platform_is_virt_dev_kit(void);
68

69
#endif /* __ASSEMBLER__ */
70

71
#endif /* TEGRA_PLATFORM_H */