Skip to contentSkip to conversation

enable Tegra194 fuse

PATCH Applied JC Kuo 2 participants 4 messages Jan 3, 2020 – Jan 10, 2020

Subsystems (2)
lore
Share & tools
lore

JC Kuo

author
#0 lore raw

cover enable Tegra194 fuse

This patch series enables Tegra194 fuse registers access.

JC Kuo (2):
soc/tegra: fuse: Add Tegra194 support
arm64: tegra: Add fuse/apbmisc node on Tegra194

 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 13 +++++++++++
 drivers/soc/tegra/fuse/fuse-tegra.c      |  3 +++
 drivers/soc/tegra/fuse/fuse-tegra30.c    | 29 ++++++++++++++++++++++++
 drivers/soc/tegra/fuse/fuse.h            |  4 ++++
 drivers/soc/tegra/fuse/tegra-apbmisc.c   |  1 +
 5 files changed, 50 insertions(+)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/2 soc/tegra: fuse: Add Tegra194 support

This commit adds Tegra194 fuse/apbmisc support.

---
 drivers/soc/tegra/fuse/fuse-tegra.c    |  3 +++
 drivers/soc/tegra/fuse/fuse-tegra30.c  | 29 ++++++++++++++++++++++++++
 drivers/soc/tegra/fuse/fuse.h          |  4 ++++
 drivers/soc/tegra/fuse/tegra-apbmisc.c |  1 +
 4 files changed, 37 insertions(+)
drivers/soc/tegra/fuse/fuse-tegra.c +3 -0
index 606abbe55bba..802717b9f6a3 100644
@@ -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
drivers/soc/tegra/fuse/fuse-tegra30.c +29 -0
index b8daaf5b7291..f68f4e1c215d 100644
@@ -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
drivers/soc/tegra/fuse/fuse.h +4 -0
index 0f74c2c34af0..94a059e577a1 100644
@@ -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
drivers/soc/tegra/fuse/tegra-apbmisc.c +1 -0
index a2fd6ccd48f9..7e608f682391 100644
@@ -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", },
 	{},
 };
 
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH 2/2 arm64: tegra: Add fuse/apbmisc node on Tegra194

In reply to JC Kuo

This commit adds Tegra194 fuse and apbmisc device nodes.

---
 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/nvidia/tegra194.dtsi +13 -0
index 495f692e6a0b..f336bc3e195a 100644
@@ -21,6 +21,12 @@
 		#size-cells = <1>;
 		ranges = <0x0 0x0 0x0 0x40000000>;
 
+		misc@100000 {
+			compatible = "nvidia,tegra194-misc";
+			reg = <0x00100000 0xf000>,
+			      <0x0010f000 0x1000>;
+		};
+
 		gpio: gpio@2200000 {
 			compatible = "nvidia,tegra194-gpio";
 			reg-names = "security", "gpio";
@@ -627,6 +633,13 @@
 			status = "disabled";
 		};
 
+		fuse@3820000 {
+			compatible = "nvidia,tegra194-efuse";
+			reg = <0x03820000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_FUSE>;
+			clock-names = "fuse";
+		};
+
 		gic: interrupt-controller@3881000 {
 			compatible = "arm,gic-400";
 			#interrupt-cells = <3>;
Signature · 1 line
2.17.1
#3 lore raw
In reply to JC Kuo
Quoted 6 lines · JC Kuo

This patch series enables Tegra194 fuse registers access.

JC Kuo (2):
soc/tegra: fuse: Add Tegra194 support
arm64: tegra: Add fuse/apbmisc node on Tegra194

Quoted 6 lines
 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 13 +++++++++++
 drivers/soc/tegra/fuse/fuse-tegra.c      |  3 +++
 drivers/soc/tegra/fuse/fuse-tegra30.c    | 29 ++++++++++++++++++++++++
 drivers/soc/tegra/fuse/fuse.h            |  4 ++++
 drivers/soc/tegra/fuse/tegra-apbmisc.c   |  1 +
 5 files changed, 50 insertions(+)

Applied, thanks.

Thierry