diff options
author | Tim Chen <tim-chen@quanta.corp-partner.google.com> | 2020-12-01 10:04:04 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-01-15 11:22:13 +0000 |
commit | 77a7520385242bd2c9e323ecc74490b383c22f5e (patch) | |
tree | 60dcbfdc75203e7fc94f21d715ba5b398930c42a /src/mainboard/google/dedede/variants/metaknight/gpio.c | |
parent | 9d20c84460093db15445540359e5362bfc914d1a (diff) |
mb/google/dedede/var/metaknight: Add LTE power on/off sequence
LTE module used in metaknight has a specific power on/off sequence.
GPIOs related to power sequence are:
* GPP_A10 - LTE_PWR_OFF_R_ODL
* GPP_H17 - LTE_RESET_R_ODL
1. Power on: GPP_A10 -> 20ms -> GPP_H17
2. Power off: GPP_H17 -> 10ms -> GPP_A10
3. Warm reset: GPP_A10 keeps high, GPP_H17 goes low at least 2ms
Configure the GPIOs based on these requirements.
BUG=b:173671094
TEST=Build and boot Metaknight to OS. Ensure that the LTE module power
sequence requirements are met.
Change-Id: Ibff16129dfe2f1de2b1519049244aba4b3123e52
Signed-off-by: Tim Chen <tim-chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48195
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/mainboard/google/dedede/variants/metaknight/gpio.c')
-rw-r--r-- | src/mainboard/google/dedede/variants/metaknight/gpio.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/metaknight/gpio.c b/src/mainboard/google/dedede/variants/metaknight/gpio.c new file mode 100644 index 0000000000..d6a7fd599f --- /dev/null +++ b/src/mainboard/google/dedede/variants/metaknight/gpio.c @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/gpio.h> +#include <baseboard/variants.h> +#include <commonlib/helpers.h> +#include <vendorcode/google/chromeos/chromeos.h> + +/* Pad configuration in ramstage*/ +static const struct pad_config gpio_table[] = { + /* A10 : WWAN_EN => LTE_PWR_OFF_ODL */ + PAD_CFG_GPO(GPP_A10, 1, PWROK), + + /* H17 : WWAN_RST_L => LTE_RESET_R_ODL */ + PAD_CFG_GPO(GPP_H17, 0, PLTRST), +}; + +const struct pad_config *variant_override_gpio_table(size_t *num) +{ + *num = ARRAY_SIZE(gpio_table); + return gpio_table; +} |