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 <lib/utils_def.h> 12 #include <stdbool.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 #define TEGRA_CHIPID_TEGRA13 U(0x13) 30 #define TEGRA_CHIPID_TEGRA21 U(0x21) 31 #define TEGRA_CHIPID_TEGRA18 U(0x18) 32 33 #ifndef __ASSEMBLER__ 34 35 /* 36 * Tegra chip ID major/minor identifiers 37 */ 38 uint32_t tegra_get_chipid_major(void); 39 uint32_t tegra_get_chipid_minor(void); 40 41 /* 42 * Tegra chip ID identifiers 43 */ 44 bool tegra_chipid_is_t132(void); 45 bool tegra_chipid_is_t186(void); 46 bool tegra_chipid_is_t210(void); 47 bool tegra_chipid_is_t210_b01(void); 48 49 /* 50 * Tegra platform identifiers 51 */ 52 bool tegra_platform_is_silicon(void); 53 bool tegra_platform_is_qt(void); 54 bool tegra_platform_is_emulation(void); 55 bool tegra_platform_is_linsim(void); 56 bool tegra_platform_is_fpga(void); 57 bool tegra_platform_is_unit_fpga(void); 58 bool tegra_platform_is_virt_dev_kit(void); 59 60 #endif /* __ASSEMBLER__ */ 61 62 #endif /* TEGRA_PLATFORM_H */ 63