From 55f0592ec27c993b3072a0bc67cf35d68dd1ec3f Mon Sep 17 00:00:00 2001 From: Tyler Wang Date: Thu, 7 Nov 2024 19:51:45 +0800 Subject: mb/google/rex/var/kanix: Add audio codec/amp support Add support for Realtek audio codec ALC5682I-VS and Realtek audio amp ALC1019. BUG=b:366291025 TEST=emerge-rex coreboot pass Change-Id: I0cac934004b0b1b72feaacea99a602fffd2f1457 Signed-off-by: Tyler Wang Reviewed-on: https://review.coreboot.org/c/coreboot/+/85100 Reviewed-by: Kapil Porwal Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) --- src/mainboard/google/rex/Kconfig | 1 + src/mainboard/google/rex/variants/kanix/gpio.c | 4 ++-- .../google/rex/variants/kanix/overridetree.cb | 20 +++++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/rex/Kconfig b/src/mainboard/google/rex/Kconfig index b7a66d43bb..e98471a394 100644 --- a/src/mainboard/google/rex/Kconfig +++ b/src/mainboard/google/rex/Kconfig @@ -70,6 +70,7 @@ config BOARD_GOOGLE_MODEL_DEKU config BOARD_GOOGLE_MODEL_KANIX def_bool n select BOARD_GOOGLE_BASEBOARD_REX + select DRIVERS_GENERIC_ALC1015 select SOC_INTEL_CSE_LITE_SKU select SOC_INTEL_CSE_PRE_CPU_RESET_TELEMETRY_V2 select SOC_INTEL_CSE_SEND_EOP_ASYNC diff --git a/src/mainboard/google/rex/variants/kanix/gpio.c b/src/mainboard/google/rex/variants/kanix/gpio.c index 0bc8f3d7f9..b512c196da 100644 --- a/src/mainboard/google/rex/variants/kanix/gpio.c +++ b/src/mainboard/google/rex/variants/kanix/gpio.c @@ -146,8 +146,8 @@ static const struct pad_config gpio_table[] = { PAD_NC(GPP_D00, NONE), /* GPP_D01 : Not Connected */ PAD_NC(GPP_D01, NONE), - /* GPP_D04 : Not Connected. */ - PAD_NC(GPP_D04, NONE), + /* GPP_D04 : [] ==> EN_SPKR */ + PAD_CFG_GPO(GPP_D04, 1, DEEP), /* GPP_D05 : net NC. Test pad. */ PAD_NC(GPP_D05, NONE), /* GPP_D06 : net NC. Test pad.*/ diff --git a/src/mainboard/google/rex/variants/kanix/overridetree.cb b/src/mainboard/google/rex/variants/kanix/overridetree.cb index 4e81a40f91..6c8a1580ba 100644 --- a/src/mainboard/google/rex/variants/kanix/overridetree.cb +++ b/src/mainboard/google/rex/variants/kanix/overridetree.cb @@ -324,7 +324,25 @@ chip soc/intel/meteorlake device generic 0 on end end end - device ref i2c0 on end #I2C0 + device ref i2c0 on + chip drivers/i2c/generic + register "hid" = ""RTL5682"" + register "name" = ""RT58"" + register "desc" = ""Headset Codec"" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_B06)" + # Set the jd_src to RT5668_JD1 for jack detection + register "property_count" = "1" + register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" + register "property_list[0].name" = ""realtek,jd-src"" + register "property_list[0].integer" = "1" + device i2c 1a on end + end + chip drivers/generic/alc1015 + register "hid" = ""RTL1019"" + register "sdb" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D04)" + device generic 0 on end + end + end #I2C0 device ref i2c1 on chip drivers/i2c/hid register "generic.hid" = ""ELAN9004"" -- cgit v1.2.3