From 48fbd992232a686356b2a9715f5e6115901146be Mon Sep 17 00:00:00 2001 From: Ian Feng Date: Fri, 23 May 2025 11:01:02 +0800 Subject: [PATCH] mb/google/fatcat/var/francka: Set the default HDA GPIO pin to an NC pin This modification sets the HDA GPIO pin to NC by default. Different audio configurations can be enabled via fw_config. BUG=b:417133565 TEST=emerge-fatcat coreboot, HDA sound cards can be detected. Change-Id: I0090a68d86de1067697d7efbb64c4638476c64ca Signed-off-by: Ian Feng Reviewed-on: https://review.coreboot.org/c/coreboot/+/87810 Reviewed-by: Pranava Y N Reviewed-by: Subrata Banik Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) --- .../fatcat/variants/francka/fw_config.c | 31 ++++--------------- .../google/fatcat/variants/francka/gpio.c | 8 ++--- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/src/mainboard/google/fatcat/variants/francka/fw_config.c b/src/mainboard/google/fatcat/variants/francka/fw_config.c index f9049742e1..17901220b5 100644 --- a/src/mainboard/google/fatcat/variants/francka/fw_config.c +++ b/src/mainboard/google/fatcat/variants/francka/fw_config.c @@ -12,37 +12,20 @@ #define GPIO_CONFIGURE_PADS(t) gpio_configure_pads(t, ARRAY_SIZE(t)) static const struct pad_config hda_enable_pads[] = { - /* HDA_BIT_CLK */ + /* GPP_D10: HDA_BIT_CLK */ PAD_CFG_NF(GPP_D10, NONE, DEEP, NF1), - /* HDA_SYNC */ + /* GPP_D11: HDA_SYNC */ PAD_CFG_NF(GPP_D11, NATIVE, DEEP, NF1), - /* HDA_SDOUT */ + /* GPP_D12: HDA_SDOUT */ PAD_CFG_NF(GPP_D12, NATIVE, DEEP, NF1), - /* HDA_SDIN0 */ + /* GPP_D13: HDA_SDIN0 */ PAD_CFG_NF(GPP_D13, NATIVE, DEEP, NF1), - /* SOC_DMIC_CLK1 */ + /* GPP_S06: SOC_DMIC_CLK1 */ PAD_CFG_NF(GPP_S06, NONE, DEEP, NF5), - /* SOC_DMIC_DATA1 */ + /* GPP_S07: SOC_DMIC_DATA1 */ PAD_CFG_NF(GPP_S07, NONE, DEEP, NF5), }; -static const struct pad_config audio_disable_pads[] = { - PAD_NC(GPP_D09, NONE), - PAD_NC(GPP_D10, NONE), - PAD_NC(GPP_D11, NONE), - PAD_NC(GPP_D12, NONE), - PAD_NC(GPP_D13, NONE), - PAD_NC(GPP_D16, NONE), - PAD_NC(GPP_S00, NONE), - PAD_NC(GPP_S01, NONE), - PAD_NC(GPP_S02, NONE), - PAD_NC(GPP_S03, NONE), - PAD_NC(GPP_S04, NONE), - PAD_NC(GPP_S05, NONE), - PAD_NC(GPP_S06, NONE), - PAD_NC(GPP_S07, NONE), -}; - /* * WWAN: power sequence requires three stages: * step 1: 3.3V power, FCP# (Full Card Power), RST#, and PERST# off @@ -125,8 +108,6 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table) if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256M_CG_HDA))) { GPIO_PADBASED_OVERRIDE(padbased_table, hda_enable_pads); - } else { - GPIO_PADBASED_OVERRIDE(padbased_table, audio_disable_pads); } if (fw_config_probe(FW_CONFIG(WWAN, WWAN_PRESENT))) { diff --git a/src/mainboard/google/fatcat/variants/francka/gpio.c b/src/mainboard/google/fatcat/variants/francka/gpio.c index baf272e3e3..7163e3927f 100644 --- a/src/mainboard/google/fatcat/variants/francka/gpio.c +++ b/src/mainboard/google/fatcat/variants/francka/gpio.c @@ -172,13 +172,13 @@ static const struct pad_config gpio_table[] = { /* GPP_D09: PCH_DGPU_HOLD_RST#_R */ PAD_NC(GPP_D09, NONE), /* GPP_D10: HDA_BIT_CLK */ - PAD_CFG_NF(GPP_D10, NONE, DEEP, NF1), + PAD_NC(GPP_D10, NONE), /* GPP_D11: HDA_SYNC */ - PAD_CFG_NF(GPP_D11, NONE, DEEP, NF1), + PAD_NC(GPP_D11, NONE), /* GPP_D12: HDA_SDOUT */ - PAD_CFG_NF(GPP_D12, NONE, DEEP, NF1), + PAD_NC(GPP_D12, NONE), /* GPP_D13: HDA_SDIN0 */ - PAD_CFG_NF(GPP_D13, NONE, DEEP, NF1), + PAD_NC(GPP_D13, NONE), /* GPP_D14: SOC_HDMI_STRAP */ PAD_CFG_GPI(GPP_D14, NONE, DEEP), /* GPP_D15: Not used */