aboutsummaryrefslogtreecommitdiff
path: root/drivers/tpm/tpm2_tis_spi.c
diff options
context:
space:
mode:
authorKayla Theil <kayla.theil@mixed-mode.de>2019-09-06 12:40:45 +0200
committerSimon Glass <sjg@chromium.org>2019-10-15 08:40:02 -0600
commitd8206ff198afaf36061efb14ff6af5e6119b30e7 (patch)
treed8e708f15a7772cbee2d7945a9c3c57163e54056 /drivers/tpm/tpm2_tis_spi.c
parent7a3f15e7181cf5a9667ff410260397f0e51c9020 (diff)
downloadu-boot-d8206ff198afaf36061efb14ff6af5e6119b30e7.zip
u-boot-d8206ff198afaf36061efb14ff6af5e6119b30e7.tar.gz
u-boot-d8206ff198afaf36061efb14ff6af5e6119b30e7.tar.bz2
tpm2: Don't assume active low reset value
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>
Diffstat (limited to 'drivers/tpm/tpm2_tis_spi.c')
-rw-r--r--drivers/tpm/tpm2_tis_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 7186c17..3d105fd 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);
}
}