mainboard/google/coral: power off EN_PP3300_DX_LTE_SOC when entering S5
On Astronaunt, after the system enters the S5 power state, there is a 10-second timeout before the system transitions the power state from S5 to G3. The EN_PP3300_DX_LTE_SOC signal, which is controlled by GPIO_78 on the APL platform, remains on during that period. If the system is powered back on before going to G3, the built-in modem won't go through a power cycle as EN_PP3300_DX_LTE_SOC is never de-asserted. Keeping the modem, and indirectly the SIM, powered during a quick system power cycle may sometimes be undesirable. For instance, we would like a SIM with PIN lock enabled to require unlocking each time the system is powered on. After the SIM receives a PIN, it may remain unlocked until its next power cycle. Also, it is often desirable to power cycle the modem when the system goes through a power cycle. For instance, a user may power cycle the system to recover a wedged modem. BUG=b:68365029 TEST=Tested the following on an Astronaunt device: 1. Verify that the modem is powered on after the system boots from cold. 2. Suspend the system to S0ix. Verify that the modem remains powered on when the system is in S0ix. After the system goes back to S0, verify that the SIM with PIN lock enabled doesn't request unlocking, and the modem can quickly reconnect to a network. 3. Configure the system to suspend to S3 instead of S0ix, and then repeat (2). 4. Perform a quick system power cycle, verify that the modem is powered cycle and the SIM with PIN lock enabled requests unlocking. Change-Id: Ie60776d5d9ebc6a69aa9e360bd882f455265dfa2 Signed-off-by: Ben Chan <benchan@chromium.org> Reviewed-on: https://review.coreboot.org/22415 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
6f1e8d24af
commit
eeb475c5c8
|
@ -35,7 +35,7 @@ void mainboard_smi_sleep(u8 slp_typ)
|
||||||
const struct pad_config *pads;
|
const struct pad_config *pads;
|
||||||
size_t num;
|
size_t num;
|
||||||
|
|
||||||
pads = variant_sleep_gpio_table(&num);
|
pads = variant_sleep_gpio_table(slp_typ, &num);
|
||||||
gpio_configure_pads(pads, num);
|
gpio_configure_pads(pads, num);
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC))
|
if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC))
|
||||||
|
|
|
@ -376,7 +376,7 @@ static const struct pad_config sleep_gpio_table[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct pad_config * __attribute__((weak))
|
const struct pad_config * __attribute__((weak))
|
||||||
variant_sleep_gpio_table(size_t *num)
|
variant_sleep_gpio_table(u8 slp_typ, size_t *num)
|
||||||
{
|
{
|
||||||
*num = ARRAY_SIZE(sleep_gpio_table);
|
*num = ARRAY_SIZE(sleep_gpio_table);
|
||||||
return sleep_gpio_table;
|
return sleep_gpio_table;
|
||||||
|
|
|
@ -28,7 +28,7 @@ uint8_t sku_strapping_value(void);
|
||||||
* entries for each table. */
|
* entries for each table. */
|
||||||
const struct pad_config *variant_gpio_table(size_t *num);
|
const struct pad_config *variant_gpio_table(size_t *num);
|
||||||
const struct pad_config *variant_early_gpio_table(size_t *num);
|
const struct pad_config *variant_early_gpio_table(size_t *num);
|
||||||
const struct pad_config *variant_sleep_gpio_table(size_t *num);
|
const struct pad_config *variant_sleep_gpio_table(u8 slp_typ, size_t *num);
|
||||||
|
|
||||||
/* Baseboard default swizzle. Can be reused if swizzle is same. */
|
/* Baseboard default swizzle. Can be reused if swizzle is same. */
|
||||||
extern const struct lpddr4_swizzle_cfg baseboard_lpddr4_swizzle;
|
extern const struct lpddr4_swizzle_cfg baseboard_lpddr4_swizzle;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <arch/acpi.h>
|
||||||
#include <baseboard/gpio.h>
|
#include <baseboard/gpio.h>
|
||||||
#include <baseboard/variants.h>
|
#include <baseboard/variants.h>
|
||||||
#include <commonlib/helpers.h>
|
#include <commonlib/helpers.h>
|
||||||
|
@ -368,16 +369,28 @@ const struct pad_config *variant_early_gpio_table(size_t *num)
|
||||||
return early_gpio_table;
|
return early_gpio_table;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GPIO settings before entering sleep. */
|
/* Default GPIO settings before entering sleep. */
|
||||||
static const struct pad_config sleep_gpio_table[] = {
|
static const struct pad_config default_sleep_gpio_table[] = {
|
||||||
PAD_CFG_GPO(GPIO_150, 0, DEEP), /* NFC_RESET_ODL */
|
PAD_CFG_GPO(GPIO_150, 0, DEEP), /* NFC_RESET_ODL */
|
||||||
PAD_CFG_GPI_APIC_LOW(GPIO_20, NONE, DEEP), /* NFC_INT_L */
|
PAD_CFG_GPI_APIC_LOW(GPIO_20, NONE, DEEP), /* NFC_INT_L */
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct pad_config *variant_sleep_gpio_table(size_t *num)
|
/* GPIO settings before entering S5, which are same as default_sleep_gpio_table
|
||||||
|
* but also turn off EN_PP3300_DX_LTE_SOC. */
|
||||||
|
static const struct pad_config s5_sleep_gpio_table[] = {
|
||||||
|
PAD_CFG_GPO(GPIO_150, 0, DEEP), /* NFC_RESET_ODL */
|
||||||
|
PAD_CFG_GPI_APIC_LOW(GPIO_20, NONE, DEEP), /* NFC_INT_L */
|
||||||
|
PAD_CFG_GPO(GPIO_78, 0, DEEP), /* I2S1_SDO -- EN_PP3300_DX_LTE_SOC */
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct pad_config *variant_sleep_gpio_table(u8 slp_typ, size_t *num)
|
||||||
{
|
{
|
||||||
*num = ARRAY_SIZE(sleep_gpio_table);
|
if (slp_typ == ACPI_S5) {
|
||||||
return sleep_gpio_table;
|
*num = ARRAY_SIZE(s5_sleep_gpio_table);
|
||||||
|
return s5_sleep_gpio_table;
|
||||||
|
}
|
||||||
|
*num = ARRAY_SIZE(default_sleep_gpio_table);
|
||||||
|
return default_sleep_gpio_table;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct cros_gpio cros_gpios[] = {
|
static const struct cros_gpio cros_gpios[] = {
|
||||||
|
|
Loading…
Reference in New Issue