linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] enable Tegra194 fuse
@ 2020-01-03  8:30 JC Kuo
  2020-01-03  8:30 ` [PATCH v1 1/2] soc/tegra: fuse: Add Tegra194 support JC Kuo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: JC Kuo @ 2020-01-03  8:30 UTC (permalink / raw)
  To: gregkh, thierry.reding, robh, jonathanh
  Cc: linux-tegra, linux-kernel, devicetree, 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

 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(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 1/2] soc/tegra: fuse: Add Tegra194 support
  2020-01-03  8:30 [PATCH v1 0/2] enable Tegra194 fuse JC Kuo
@ 2020-01-03  8:30 ` JC Kuo
  2020-01-03  8:30 ` [PATCH v1 2/2] arm64: tegra: Add fuse/apbmisc node on Tegra194 JC Kuo
  2020-01-10 11:08 ` [PATCH v1 0/2] enable Tegra194 fuse Thierry Reding
  2 siblings, 0 replies; 4+ messages in thread
From: JC Kuo @ 2020-01-03  8:30 UTC (permalink / raw)
  To: gregkh, thierry.reding, robh, jonathanh
  Cc: linux-tegra, linux-kernel, devicetree, JC Kuo

This commit adds Tegra194 fuse/apbmisc support.

Signed-off-by: JC Kuo <jckuo@nvidia.com>
---
 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(+)

diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
index 606abbe55bba..802717b9f6a3 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra.c
@@ -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
diff --git a/drivers/soc/tegra/fuse/fuse-tegra30.c b/drivers/soc/tegra/fuse/fuse-tegra30.c
index b8daaf5b7291..f68f4e1c215d 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra30.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra30.c
@@ -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
diff --git a/drivers/soc/tegra/fuse/fuse.h b/drivers/soc/tegra/fuse/fuse.h
index 0f74c2c34af0..94a059e577a1 100644
--- a/drivers/soc/tegra/fuse/fuse.h
+++ b/drivers/soc/tegra/fuse/fuse.h
@@ -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
diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c
index a2fd6ccd48f9..7e608f682391 100644
--- a/drivers/soc/tegra/fuse/tegra-apbmisc.c
+++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c
@@ -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", },
 	{},
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v1 2/2] arm64: tegra: Add fuse/apbmisc node on Tegra194
  2020-01-03  8:30 [PATCH v1 0/2] enable Tegra194 fuse JC Kuo
  2020-01-03  8:30 ` [PATCH v1 1/2] soc/tegra: fuse: Add Tegra194 support JC Kuo
@ 2020-01-03  8:30 ` JC Kuo
  2020-01-10 11:08 ` [PATCH v1 0/2] enable Tegra194 fuse Thierry Reding
  2 siblings, 0 replies; 4+ messages in thread
From: JC Kuo @ 2020-01-03  8:30 UTC (permalink / raw)
  To: gregkh, thierry.reding, robh, jonathanh
  Cc: linux-tegra, linux-kernel, devicetree, JC Kuo

This commit adds Tegra194 fuse and apbmisc device nodes.

Signed-off-by: JC Kuo <jckuo@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
index 495f692e6a0b..f336bc3e195a 100644
--- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
@@ -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>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 0/2] enable Tegra194 fuse
  2020-01-03  8:30 [PATCH v1 0/2] enable Tegra194 fuse JC Kuo
  2020-01-03  8:30 ` [PATCH v1 1/2] soc/tegra: fuse: Add Tegra194 support JC Kuo
  2020-01-03  8:30 ` [PATCH v1 2/2] arm64: tegra: Add fuse/apbmisc node on Tegra194 JC Kuo
@ 2020-01-10 11:08 ` Thierry Reding
  2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2020-01-10 11:08 UTC (permalink / raw)
  To: JC Kuo; +Cc: gregkh, robh, jonathanh, linux-tegra, linux-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

On Fri, Jan 03, 2020 at 04:30:16PM +0800, JC Kuo wrote:
> 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(+)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-10 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03  8:30 [PATCH v1 0/2] enable Tegra194 fuse JC Kuo
2020-01-03  8:30 ` [PATCH v1 1/2] soc/tegra: fuse: Add Tegra194 support JC Kuo
2020-01-03  8:30 ` [PATCH v1 2/2] arm64: tegra: Add fuse/apbmisc node on Tegra194 JC Kuo
2020-01-10 11:08 ` [PATCH v1 0/2] enable Tegra194 fuse Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).