From 9e757b33967fe3626333613daab039f58103e53d Mon Sep 17 00:00:00 2001 From: Weimin Wu Date: Thu, 12 Dec 2024 21:09:18 +0800 Subject: [PATCH] mb/google/fatcat/var/felino: Add ALC712 codec to devicetree Update device tree to support Realtek ALC712 codec. reference datasheet: Realtek ALC712-VB-CG Rev. 0.24 BUG=b:378629979 TEST=emerge-fatcat coreboot check the ssdt dump PCI0.HDAS.SNDW has address: 0x000330025d071201 Change-Id: Ic5c38462cd1ab39d4aebc324d5151cb4337051df Signed-off-by: Weimin Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/85572 Reviewed-by: Jayvik Desai Reviewed-by: Pranava Y N Reviewed-by: Mac Chiang Tested-by: build bot (Jenkins) --- .../fatcat/variants/felino/overridetree.cb | 45 +++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/src/mainboard/google/fatcat/variants/felino/overridetree.cb b/src/mainboard/google/fatcat/variants/felino/overridetree.cb index b3b63e7b5c..29a178dc7f 100644 --- a/src/mainboard/google/fatcat/variants/felino/overridetree.cb +++ b/src/mainboard/google/fatcat/variants/felino/overridetree.cb @@ -253,10 +253,49 @@ device ref tbt_pcie_rp0 on end chip drivers/intel/soundwire device generic 0 on chip drivers/soundwire/alc711 - # SoundWire Link 3 ID 1 + register "multilane.lane_mapping" = "{ + { + .lane = 1, + .direction = MASTER_LANE, + .connection.master_lane = 1 + }, + { + .lane = 2, + .direction = MASTER_LANE, + .connection.master_lane = 2 + }, + }" + register "audio_mode" = "{ + { + .bus_frequency_configs_count = 9, + .bus_frequency_configs = { + 9600 * KHz, + 4800 * KHz, + 2400 * KHz, + 12000 * KHz, + 6000 * KHz, + 3000 * KHz, + 12288 * KHz, + 6144 * KHz, + 3072 * KHz, + }, + /* Support 16 KHz to 192 KHz sampling frequency */ + .sampling_frequency_configs_count = 6, + .sampling_frequency_configs = { + 16 * KHz, + 32 * KHz, + 44.1 * KHz, + 48 * KHz, + 96 * KHz, + 192 * KHz + }, + }, + }" register "desc" = ""Headset Codec"" - device generic 3.1 on - end + register "alc711_address.version" = "SOUNDWIRE_VERSION_1_2" + register "alc711_address.class" = "MIPI_CLASS_SDCA" + register "alc711_address.part_id" = "MIPI_DEV_ID_REALTEK_ALC712" + device generic 3.0 on end # SoundWire Link 3 ID 0 end end end