Skip to contentSkip to conversation

Add mask-tpm-reset DT node to the exynos5

PATCH New Vikas Sajjan 3 participants 6 messages Jul 15, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover Add mask-tpm-reset DT node to the exynos5

Adds mask-tpm-reset DT node to the exynos5420 and exynos5800.

rebase on for-next branch of kgene tree
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/

Tested on exynos5420 and exynos5800 based Chromebooks (both pit and pi).

changes since v2:
- reordered the dt node based on gpio number
- included the exynos5800-peach-pi patch in this series

changes since v1:
- removed fixed regulator and used hogs instead.

Doug Anderson (1):
ARM: dts: Add mask-tpm-reset to the device tree

Vikas Sajjan (1):
ARM: dts: Add mask-tpm-reset DT node to the exynos5800-peach-pi

 arch/arm/boot/dts/exynos5420-peach-pit.dts |   12 ++++++++++++
 arch/arm/boot/dts/exynos5800-peach-pi.dts  |   12 ++++++++++++
 2 files changed, 24 insertions(+)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v3 1/2 ARM: dts: Add mask-tpm-reset to the device tree

From: Doug Anderson <[email protected]>

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.

---
 arch/arm/boot/dts/exynos5420-peach-pit.dts |   12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/exynos5420-peach-pit.dts +12 -0
index 6c7cab0..c7b2bba 100644
@@ -211,6 +211,9 @@
 
 
 &pinctrl_0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mask_tpm_reset>;
+
 	max98090_irq: max98090-irq {
 		samsung,pins = "gpx0-2";
 		samsung,pin-function = <0>;
@@ -218,6 +221,15 @@
 		samsung,pin-drv = <0>;
 	};
 
+	/* We need GPX0_6 to be low at sleep time; just keep it low always */
+	mask_tpm_reset: mask-tpm-reset {
+		samsung,pins = "gpx0-6";
+		samsung,pin-function = <1>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+		samsung,pin-val = <0>;
+	};
+
 	tpm_irq: tpm-irq {
 		samsung,pins = "gpx1-0";
 		samsung,pin-function = <0>;
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v3 1/2 ARM: dts: Add mask-tpm-reset to the device tree

Vikas,

Quoted 13 lines · Vikas Sajjan

From: Doug Anderson <[email protected]>

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.

Quoted 5 lines
---
 arch/arm/boot/dts/exynos5420-peach-pit.dts |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Looks good to me. I'll assume Kukjin will add the words "exynos5420-peach-pit" into the patch description when applying.

-Doug

Applied
#3 lore raw

PATCH v3 1/2 ARM: dts: Add mask-tpm-reset to the device tree

Quoted 16 lines · Doug Anderson

Vikas,

Quoted 13 lines · Vikas Sajjan

From: Doug Anderson<[email protected]>

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.

Quoted 9 lines
Quoted 5 lines
---
  arch/arm/boot/dts/exynos5420-peach-pit.dts |   12 ++++++++++++
  1 file changed, 12 insertions(+)

Looks good to me. I'll assume Kukjin will add the words "exynos5420-peach-pit" into the patch description when applying.

Yes :)

Quoted 2 lines

I've applied this series, thanks.

- Kukjin

#4 lore raw

PATCH v3 2/2 ARM: dts: Add mask-tpm-reset DT node to the exynos5800-peach-pi

In reply to Vikas Sajjan

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.

---
 arch/arm/boot/dts/exynos5800-peach-pi.dts |   12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/exynos5800-peach-pi.dts +12 -0
index 28f2a25..0bc97d9 100644
@@ -209,6 +209,9 @@
 
 
 &pinctrl_0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mask_tpm_reset>;
+
 	max98091_irq: max98091-irq {
 		samsung,pins = "gpx0-2";
 		samsung,pin-function = <0>;
@@ -216,6 +219,15 @@
 		samsung,pin-drv = <0>;
 	};
 
+	/* We need GPX0_6 to be low at sleep time; just keep it low always */
+	mask_tpm_reset: mask-tpm-reset {
+		samsung,pins = "gpx0-6";
+		samsung,pin-function = <1>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+		samsung,pin-val = <0>;
+	};
+
 	tpm_irq: tpm-irq {
 		samsung,pins = "gpx1-0";
 		samsung,pin-function = <0>;
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v3 2/2 ARM: dts: Add mask-tpm-reset DT node to the exynos5800-peach-pi

Vikas,

Quoted 7 lines · Vikas Sajjan

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.

Quoted 8 lines

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.

---
 arch/arm/boot/dts/exynos5800-peach-pi.dts |   12 ++++++++++++
 1 file changed, 12 insertions(+)

-Doug