mb/google/fatcat/var/francka: Enable audio codec ALC722/ALC1320

Enable Realtek ALC722 and ALC1320 soundwire codec for francka.
Refer to the main board schematic(1224A) and
audio board schematic(1106A).

BUG=b:420516709
TEST=Build and boot and check the ssdt dump PCI0.HDAS.SNDW.
Scope (\_SB.PCI0.HDAS.SNDW)
    Device (SW00)
        Name (_ADR, 0x000030025D072201)  // _ADR: Address
        Name (_DDN, "Headset Codec")  // _DDN: DOS Device Name
Scope (\_SB.PCI0.HDAS.SNDW)
    Device (SW20)
        Name (_ADR, 0x000230025D132001)  // _ADR: Address
        Name (_DDN, "Speaker Amp")  // _DDN: DOS Device Name
Scope (\_SB.PCI0.HDAS.SNDW)
    Device (SW30)
        Name (_ADR, 0x000330025D132001)  // _ADR: Address
        Name (_DDN, "Speaker Amp")  // _DDN: DOS Device Name

Change-Id: I542d94fd792272d3b7d75538671ba2f59c331a1e
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88022
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mac Chiang <mac.chiang@intel.com>
This commit is contained in:
Ian Feng 2025-06-10 13:09:45 +08:00 committed by Matt DeVillier
commit 167c771bc5
3 changed files with 53 additions and 0 deletions

View file

@ -107,6 +107,7 @@ config BOARD_GOOGLE_FELINO4ES
config BOARD_GOOGLE_FRANCKA
select BOARD_GOOGLE_BASEBOARD_FATCAT
select DRIVERS_SOUNDWIRE_ALC1320
select HAVE_SLP_S0_GATE
config BOARD_GOOGLE_KINMEN

View file

@ -37,6 +37,25 @@ static const struct pad_config sndw_alc721_enable_pads[] = {
PAD_CFG_NF(GPP_S07, NONE, DEEP, NF5),
};
static const struct pad_config sndw_alc722_alc1320_enable_pads[] = {
/* GPP_S00: SNDW_3_SCL */
PAD_CFG_NF(GPP_S00, NONE, DEEP, NF1),
/* GPP_S01: SNDW_3_SDA */
PAD_CFG_NF(GPP_S01, NONE, DEEP, NF1),
/* GPP_S02: SNDW0_CLK */
PAD_CFG_NF(GPP_S02, NONE, DEEP, NF3),
/* GPP_S03: SNDW0_DATA0 */
PAD_CFG_NF(GPP_S03, NONE, DEEP, NF3),
/* GPP_S04: SNDW_2_SCL */
PAD_CFG_NF(GPP_S04, NONE, DEEP, NF2),
/* GPP_S05: SNDW_2_SDA */
PAD_CFG_NF(GPP_S05, NONE, DEEP, NF2),
/* GPP_S06: SOC_DMIC_CLK1 */
PAD_CFG_NF(GPP_S06, NONE, DEEP, NF5),
/* GPP_S07: SOC_DMIC_DATA1 */
PAD_CFG_NF(GPP_S07, NONE, DEEP, NF5),
};
static const struct pad_config enable_dmic_0_pads[] = {
/* GPP_S02: SOC_DMIC_CLK0 */
PAD_CFG_NF(GPP_S02, NONE, DEEP, NF5),
@ -131,6 +150,9 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
} else if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC721_SNDW))) {
printk(BIOS_INFO, "Configure GPIOs for Soundwire ALC721 mode.\n");
GPIO_PADBASED_OVERRIDE(padbased_table, sndw_alc721_enable_pads);
} else if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC722_ALC1320_SNDW))) {
printk(BIOS_INFO, "Configure GPIOs for Soundwire ALC722 & ALC1320 mode.\n");
GPIO_PADBASED_OVERRIDE(padbased_table, sndw_alc722_alc1320_enable_pads);
}
if (fw_config_probe(FW_CONFIG(WWAN, WWAN_PRESENT))) {

View file

@ -296,6 +296,36 @@ chip soc/intel/pantherlake
probe AUDIO AUDIO_ALC721_SNDW
end
end
chip drivers/soundwire/alc711
register "desc" = ""Headset Codec""
register "alc711_address.version" = "SOUNDWIRE_VERSION_1_2"
register "alc711_address.class" = "MIPI_CLASS_SDCA"
register "alc711_address.part_id" = "MIPI_DEV_ID_REALTEK_ALC722"
# SoundWire Link 0 ID 0
device generic 0.0 on
probe AUDIO AUDIO_ALC722_ALC1320_SNDW
end
end
chip drivers/soundwire/alc1320
register "desc" = ""Speaker Amp""
register "alc1320_address.version" = "SOUNDWIRE_VERSION_1_2"
register "alc1320_address.class" = "MIPI_CLASS_SDCA"
register "alc1320_address.part_id" = "MIPI_DEV_ID_REALTEK_ALC1320"
# SoundWire Link 2 ID 0
device generic 2.0 on
probe AUDIO AUDIO_ALC722_ALC1320_SNDW
end
end
chip drivers/soundwire/alc1320
register "desc" = ""Speaker Amp""
register "alc1320_address.version" = "SOUNDWIRE_VERSION_1_2"
register "alc1320_address.class" = "MIPI_CLASS_SDCA"
register "alc1320_address.part_id" = "MIPI_DEV_ID_REALTEK_ALC1320"
# SoundWire Link 3 ID 0
device generic 3.0 on
probe AUDIO AUDIO_ALC722_ALC1320_SNDW
end
end
end
end
end