2019-05-29 01:10:04 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2013-01-11 15:46:19 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2014-07-17 19:17:24 +08:00
|
|
|
#ifndef __SOC_TEGRA_FUSE_H__
|
|
|
|
#define __SOC_TEGRA_FUSE_H__
|
2013-01-11 15:46:19 +08:00
|
|
|
|
2014-07-11 15:52:41 +08:00
|
|
|
#define TEGRA20 0x20
|
|
|
|
#define TEGRA30 0x30
|
|
|
|
#define TEGRA114 0x35
|
|
|
|
#define TEGRA124 0x40
|
2015-01-08 15:24:45 +08:00
|
|
|
#define TEGRA132 0x13
|
2015-04-29 22:55:57 +08:00
|
|
|
#define TEGRA210 0x21
|
2020-06-26 16:44:01 +08:00
|
|
|
#define TEGRA186 0x18
|
|
|
|
#define TEGRA194 0x19
|
2014-07-11 15:52:41 +08:00
|
|
|
|
2014-06-12 23:36:37 +08:00
|
|
|
#define TEGRA_FUSE_SKU_CALIB_0 0xf0
|
|
|
|
#define TEGRA30_FUSE_SATA_CALIB 0x124
|
2015-11-12 01:25:02 +08:00
|
|
|
#define TEGRA_FUSE_USB_CALIB_EXT_0 0x250
|
2014-06-12 23:36:37 +08:00
|
|
|
|
2014-07-11 15:52:41 +08:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2013-01-11 15:46:19 +08:00
|
|
|
u32 tegra_read_chipid(void);
|
2014-07-11 15:52:41 +08:00
|
|
|
u8 tegra_get_chip_id(void);
|
2020-09-17 18:07:45 +08:00
|
|
|
u8 tegra_get_platform(void);
|
2014-07-11 15:52:41 +08:00
|
|
|
|
2014-06-12 23:36:36 +08:00
|
|
|
enum tegra_revision {
|
|
|
|
TEGRA_REVISION_UNKNOWN = 0,
|
|
|
|
TEGRA_REVISION_A01,
|
|
|
|
TEGRA_REVISION_A02,
|
|
|
|
TEGRA_REVISION_A03,
|
|
|
|
TEGRA_REVISION_A03p,
|
|
|
|
TEGRA_REVISION_A04,
|
|
|
|
TEGRA_REVISION_MAX,
|
|
|
|
};
|
|
|
|
|
2014-06-12 23:36:37 +08:00
|
|
|
struct tegra_sku_info {
|
|
|
|
int sku_id;
|
|
|
|
int cpu_process_id;
|
|
|
|
int cpu_speedo_id;
|
|
|
|
int cpu_speedo_value;
|
|
|
|
int cpu_iddq_value;
|
2015-03-23 21:44:08 +08:00
|
|
|
int soc_process_id;
|
2014-06-12 23:36:37 +08:00
|
|
|
int soc_speedo_id;
|
2015-04-29 22:55:57 +08:00
|
|
|
int soc_speedo_value;
|
2014-06-12 23:36:37 +08:00
|
|
|
int gpu_process_id;
|
2015-04-29 22:55:57 +08:00
|
|
|
int gpu_speedo_id;
|
2014-06-12 23:36:37 +08:00
|
|
|
int gpu_speedo_value;
|
|
|
|
enum tegra_revision revision;
|
|
|
|
};
|
|
|
|
|
2014-06-12 23:36:36 +08:00
|
|
|
u32 tegra_read_straps(void);
|
2015-03-12 22:47:55 +08:00
|
|
|
u32 tegra_read_ram_code(void);
|
2014-06-12 23:36:37 +08:00
|
|
|
int tegra_fuse_readl(unsigned long offset, u32 *value);
|
2014-06-12 23:36:36 +08:00
|
|
|
|
2014-06-12 23:36:37 +08:00
|
|
|
extern struct tegra_sku_info tegra_sku_info;
|
2014-06-12 23:36:36 +08:00
|
|
|
|
2017-08-17 22:42:17 +08:00
|
|
|
struct device *tegra_soc_device_register(void);
|
|
|
|
|
2014-07-11 15:52:41 +08:00
|
|
|
#endif /* __ASSEMBLY__ */
|
2013-01-11 15:46:19 +08:00
|
|
|
|
2014-07-17 19:17:24 +08:00
|
|
|
#endif /* __SOC_TEGRA_FUSE_H__ */
|