1306a7f91SThierry Reding /* 2306a7f91SThierry Reding * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. 3306a7f91SThierry Reding * 4306a7f91SThierry Reding * This program is free software; you can redistribute it and/or modify it 5306a7f91SThierry Reding * under the terms and conditions of the GNU General Public License, 6306a7f91SThierry Reding * version 2, as published by the Free Software Foundation. 7306a7f91SThierry Reding * 8306a7f91SThierry Reding * This program is distributed in the hope it will be useful, but WITHOUT 9306a7f91SThierry Reding * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10306a7f91SThierry Reding * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 11306a7f91SThierry Reding * more details. 12306a7f91SThierry Reding * 13306a7f91SThierry Reding * You should have received a copy of the GNU General Public License 14306a7f91SThierry Reding * along with this program. If not, see <http://www.gnu.org/licenses/>. 15306a7f91SThierry Reding */ 16306a7f91SThierry Reding 17306a7f91SThierry Reding #ifndef __SOC_TEGRA_FUSE_H__ 18306a7f91SThierry Reding #define __SOC_TEGRA_FUSE_H__ 19306a7f91SThierry Reding 20304664eaSThierry Reding #define TEGRA20 0x20 21304664eaSThierry Reding #define TEGRA30 0x30 22304664eaSThierry Reding #define TEGRA114 0x35 23304664eaSThierry Reding #define TEGRA124 0x40 2424ef5745SThierry Reding #define TEGRA132 0x13 250dc5a0d8SThierry Reding #define TEGRA210 0x21 26304664eaSThierry Reding 27783c8f4cSPeter De Schrijver #define TEGRA_FUSE_SKU_CALIB_0 0xf0 28783c8f4cSPeter De Schrijver #define TEGRA30_FUSE_SATA_CALIB 0x124 2987d66f28SThierry Reding #define TEGRA_FUSE_USB_CALIB_EXT_0 0x250 30783c8f4cSPeter De Schrijver 31304664eaSThierry Reding #ifndef __ASSEMBLY__ 32304664eaSThierry Reding 33306a7f91SThierry Reding u32 tegra_read_chipid(void); 34304664eaSThierry Reding u8 tegra_get_chip_id(void); 35304664eaSThierry Reding 3635874f36SPeter De Schrijver enum tegra_revision { 3735874f36SPeter De Schrijver TEGRA_REVISION_UNKNOWN = 0, 3835874f36SPeter De Schrijver TEGRA_REVISION_A01, 3935874f36SPeter De Schrijver TEGRA_REVISION_A02, 4035874f36SPeter De Schrijver TEGRA_REVISION_A03, 4135874f36SPeter De Schrijver TEGRA_REVISION_A03p, 4235874f36SPeter De Schrijver TEGRA_REVISION_A04, 4335874f36SPeter De Schrijver TEGRA_REVISION_MAX, 4435874f36SPeter De Schrijver }; 4535874f36SPeter De Schrijver 46783c8f4cSPeter De Schrijver struct tegra_sku_info { 47783c8f4cSPeter De Schrijver int sku_id; 48783c8f4cSPeter De Schrijver int cpu_process_id; 49783c8f4cSPeter De Schrijver int cpu_speedo_id; 50783c8f4cSPeter De Schrijver int cpu_speedo_value; 51783c8f4cSPeter De Schrijver int cpu_iddq_value; 5203b3f4c8SThierry Reding int soc_process_id; 53783c8f4cSPeter De Schrijver int soc_speedo_id; 540dc5a0d8SThierry Reding int soc_speedo_value; 55783c8f4cSPeter De Schrijver int gpu_process_id; 560dc5a0d8SThierry Reding int gpu_speedo_id; 57783c8f4cSPeter De Schrijver int gpu_speedo_value; 58783c8f4cSPeter De Schrijver enum tegra_revision revision; 59783c8f4cSPeter De Schrijver }; 60783c8f4cSPeter De Schrijver 6135874f36SPeter De Schrijver u32 tegra_read_straps(void); 626ea2609aSMikko Perttunen u32 tegra_read_ram_code(void); 6335874f36SPeter De Schrijver u32 tegra_read_chipid(void); 64783c8f4cSPeter De Schrijver int tegra_fuse_readl(unsigned long offset, u32 *value); 6535874f36SPeter De Schrijver 66783c8f4cSPeter De Schrijver extern struct tegra_sku_info tegra_sku_info; 6735874f36SPeter De Schrijver 6827a0342aSThierry Reding struct device *tegra_soc_device_register(void); 6927a0342aSThierry Reding 70304664eaSThierry Reding #endif /* __ASSEMBLY__ */ 71306a7f91SThierry Reding 72306a7f91SThierry Reding #endif /* __SOC_TEGRA_FUSE_H__ */ 73