OSDN Git Service

soc/tegra: fuse: Add Tegra194 support
authorJC Kuo <jckuo@nvidia.com>
Fri, 3 Jan 2020 08:30:17 +0000 (16:30 +0800)
committerThierry Reding <treding@nvidia.com>
Thu, 9 Jan 2020 18:27:27 +0000 (19:27 +0100)
This commit adds Tegra194 fuse/apbmisc support.

Signed-off-by: JC Kuo <jckuo@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/fuse/fuse-tegra.c
drivers/soc/tegra/fuse/fuse-tegra30.c
drivers/soc/tegra/fuse/fuse.h
drivers/soc/tegra/fuse/tegra-apbmisc.c

index 4d719d4..110cc00 100644 (file)
@@ -49,6 +49,9 @@ static struct tegra_fuse *fuse = &(struct tegra_fuse) {
 };
 
 static const struct of_device_id tegra_fuse_match[] = {
+#ifdef CONFIG_ARCH_TEGRA_194_SOC
+       { .compatible = "nvidia,tegra194-efuse", .data = &tegra194_fuse_soc },
+#endif
 #ifdef CONFIG_ARCH_TEGRA_186_SOC
        { .compatible = "nvidia,tegra186-efuse", .data = &tegra186_fuse_soc },
 #endif
index b8daaf5..f68f4e1 100644 (file)
@@ -320,3 +320,32 @@ const struct tegra_fuse_soc tegra186_fuse_soc = {
        .num_lookups = ARRAY_SIZE(tegra186_fuse_lookups),
 };
 #endif
+
+#if defined(CONFIG_ARCH_TEGRA_194_SOC)
+static const struct nvmem_cell_lookup tegra194_fuse_lookups[] = {
+       {
+               .nvmem_name = "fuse",
+               .cell_name = "xusb-pad-calibration",
+               .dev_id = "3520000.padctl",
+               .con_id = "calibration",
+       }, {
+               .nvmem_name = "fuse",
+               .cell_name = "xusb-pad-calibration-ext",
+               .dev_id = "3520000.padctl",
+               .con_id = "calibration-ext",
+       },
+};
+
+static const struct tegra_fuse_info tegra194_fuse_info = {
+       .read = tegra30_fuse_read,
+       .size = 0x300,
+       .spare = 0x280,
+};
+
+const struct tegra_fuse_soc tegra194_fuse_soc = {
+       .init = tegra30_fuse_init,
+       .info = &tegra194_fuse_info,
+       .lookups = tegra194_fuse_lookups,
+       .num_lookups = ARRAY_SIZE(tegra194_fuse_lookups),
+};
+#endif
index 0f74c2c..94a059e 100644 (file)
@@ -108,4 +108,8 @@ extern const struct tegra_fuse_soc tegra210_fuse_soc;
 extern const struct tegra_fuse_soc tegra186_fuse_soc;
 #endif
 
+#ifdef CONFIG_ARCH_TEGRA_194_SOC
+extern const struct tegra_fuse_soc tegra194_fuse_soc;
+#endif
+
 #endif
index df76778..6aa6c98 100644 (file)
@@ -63,6 +63,7 @@ u32 tegra_read_ram_code(void)
 static const struct of_device_id apbmisc_match[] __initconst = {
        { .compatible = "nvidia,tegra20-apbmisc", },
        { .compatible = "nvidia,tegra186-misc", },
+       { .compatible = "nvidia,tegra194-misc", },
        {},
 };