linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: Add mask-tpm-reset to the device tree
@ 2014-06-26  9:15 Vikas Sajjan
  2014-06-26  9:52 ` Tomasz Figa
  2014-07-08  7:46 ` Linus Walleij
  0 siblings, 2 replies; 20+ messages in thread
From: Vikas Sajjan @ 2014-06-26  9:15 UTC (permalink / raw)
  To: linux-arm-kernel

From: Doug Anderson <dianders@chromium.org>

The mask-tpm-reset GPIO is used by the kernel to prevent the TPM from
being reset across sleep/wake.  If we don't set it to anything then
the TPM will be reset.  U-Boot will detect this as invalid
and will reset the system on resume time. This GPIO can always be low
and not hurt anything.  It will get pulled back high again during a
normal warm reset when it will default back to an input.

To properly preserve the TPM state across suspend/resume and to make
the chrome U-Boot happy, properly set the GPIO to mask the
reset to the TPM.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
---
 arch/arm/boot/dts/exynos5420-peach-pit.dts |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 7649982..8fd990a 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -87,6 +87,18 @@
 		pinctrl-0 = <&usb301_vbus_en>;
 		enable-active-high;
 	};
+
+	/* We need GPX0_6 to be low at sleep time; just keep it low always */
+	mask_tpm_reset_regulator: mask-tpm-reset-regulator {
+	compatible = "regulator-fixed";
+	regulator-name = "mask-tpm-reset ";
+		gpio = <&gpx0 6 0>;
+		enable-active-low;
+		regulator-boot-on;
+		regulator-always-on;
+		pinctrl-names = "default";
+		pinctrl-0 = <&mask_tpm_reset>;
+	};
 };
 
 &dp {
@@ -210,6 +222,14 @@
 
 
 &pinctrl_0 {
+
+	mask_tpm_reset: mask-tpm-reset {
+		samsung,pins = "gpx0-6";
+		samsung,pin-function = <1>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
 	max98090_irq: max98090-irq {
 		samsung,pins = "gpx0-2";
 		samsung,pin-function = <0>;
-- 
1.7.9.5

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

end of thread, other threads:[~2014-07-10 15:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26  9:15 [PATCH] ARM: dts: Add mask-tpm-reset to the device tree Vikas Sajjan
2014-06-26  9:52 ` Tomasz Figa
2014-06-26 15:25   ` Doug Anderson
2014-06-27 12:17     ` Tomasz Figa
2014-06-27 15:10       ` Doug Anderson
2014-06-27 15:14         ` Tomasz Figa
2014-06-27 15:22           ` Doug Anderson
2014-06-27 15:49             ` Vikas Sajjan
2014-06-27 16:10       ` Stephen Warren
2014-06-27 16:45         ` Doug Anderson
2014-06-27 18:20           ` Stephen Warren
2014-06-27 18:30             ` Doug Anderson
2014-06-27 19:56               ` Stephen Warren
2014-06-27 19:58                 ` Doug Anderson
2014-07-08  7:46 ` Linus Walleij
2014-07-08 15:27   ` Doug Anderson
2014-07-08 16:20     ` Tomasz Figa
2014-07-09 15:22       ` Doug Anderson
2014-07-10  4:35         ` Vikas Sajjan
2014-07-10 15:25           ` Doug Anderson

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).