soc/intel/{glk,apl} and mainboards: Configure LPC_CLKRUN# pin as GPIO for S0ix
This pin does not have a native function for eSPI. Nonetheless if we use eSPI, it should be configured as a GPIO and kept unconnected to allow S0ix entry. Also removed initialization of LPC pins in mainboard code as they are already initialized in chipset code. The settings fpr LPC pins in chipset code were updated to those that were previously in mainboard code and have been validated on LPC flavor of Geminilake RVP. BUG=b:79251613 BRANCH=none TEST=From kernel prompt in bip, type powerd_dbus_suspend. Check on EC console that SOC enters S0ix. Change-Id: Ie0c1013fee638a3b7a91469736efc0c25a1597fa Signed-off-by: Hannah Williams <hannah.williams@intel.com> Signed-off-by: Shamile Khan <shamile.khan@intel.com> Reviewed-on: https://review.coreboot.org/23742 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
7ee05eddf1
commit
cf45830982
|
@ -24,6 +24,7 @@ void bootblock_mainboard_init(void)
|
||||||
const struct pad_config *pads;
|
const struct pad_config *pads;
|
||||||
size_t num;
|
size_t num;
|
||||||
|
|
||||||
|
lpc_configure_pads();
|
||||||
pads = variant_early_gpio_table(&num);
|
pads = variant_early_gpio_table(&num);
|
||||||
gpio_configure_pads(pads, num);
|
gpio_configure_pads(pads, num);
|
||||||
mainboard_ec_init();
|
mainboard_ec_init();
|
||||||
|
|
|
@ -206,7 +206,12 @@ static const struct pad_config gpio_table[] = {
|
||||||
PAD_CFG_GPI_SCI_LOW(GPIO_144, NONE, DEEP, LEVEL),/* GPIO_144 -- PEN_EJECT_ODL(wake) */
|
PAD_CFG_GPI_SCI_LOW(GPIO_144, NONE, DEEP, LEVEL),/* GPIO_144 -- PEN_EJECT_ODL(wake) */
|
||||||
PAD_CFG_GPI_GPIO_DRIVER(GPIO_145, NONE, DEEP),/* GPIO_145 -- PEN_EJECT_ODL(notifications) */
|
PAD_CFG_GPI_GPIO_DRIVER(GPIO_145, NONE, DEEP),/* GPIO_145 -- PEN_EJECT_ODL(notifications) */
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_146, NONE, DEEP, NF5, HIZCRx0, DISPUPD),/* GPIO_146 -- NC */
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_146, NONE, DEEP, NF5, HIZCRx0, DISPUPD),/* GPIO_146 -- NC */
|
||||||
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_154, 1, DEEP, UP_20K, HIZCRx1, DISPUPD),/* LPC_CLKRUNB */
|
|
||||||
|
/*
|
||||||
|
* GPIO_154 - LPC_CLKRUN# has a native function for LPC but not for
|
||||||
|
* eSPI. Nonetheless if we use eSPI, it should be configured as a GPIO
|
||||||
|
* and kept unconnected to allow S0ix entry.
|
||||||
|
*/
|
||||||
|
|
||||||
/* AUDIO COMMUNITY GPIOS*/
|
/* AUDIO COMMUNITY GPIOS*/
|
||||||
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_156, 0, DEEP, NONE, HIZCRx0, DISPUPD), /* AVS_I2S0_MCLK */
|
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_156, 0, DEEP, NONE, HIZCRx0, DISPUPD), /* AVS_I2S0_MCLK */
|
||||||
|
|
|
@ -206,7 +206,12 @@ static const struct pad_config gpio_table[] = {
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_144, NONE, DEEP, NF5, HIZCRx0, DISPUPD),/* PANEL1_VDDN */
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_144, NONE, DEEP, NF5, HIZCRx0, DISPUPD),/* PANEL1_VDDN */
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_145, NONE, DEEP, NF5, HIZCRx0, DISPUPD),/* PANEL1_BKLTEN */
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_145, NONE, DEEP, NF5, HIZCRx0, DISPUPD),/* PANEL1_BKLTEN */
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_146, NONE, DEEP, NF5, HIZCRx0, DISPUPD),/* PANEL1_BKLTCTL */
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_146, NONE, DEEP, NF5, HIZCRx0, DISPUPD),/* PANEL1_BKLTCTL */
|
||||||
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_154, 1, DEEP, UP_20K, HIZCRx1, DISPUPD),/* LPC_CLKRUNB */
|
|
||||||
|
/*
|
||||||
|
* GPIO_154 - LPC_CLKRUN# has a native function for LPC but not for
|
||||||
|
* eSPI. Nonetheless if we use eSPI, it should be configured as a GPIO
|
||||||
|
* and kept unconnected to allow S0ix entry.
|
||||||
|
*/
|
||||||
|
|
||||||
/* AUDIO COMMUNITY GPIOS*/
|
/* AUDIO COMMUNITY GPIOS*/
|
||||||
PAD_CFG_GPIO_HI_Z(GPIO_156, NONE, DEEP, HIZCRx0, DISPUPD),/* AVS_I2S0_MCLK -- unused */
|
PAD_CFG_GPIO_HI_Z(GPIO_156, NONE, DEEP, HIZCRx0, DISPUPD),/* AVS_I2S0_MCLK -- unused */
|
||||||
|
|
|
@ -179,17 +179,6 @@ static const struct pad_config gpio_table[] = {
|
||||||
PAD_CFG_NF_IOSSTATE(GPIO_144, UP_20K, DEEP, NF5, HIZCRx1),/*PANEL1_VDDEN*/
|
PAD_CFG_NF_IOSSTATE(GPIO_144, UP_20K, DEEP, NF5, HIZCRx1),/*PANEL1_VDDEN*/
|
||||||
PAD_CFG_NF_IOSSTATE(GPIO_145, UP_20K, DEEP, NF5, HIZCRx1),/*PANEL1_BKLTEN*/
|
PAD_CFG_NF_IOSSTATE(GPIO_145, UP_20K, DEEP, NF5, HIZCRx1),/*PANEL1_BKLTEN*/
|
||||||
PAD_CFG_NF_IOSSTATE(GPIO_146, UP_20K, DEEP, NF5, HIZCRx1),/*PANEL1_BKLTCTL*/
|
PAD_CFG_NF_IOSSTATE(GPIO_146, UP_20K, DEEP, NF5, HIZCRx1),/*PANEL1_BKLTCTL*/
|
||||||
#if !IS_ENABLED(CONFIG_SOC_ESPI)
|
|
||||||
PAD_CFG_NF(GPIO_147, UP_20K, DEEP, NF1),/*LPC_ILB_SERIRQ*/
|
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_148, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/*LPC_CLKOUT0*/
|
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_149, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/*LPC_CLKOUT1*/
|
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_150, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD),/*LPC_AD0*/
|
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_151, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD),/*LPC_AD1*/
|
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_152, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD),/*LPC_AD2*/
|
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_153, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD),/*LPC_AD3*/
|
|
||||||
PAD_CFG_NF(GPIO_154, UP_20K, DEEP, NF1),/*LPC_CLKRUNB*/
|
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_155, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD),/*LPC_FRAMEB*/
|
|
||||||
#endif /* !IS_ENABLED(CONFIG_SOC_ESPI) */
|
|
||||||
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_157, 1, DEEP, UP_20K, IGNORE, SAME),/*WWAN_Reset/dGPS Reset*/
|
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_157, 1, DEEP, UP_20K, IGNORE, SAME),/*WWAN_Reset/dGPS Reset*/
|
||||||
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_158, 0, DEEP, DN_20K, IGNORE, SAME),/*NFC_DFU*/
|
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_158, 0, DEEP, DN_20K, IGNORE, SAME),/*NFC_DFU*/
|
||||||
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_159, 1, DEEP, UP_20K, TxDRxE, ENPD),/*NFC reset*/
|
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_159, 1, DEEP, UP_20K, TxDRxE, ENPD),/*NFC reset*/
|
||||||
|
|
|
@ -47,9 +47,9 @@ static const struct pad_config lpc_gpios[] = {
|
||||||
#if IS_ENABLED(CONFIG_SOC_INTEL_GLK)
|
#if IS_ENABLED(CONFIG_SOC_INTEL_GLK)
|
||||||
#if !IS_ENABLED(CONFIG_SOC_ESPI)
|
#if !IS_ENABLED(CONFIG_SOC_ESPI)
|
||||||
PAD_CFG_NF(GPIO_147, UP_20K, DEEP, NF1), /* LPC_ILB_SERIRQ */
|
PAD_CFG_NF(GPIO_147, UP_20K, DEEP, NF1), /* LPC_ILB_SERIRQ */
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_148, UP_20K, DEEP, NF1, HIZCRx1,
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_148, NONE, DEEP, NF1, HIZCRx1,
|
||||||
DISPUPD), /* LPC_CLKOUT0 */
|
DISPUPD), /* LPC_CLKOUT0 */
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_149, UP_20K, DEEP, NF1, HIZCRx1,
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_149, NONE, DEEP, NF1, HIZCRx1,
|
||||||
DISPUPD), /* LPC_CLKOUT1 */
|
DISPUPD), /* LPC_CLKOUT1 */
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_150, UP_20K, DEEP, NF1, HIZCRx1,
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_150, UP_20K, DEEP, NF1, HIZCRx1,
|
||||||
DISPUPD), /* LPC_AD0 */
|
DISPUPD), /* LPC_AD0 */
|
||||||
|
@ -59,10 +59,17 @@ static const struct pad_config lpc_gpios[] = {
|
||||||
DISPUPD), /* LPC_AD2 */
|
DISPUPD), /* LPC_AD2 */
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_153, UP_20K, DEEP, NF1, HIZCRx1,
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_153, UP_20K, DEEP, NF1, HIZCRx1,
|
||||||
DISPUPD), /* LPC_AD3 */
|
DISPUPD), /* LPC_AD3 */
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_154, UP_20K, DEEP, NF1, HIZCRx1,
|
PAD_CFG_NF(GPIO_154, UP_20K, DEEP, NF1), /* LPC_CLKRUNB */
|
||||||
DISPUPD), /* LPC_CLKRUNB */
|
|
||||||
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_155, UP_20K, DEEP, NF1, HIZCRx1,
|
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_155, UP_20K, DEEP, NF1, HIZCRx1,
|
||||||
DISPUPD), /* LPC_FRAMEB */
|
DISPUPD), /* LPC_FRAMEB */
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* LPC_CLKRUNB should be in GPIO mode for eSPI. Other pin settings
|
||||||
|
* i.e. Rx path enable/disable, Tx path enable/disable, pull up
|
||||||
|
* enable/disable etc are ignored. Leaving this pin in Native mode
|
||||||
|
* will keep LPC Controller awake and prevent S0ix entry
|
||||||
|
*/
|
||||||
|
PAD_NC(GPIO_154, NONE),
|
||||||
#endif /* !IS_ENABLED(CONFIG_SOC_ESPI) */
|
#endif /* !IS_ENABLED(CONFIG_SOC_ESPI) */
|
||||||
#else
|
#else
|
||||||
PAD_CFG_NF(LPC_ILB_SERIRQ, UP_20K, DEEP, NF1),
|
PAD_CFG_NF(LPC_ILB_SERIRQ, UP_20K, DEEP, NF1),
|
||||||
|
|
Loading…
Reference in New Issue