* [U-Boot] [PATCH] tpm2: Don't assume active low reset value
@ 2019-09-06 10:40 Kayla Theil
2019-09-27 1:49 ` Simon Glass
2019-09-27 23:28 ` sjg at google.com
0 siblings, 2 replies; 3+ messages in thread
From: Kayla Theil @ 2019-09-06 10:40 UTC (permalink / raw)
To: u-boot
The reset function sets the pin to 0 then 1 but if the pin is marked
ACTIVE_LOW in the DT it gets inverted and leaves the TPM in reset.
Let the gpio driver take care of the reset polarity.
Signed-off-by: Kayla Theil <kayla.theil@mixed-mode.de>
---
drivers/tpm/tpm2_tis_spi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 7186c179d1..3d105fddba 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -596,9 +596,9 @@ static int tpm_tis_spi_probe(struct udevice *dev)
log(LOGC_NONE, LOGL_NOTICE, "%s: missing reset GPIO\n",
__func__);
} else {
- dm_gpio_set_value(&reset_gpio, 0);
- mdelay(1);
dm_gpio_set_value(&reset_gpio, 1);
+ mdelay(1);
+ dm_gpio_set_value(&reset_gpio, 0);
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] tpm2: Don't assume active low reset value
2019-09-06 10:40 [U-Boot] [PATCH] tpm2: Don't assume active low reset value Kayla Theil
@ 2019-09-27 1:49 ` Simon Glass
2019-09-27 23:28 ` sjg at google.com
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2019-09-27 1:49 UTC (permalink / raw)
To: u-boot
On Fri, 6 Sep 2019 at 16:08, Kayla Theil <kayla.theil@mixed-mode.de> wrote:
>
> The reset function sets the pin to 0 then 1 but if the pin is marked
> ACTIVE_LOW in the DT it gets inverted and leaves the TPM in reset.
> Let the gpio driver take care of the reset polarity.
>
> Signed-off-by: Kayla Theil <kayla.theil@mixed-mode.de>
> ---
> drivers/tpm/tpm2_tis_spi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] tpm2: Don't assume active low reset value
2019-09-06 10:40 [U-Boot] [PATCH] tpm2: Don't assume active low reset value Kayla Theil
2019-09-27 1:49 ` Simon Glass
@ 2019-09-27 23:28 ` sjg at google.com
1 sibling, 0 replies; 3+ messages in thread
From: sjg at google.com @ 2019-09-27 23:28 UTC (permalink / raw)
To: u-boot
On Fri, 6 Sep 2019 at 16:08, Kayla Theil <kayla.theil@mixed-mode.de> wrote:
>
> The reset function sets the pin to 0 then 1 but if the pin is marked
> ACTIVE_LOW in the DT it gets inverted and leaves the TPM in reset.
> Let the gpio driver take care of the reset polarity.
>
> Signed-off-by: Kayla Theil <kayla.theil@mixed-mode.de>
> ---
> drivers/tpm/tpm2_tis_spi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-27 23:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 10:40 [U-Boot] [PATCH] tpm2: Don't assume active low reset value Kayla Theil
2019-09-27 1:49 ` Simon Glass
2019-09-27 23:28 ` sjg at google.com
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.