Thomas Gleixner | 9952f69 | 2019-05-28 10:10:04 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Prashant Gaikwad | c7736ed | 2013-01-11 13:16:19 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. |
Prashant Gaikwad | c7736ed | 2013-01-11 13:16:19 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
Thierry Reding | 306a7f9 | 2014-07-17 13:17:24 +0200 | [diff] [blame] | 6 | #ifndef __SOC_TEGRA_FUSE_H__ |
| 7 | #define __SOC_TEGRA_FUSE_H__ |
Prashant Gaikwad | c7736ed | 2013-01-11 13:16:19 +0530 | [diff] [blame] | 8 | |
Thierry Reding | 304664e | 2014-07-11 09:52:41 +0200 | [diff] [blame] | 9 | #define TEGRA20 0x20 |
| 10 | #define TEGRA30 0x30 |
| 11 | #define TEGRA114 0x35 |
| 12 | #define TEGRA124 0x40 |
Thierry Reding | 24ef574 | 2015-01-08 08:24:45 +0100 | [diff] [blame] | 13 | #define TEGRA132 0x13 |
Thierry Reding | 0dc5a0d | 2015-04-29 16:55:57 +0200 | [diff] [blame] | 14 | #define TEGRA210 0x21 |
Thierry Reding | 304664e | 2014-07-11 09:52:41 +0200 | [diff] [blame] | 15 | |
Peter De Schrijver | 783c8f4 | 2014-06-12 18:36:37 +0300 | [diff] [blame] | 16 | #define TEGRA_FUSE_SKU_CALIB_0 0xf0 |
| 17 | #define TEGRA30_FUSE_SATA_CALIB 0x124 |
Thierry Reding | 87d66f2 | 2015-11-11 18:25:02 +0100 | [diff] [blame] | 18 | #define TEGRA_FUSE_USB_CALIB_EXT_0 0x250 |
Peter De Schrijver | 783c8f4 | 2014-06-12 18:36:37 +0300 | [diff] [blame] | 19 | |
Thierry Reding | 304664e | 2014-07-11 09:52:41 +0200 | [diff] [blame] | 20 | #ifndef __ASSEMBLY__ |
| 21 | |
Prashant Gaikwad | c7736ed | 2013-01-11 13:16:19 +0530 | [diff] [blame] | 22 | u32 tegra_read_chipid(void); |
Thierry Reding | 304664e | 2014-07-11 09:52:41 +0200 | [diff] [blame] | 23 | u8 tegra_get_chip_id(void); |
| 24 | |
Peter De Schrijver | 35874f3 | 2014-06-12 18:36:36 +0300 | [diff] [blame] | 25 | enum tegra_revision { |
| 26 | TEGRA_REVISION_UNKNOWN = 0, |
| 27 | TEGRA_REVISION_A01, |
| 28 | TEGRA_REVISION_A02, |
| 29 | TEGRA_REVISION_A03, |
| 30 | TEGRA_REVISION_A03p, |
| 31 | TEGRA_REVISION_A04, |
| 32 | TEGRA_REVISION_MAX, |
| 33 | }; |
| 34 | |
Peter De Schrijver | 783c8f4 | 2014-06-12 18:36:37 +0300 | [diff] [blame] | 35 | struct tegra_sku_info { |
| 36 | int sku_id; |
| 37 | int cpu_process_id; |
| 38 | int cpu_speedo_id; |
| 39 | int cpu_speedo_value; |
| 40 | int cpu_iddq_value; |
Thierry Reding | 03b3f4c | 2015-03-23 14:44:08 +0100 | [diff] [blame] | 41 | int soc_process_id; |
Peter De Schrijver | 783c8f4 | 2014-06-12 18:36:37 +0300 | [diff] [blame] | 42 | int soc_speedo_id; |
Thierry Reding | 0dc5a0d | 2015-04-29 16:55:57 +0200 | [diff] [blame] | 43 | int soc_speedo_value; |
Peter De Schrijver | 783c8f4 | 2014-06-12 18:36:37 +0300 | [diff] [blame] | 44 | int gpu_process_id; |
Thierry Reding | 0dc5a0d | 2015-04-29 16:55:57 +0200 | [diff] [blame] | 45 | int gpu_speedo_id; |
Peter De Schrijver | 783c8f4 | 2014-06-12 18:36:37 +0300 | [diff] [blame] | 46 | int gpu_speedo_value; |
| 47 | enum tegra_revision revision; |
| 48 | }; |
| 49 | |
Peter De Schrijver | 35874f3 | 2014-06-12 18:36:36 +0300 | [diff] [blame] | 50 | u32 tegra_read_straps(void); |
Mikko Perttunen | 6ea2609 | 2015-03-12 15:47:55 +0100 | [diff] [blame] | 51 | u32 tegra_read_ram_code(void); |
Peter De Schrijver | 783c8f4 | 2014-06-12 18:36:37 +0300 | [diff] [blame] | 52 | int tegra_fuse_readl(unsigned long offset, u32 *value); |
Peter De Schrijver | 35874f3 | 2014-06-12 18:36:36 +0300 | [diff] [blame] | 53 | |
Peter De Schrijver | 783c8f4 | 2014-06-12 18:36:37 +0300 | [diff] [blame] | 54 | extern struct tegra_sku_info tegra_sku_info; |
Peter De Schrijver | 35874f3 | 2014-06-12 18:36:36 +0300 | [diff] [blame] | 55 | |
Thierry Reding | 27a0342 | 2017-08-17 16:42:17 +0200 | [diff] [blame] | 56 | struct device *tegra_soc_device_register(void); |
| 57 | |
Thierry Reding | 304664e | 2014-07-11 09:52:41 +0200 | [diff] [blame] | 58 | #endif /* __ASSEMBLY__ */ |
Prashant Gaikwad | c7736ed | 2013-01-11 13:16:19 +0530 | [diff] [blame] | 59 | |
Thierry Reding | 306a7f9 | 2014-07-17 13:17:24 +0200 | [diff] [blame] | 60 | #endif /* __SOC_TEGRA_FUSE_H__ */ |