mb/google/brya/var/taeko: Add fw_config probe for ALC5682-VS
ALC5682-VD/ALC5682-VS load different kernel driver by different _HID. Update the _HID depending on the AUDIO field of fw_config.Define fw config bit 5-7 in coreboot for codec. BUG=b:202913837 TEST=FW_NAME=taeko emerge-brya coreboot Change-Id: I635b173e0fe4c46d28f2c29fecee1998b29499b1 Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58292 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
parent
a61e781e4b
commit
e874375394
|
@ -52,5 +52,11 @@ static void fw_config_handle(void *unused)
|
||||||
gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
|
gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
|
||||||
gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(i2s_enable_pads));
|
gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(i2s_enable_pads));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_MAX98357_ALC5682I_VS_I2S))) {
|
||||||
|
printk(BIOS_INFO, "Configure audio over I2S with MAX98357 ALC5682I-VS.\n");
|
||||||
|
gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
|
||||||
|
gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(i2s_enable_pads));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
|
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
|
||||||
|
|
|
@ -16,6 +16,7 @@ fw_config
|
||||||
field AUDIO 5 7
|
field AUDIO 5 7
|
||||||
option AUDIO_UNKNOWN 0
|
option AUDIO_UNKNOWN 0
|
||||||
option AUDIO_MAX98357_ALC5682I_I2S 1
|
option AUDIO_MAX98357_ALC5682I_I2S 1
|
||||||
|
option AUDIO_MAX98357_ALC5682I_VS_I2S 2
|
||||||
end
|
end
|
||||||
field KB_LAYOUT 8 9
|
field KB_LAYOUT 8 9
|
||||||
option KB_LAYOUT_DEFAULT 0
|
option KB_LAYOUT_DEFAULT 0
|
||||||
|
@ -104,6 +105,20 @@ chip soc/intel/alderlake
|
||||||
probe AUDIO AUDIO_MAX98357_ALC5682I_I2S
|
probe AUDIO AUDIO_MAX98357_ALC5682I_I2S
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
chip drivers/i2c/generic
|
||||||
|
register "hid" = ""RTL5682""
|
||||||
|
register "name" = ""RT58""
|
||||||
|
register "desc" = ""Headset Codec""
|
||||||
|
register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_A23)"
|
||||||
|
# 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
|
||||||
|
probe AUDIO AUDIO_MAX98357_ALC5682I_VS_I2S
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
device ref i2c1 on
|
device ref i2c1 on
|
||||||
chip drivers/i2c/hid
|
chip drivers/i2c/hid
|
||||||
|
|
Loading…
Reference in New Issue