diff options
Diffstat (limited to 'src/mainboard/google/rex')
-rw-r--r-- | src/mainboard/google/rex/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/fw_config.c | 23 | ||||
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/overridetree.cb | 15 |
3 files changed, 38 insertions, 1 deletions
diff --git a/src/mainboard/google/rex/Kconfig b/src/mainboard/google/rex/Kconfig index 52f241349a..6af9b699bb 100644 --- a/src/mainboard/google/rex/Kconfig +++ b/src/mainboard/google/rex/Kconfig @@ -53,6 +53,7 @@ config BOARD_GOOGLE_MODEL_REX select DRIVERS_GENESYSLOGIC_GL9755 select DRIVERS_INTEL_ISH select DRIVERS_INTEL_SOUNDWIRE + select DRIVERS_NXP_UWB_SR1XX select DRIVERS_SOUNDWIRE_CS42L42 select DRIVERS_SOUNDWIRE_MAX98363 diff --git a/src/mainboard/google/rex/variants/rex0/fw_config.c b/src/mainboard/google/rex/variants/rex0/fw_config.c index ce5fe8d03c..86cb78102e 100644 --- a/src/mainboard/google/rex/variants/rex0/fw_config.c +++ b/src/mainboard/google/rex/variants/rex0/fw_config.c @@ -116,6 +116,20 @@ static const struct pad_config touchscreen_spi_int_pads[] = { PAD_CFG_GPI_APIC(GPP_C07, NONE, PLTRST, EDGE_SINGLE, INVERT), }; +static const struct pad_config uwb_gspi1_enable_pads[] = { + PAD_CFG_GPO_LOCK(GPP_D07, 0, LOCK_CONFIG), /* FPMCU_UWB_MUX_SEL */ + PAD_CFG_GPO(GPP_E06, 0, DEEP), /* UWB_SOC_SYNC */ + PAD_CFG_GPO(GPP_F19, 0, DEEP), /* EN_PP1800_UWB */ + PAD_CFG_GPI_INT(GPP_F20, NONE, PLTRST, LEVEL), /* UWB_SOC_INT */ +}; + +static const struct pad_config uwb_gspi1_disable_pads[] = { + PAD_CFG_GPO_LOCK(GPP_D07, 1, LOCK_CONFIG), /* FPMCU_UWB_MUX_SEL */ + PAD_NC(GPP_E06, NONE), + PAD_NC(GPP_F19, NONE), + PAD_NC(GPP_F20, NONE), +}; + void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { if (!fw_config_is_provisioned()) { @@ -161,4 +175,13 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table) printk(BIOS_INFO, "Configure Touchscreen Interrupt for SPI.\n"); GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_spi_int_pads); } + + if (fw_config_probe(FW_CONFIG(UWB, UWB_GSPI1)) && + fw_config_probe(FW_CONFIG(FP, FP_ABSENT))) { + printk(BIOS_INFO, "Configure GPIOs for UWB over GSPI1.\n"); + GPIO_PADBASED_OVERRIDE(padbased_table, uwb_gspi1_enable_pads); + } else { + printk(BIOS_INFO, "Disabling UWB (absent or misconfigured)\n"); + GPIO_PADBASED_OVERRIDE(padbased_table, uwb_gspi1_disable_pads); + } } diff --git a/src/mainboard/google/rex/variants/rex0/overridetree.cb b/src/mainboard/google/rex/variants/rex0/overridetree.cb index c08ff2b493..c3c4372668 100644 --- a/src/mainboard/google/rex/variants/rex0/overridetree.cb +++ b/src/mainboard/google/rex/variants/rex0/overridetree.cb @@ -776,8 +776,21 @@ chip soc/intel/meteorlake register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C23)" register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_B11)" register "enable_delay_ms" = "3" - device spi 0 on end + device spi 0 on + probe FP FP_PRESENT + end end # FPMCU + chip drivers/nxp/uwb + register "name" = ""UWB0"" + register "desc" = ""NXP UWB Module"" + register "speed" = "1000000" # 1 MHZ + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_HIGH(GPP_F20)" + register "ce_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F19)" + register "ri_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E06)" + device spi 0 on + probe UWB UWB_GSPI1 + end + end # UWB end device ref soc_espi on chip ec/google/chromeec |