diff options
author | Bernardo Perez Priego <bernardo.perez.priego@intel.com> | 2023-05-30 13:48:59 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-06-23 15:20:14 +0000 |
commit | 3dedfcbbd472fe569e06e8454db77fa8915a0a2f (patch) | |
tree | 24fb9745d7bf00873f17709c2d9641415a702a12 /src/mainboard/google/rex/variants | |
parent | 40cb3fe94dacfba0b146aae2be9c03c0a0ddb691 (diff) |
mb/google/rex: Configure ISH GPIO's based on FW_CONFIG
Configures ISH related GPIO's based on FW_CONFIG obtained from CBI.
BUG=b:280329972,b:283023296
TEST= Set bit 21 of FW_CONFIG with CBI
Boot rex board
Check that ISH is enabled, loaded, and functional
Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Change-Id: I3f0f9a7c8318fa9ae59b6f613eafdacbfa07c749
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75525
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/mainboard/google/rex/variants')
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/fw_config.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mainboard/google/rex/variants/rex0/fw_config.c b/src/mainboard/google/rex/variants/rex0/fw_config.c index 11014b5325..16ded29491 100644 --- a/src/mainboard/google/rex/variants/rex0/fw_config.c +++ b/src/mainboard/google/rex/variants/rex0/fw_config.c @@ -72,6 +72,23 @@ static const struct pad_config bt_i2s_disable_pads[] = { PAD_NC(GPP_VGPIO37, NONE), }; +static const struct pad_config ish_enable_pads[] = { + /* GPP_B02 : ISH I2C0_SDA */ + PAD_CFG_NF(GPP_B02, NONE, DEEP, NF3), + /* GPP_B03 : ISH_I2C0_SCL */ + PAD_CFG_NF(GPP_B03, NONE, DEEP, NF3), + /* GPP_D05 : ISH_UART_TX */ + PAD_CFG_NF(GPP_D05, NONE, DEEP, NF2), + /* GPP_D06 : ISH_UART_RX */ + PAD_CFG_NF(GPP_D06, NONE, DEEP, NF2), + /* GPP_B08 : ISH_GP3, SOC_ISH_ACCEL_INT_L */ + PAD_CFG_NF(GPP_B08, NONE, DEEP, NF4), + /* GPP_E15 : ISH_GP5A, SOC_ISH_IMU_INT_L */ + PAD_CFG_NF(GPP_E15, NONE, DEEP, NF8), + /* GPP_F22 : ISH_GP8A, SOC_ISH_ALS_INT_L */ + PAD_CFG_NF(GPP_F22, NONE, DEEP, NF8), +}; + void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { if (!fw_config_is_provisioned()) { @@ -98,4 +115,9 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table) printk(BIOS_INFO, "Configure GPIOs for BT offload mode.\n"); GPIO_PADBASED_OVERRIDE(padbased_table, bt_i2s_enable_pads); } + + if (fw_config_probe(FW_CONFIG(ISH, ISH_ENABLE))) { + printk(BIOS_INFO, "Configure GPIOs for ISH.\n"); + GPIO_PADBASED_OVERRIDE(padbased_table, ish_enable_pads); + } } |