linux/include/soc/tegra/fuse.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2012-2023, NVIDIA CORPORATION.  All rights reserved.
 */

#ifndef __SOC_TEGRA_FUSE_H__
#define __SOC_TEGRA_FUSE_H__

#include <linux/types.h>

#define TEGRA20
#define TEGRA30
#define TEGRA114
#define TEGRA124
#define TEGRA132
#define TEGRA210
#define TEGRA186
#define TEGRA194
#define TEGRA234
#define TEGRA241
#define TEGRA264

#define TEGRA_FUSE_SKU_CALIB_0
#define TEGRA30_FUSE_SATA_CALIB
#define TEGRA_FUSE_USB_CALIB_EXT_0

#ifndef __ASSEMBLY__

enum tegra_revision {};

enum tegra_platform {};

struct tegra_sku_info {};

#ifdef CONFIG_ARCH_TEGRA
extern struct tegra_sku_info tegra_sku_info;
u32 tegra_read_straps(void);
u32 tegra_read_ram_code(void);
int tegra_fuse_readl(unsigned long offset, u32 *value);
u32 tegra_read_chipid(void);
u8 tegra_get_chip_id(void);
u8 tegra_get_platform(void);
bool tegra_is_silicon(void);
int tegra194_miscreg_mask_serror(void);
#else
static struct tegra_sku_info tegra_sku_info __maybe_unused;

static inline u32 tegra_read_straps(void)
{}

static inline u32 tegra_read_ram_code(void)
{}

static inline int tegra_fuse_readl(unsigned long offset, u32 *value)
{}

static inline u32 tegra_read_chipid(void)
{}

static inline u8 tegra_get_chip_id(void)
{}

static inline u8 tegra_get_platform(void)
{}

static inline bool tegra_is_silicon(void)
{}

static inline int tegra194_miscreg_mask_serror(void)
{}
#endif

struct device *tegra_soc_device_register(void);

#endif /* __ASSEMBLY__ */

#endif /* __SOC_TEGRA_FUSE_H__ */