1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2010 Google, Inc.
4 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
7 * Colin Cross <ccross@android.com>
10 #ifndef __DRIVERS_MISC_TEGRA_FUSE_H
11 #define __DRIVERS_MISC_TEGRA_FUSE_H
13 #include <linux/dmaengine.h>
14 #include <linux/types.h>
16 struct nvmem_cell_lookup
;
20 struct tegra_fuse_info
{
21 u32 (*read
)(struct tegra_fuse
*fuse
, unsigned int offset
);
26 struct tegra_fuse_soc
{
27 void (*init
)(struct tegra_fuse
*fuse
);
28 void (*speedo_init
)(struct tegra_sku_info
*info
);
29 int (*probe
)(struct tegra_fuse
*fuse
);
31 const struct tegra_fuse_info
*info
;
33 const struct nvmem_cell_lookup
*lookups
;
34 unsigned int num_lookups
;
43 u32 (*read_early
)(struct tegra_fuse
*fuse
, unsigned int offset
);
44 u32 (*read
)(struct tegra_fuse
*fuse
, unsigned int offset
);
45 const struct tegra_fuse_soc
*soc
;
47 /* APBDMA on Tegra20 */
50 struct completion wait
;
51 struct dma_chan
*chan
;
52 struct dma_slave_config config
;
57 struct nvmem_device
*nvmem
;
58 struct nvmem_cell_lookup
*lookups
;
61 void tegra_init_revision(void);
62 void tegra_init_apbmisc(void);
64 bool __init
tegra_fuse_read_spare(unsigned int spare
);
65 u32 __init
tegra_fuse_read_early(unsigned int offset
);
67 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
68 void tegra20_init_speedo_data(struct tegra_sku_info
*sku_info
);
71 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
72 void tegra30_init_speedo_data(struct tegra_sku_info
*sku_info
);
75 #ifdef CONFIG_ARCH_TEGRA_114_SOC
76 void tegra114_init_speedo_data(struct tegra_sku_info
*sku_info
);
79 #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC)
80 void tegra124_init_speedo_data(struct tegra_sku_info
*sku_info
);
83 #ifdef CONFIG_ARCH_TEGRA_210_SOC
84 void tegra210_init_speedo_data(struct tegra_sku_info
*sku_info
);
87 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
88 extern const struct tegra_fuse_soc tegra20_fuse_soc
;
91 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
92 extern const struct tegra_fuse_soc tegra30_fuse_soc
;
95 #ifdef CONFIG_ARCH_TEGRA_114_SOC
96 extern const struct tegra_fuse_soc tegra114_fuse_soc
;
99 #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC)
100 extern const struct tegra_fuse_soc tegra124_fuse_soc
;
103 #ifdef CONFIG_ARCH_TEGRA_210_SOC
104 extern const struct tegra_fuse_soc tegra210_fuse_soc
;
107 #ifdef CONFIG_ARCH_TEGRA_186_SOC
108 extern const struct tegra_fuse_soc tegra186_fuse_soc
;
111 #ifdef CONFIG_ARCH_TEGRA_194_SOC
112 extern const struct tegra_fuse_soc tegra194_fuse_soc
;