mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-16 15:02:16 +01:00
drivers: tpm2: update reset gpio semantics
Use the more generic reset-gpios property name. Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
8a0f5f6e70
commit
cc5afabc9d
@ -6,7 +6,8 @@ Required properties:
|
|||||||
- reg : SPI Chip select
|
- reg : SPI Chip select
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- gpio-reset : Reset GPIO (if not connected to the SoC reset line)
|
- reset-gpios : Reset GPIO (if not connected to the SoC reset line)
|
||||||
|
- gpio-reset : Reset GPIO (deprecated, use reset-gpios instead)
|
||||||
- spi-max-frequency : See spi-bus.txt
|
- spi-max-frequency : See spi-bus.txt
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|||||||
@ -589,18 +589,25 @@ static int tpm_tis_spi_probe(struct udevice *dev)
|
|||||||
if (CONFIG_IS_ENABLED(DM_GPIO)) {
|
if (CONFIG_IS_ENABLED(DM_GPIO)) {
|
||||||
struct gpio_desc reset_gpio;
|
struct gpio_desc reset_gpio;
|
||||||
|
|
||||||
ret = gpio_request_by_name(dev, "gpio-reset", 0,
|
ret = gpio_request_by_name(dev, "reset-gpios", 0,
|
||||||
&reset_gpio, GPIOD_IS_OUT);
|
&reset_gpio, GPIOD_IS_OUT);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
log(LOGC_NONE, LOGL_NOTICE, "%s: missing reset GPIO\n",
|
/* legacy reset */
|
||||||
__func__);
|
ret = gpio_request_by_name(dev, "gpio-reset", 0,
|
||||||
} else {
|
&reset_gpio, GPIOD_IS_OUT);
|
||||||
dm_gpio_set_value(&reset_gpio, 1);
|
if (ret) {
|
||||||
mdelay(1);
|
log(LOGC_NONE, LOGL_NOTICE,
|
||||||
dm_gpio_set_value(&reset_gpio, 0);
|
"%s: missing reset GPIO\n", __func__);
|
||||||
|
goto init;
|
||||||
|
}
|
||||||
|
log(LOGC_NONE, LOGL_NOTICE,
|
||||||
|
"%s: gpio-reset is deprecated\n", __func__);
|
||||||
}
|
}
|
||||||
|
dm_gpio_set_value(&reset_gpio, 1);
|
||||||
|
mdelay(1);
|
||||||
|
dm_gpio_set_value(&reset_gpio, 0);
|
||||||
}
|
}
|
||||||
|
init:
|
||||||
/* Ensure a minimum amount of time elapsed since reset of the TPM */
|
/* Ensure a minimum amount of time elapsed since reset of the TPM */
|
||||||
mdelay(drv_data->time_before_first_cmd_ms);
|
mdelay(drv_data->time_before_first_cmd_ms);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user