blob: 33223aadfec758702dc473672d395732ef175c5f [file] [log] [blame]
Varun Wadekar28dcc212016-07-20 10:28:51 -07001/*
Antonio Nino Diaz4b32e622018-08-16 16:52:57 +01002 * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
Varun Wadekar28dcc212016-07-20 10:28:51 -07003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Varun Wadekar28dcc212016-07-20 10:28:51 -07005 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef TEGRA_PLATFORM_H
8#define TEGRA_PLATFORM_H
Varun Wadekar28dcc212016-07-20 10:28:51 -07009
Antonio Nino Diaz4b32e622018-08-16 16:52:57 +010010#include <cdefs.h>
Anthony Zhou70262ef2017-03-22 14:37:04 +080011#include <stdbool.h>
Marvin Hsu589a7e12017-04-12 20:40:27 +080012#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)
Varun Wadekar28dcc212016-07-20 10:28:51 -070025
26/*
Marvin Hsu589a7e12017-04-12 20:40:27 +080027 * Tegra chip ID values
Varun Wadekarfc9b91e2017-03-10 09:53:37 -080028 */
29uint32_t tegra_get_chipid_major(void);
30uint32_t tegra_get_chipid_minor(void);
31
32/*
Marvin Hsu589a7e12017-04-12 20:40:27 +080033 * Tegra chip ID identifiers
Varun Wadekar28dcc212016-07-20 10:28:51 -070034 */
Marvin Hsu589a7e12017-04-12 20:40:27 +080035bool tegra_chipid_is_t132(void);
36bool tegra_chipid_is_t186(void);
37bool tegra_chipid_is_t210(void);
38bool tegra_chipid_is_t210_b01(void);
Varun Wadekarfdcdfe22017-04-13 14:12:49 -070039
Varun Wadekar28dcc212016-07-20 10:28:51 -070040
41/*
42 * Tegra platform identifiers
43 */
Anthony Zhou70262ef2017-03-22 14:37:04 +080044bool tegra_platform_is_silicon(void);
45bool tegra_platform_is_qt(void);
46bool tegra_platform_is_emulation(void);
47bool tegra_platform_is_linsim(void);
48bool tegra_platform_is_fpga(void);
49bool tegra_platform_is_unit_fpga(void);
50bool tegra_platform_is_virt_dev_kit(void);
Varun Wadekar28dcc212016-07-20 10:28:51 -070051
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000052#endif /* TEGRA_PLATFORM_H */