blob: def79683bef62d2af19d6b17d8b93063c8b2d508 [file] [log] [blame]
Colin Cross73625e32010-06-23 15:49:17 -07001/*
Colin Cross73625e32010-06-23 15:49:17 -07002 * Copyright (C) 2010 Google, Inc.
Danny Huang7495b2e2013-03-18 19:17:34 +08003 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
Colin Cross73625e32010-06-23 15:49:17 -07004 *
5 * Author:
6 * Colin Cross <ccross@android.com>
7 *
8 * This software is licensed under the terms of the GNU General Public
9 * License version 2, as published by the Free Software Foundation, and
10 * may be copied, distributed, and modified under those terms.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
Olof Johansson9a1086d2011-10-13 00:31:20 -070019#ifndef __MACH_TEGRA_FUSE_H
20#define __MACH_TEGRA_FUSE_H
21
Olof Johansson9a1086d2011-10-13 00:31:20 -070022#define SKU_ID_T20 8
23#define SKU_ID_T25SE 20
24#define SKU_ID_AP25 23
25#define SKU_ID_T25 24
26#define SKU_ID_AP25E 27
27#define SKU_ID_T25E 28
28
Peter De Schrijver35b14982012-02-10 01:47:41 +020029#define TEGRA20 0x20
30#define TEGRA30 0x30
Hiroshi Doyu7b30d452013-01-24 01:10:22 +000031#define TEGRA114 0x35
Peter De Schrijver35b14982012-02-10 01:47:41 +020032
Joseph Lo4b3e2ed2013-05-20 18:39:24 +080033#ifndef __ASSEMBLY__
34enum tegra_revision {
35 TEGRA_REVISION_UNKNOWN = 0,
36 TEGRA_REVISION_A01,
37 TEGRA_REVISION_A02,
38 TEGRA_REVISION_A03,
39 TEGRA_REVISION_A03p,
40 TEGRA_REVISION_A04,
41 TEGRA_REVISION_MAX,
42};
43
Olof Johansson9a1086d2011-10-13 00:31:20 -070044extern int tegra_sku_id;
45extern int tegra_cpu_process_id;
46extern int tegra_core_process_id;
Peter De Schrijver4c4ad662012-02-10 01:47:42 +020047extern int tegra_chip_id;
Danny Huangf8ddda72012-11-15 15:42:34 +080048extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */
Danny Huang25cd5a32012-11-15 15:42:33 +080049extern int tegra_soc_speedo_id;
Olof Johansson9a1086d2011-10-13 00:31:20 -070050extern enum tegra_revision tegra_revision;
51
Olof Johanssondee47182011-10-17 16:39:24 -070052extern int tegra_bct_strapping;
53
Colin Cross73625e32010-06-23 15:49:17 -070054unsigned long long tegra_chip_uid(void);
Colin Cross73625e32010-06-23 15:49:17 -070055void tegra_init_fuse(void);
Danny Huang1f851a22012-11-15 15:42:32 +080056bool tegra_spare_fuse(int bit);
57u32 tegra_fuse_readl(unsigned long offset);
Olof Johansson9a1086d2011-10-13 00:31:20 -070058
Danny Huang25cd5a32012-11-15 15:42:33 +080059#ifdef CONFIG_ARCH_TEGRA_2x_SOC
60void tegra20_init_speedo_data(void);
61#else
62static inline void tegra20_init_speedo_data(void) {}
63#endif
64
Danny Huangf8ddda72012-11-15 15:42:34 +080065#ifdef CONFIG_ARCH_TEGRA_3x_SOC
66void tegra30_init_speedo_data(void);
67#else
68static inline void tegra30_init_speedo_data(void) {}
69#endif
70
Danny Huang7495b2e2013-03-18 19:17:34 +080071#ifdef CONFIG_ARCH_TEGRA_114_SOC
72void tegra114_init_speedo_data(void);
73#else
74static inline void tegra114_init_speedo_data(void) {}
75#endif
Joseph Lo4b3e2ed2013-05-20 18:39:24 +080076#endif /* __ASSEMBLY__ */
Danny Huang7495b2e2013-03-18 19:17:34 +080077
Olof Johansson9a1086d2011-10-13 00:31:20 -070078#endif