diff options
author | Eric Lai <ericr_lai@compal.corp-partner.google.com> | 2021-08-18 15:47:20 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-08-20 15:17:16 +0000 |
commit | 312fb716d03977c9e194f67b8fba4d0fed677e41 (patch) | |
tree | a24b3a31dc26a498d9408d8ef7d75df77587c7c0 /src/mainboard/google/brya/variants/brya0 | |
parent | d37a419a7dc600badf523e50edc854c962d7f504 (diff) |
mb/google/brya: Add ALC1019_NAU88L25B support
Add ALC1019_NAU88L25B DB support.
BUG=b:195891240
TEST=audio is functional when playing youtube.
Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: I9209c4cab00fc03b2a6107b5c32804786cd2e242
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57016
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/google/brya/variants/brya0')
-rw-r--r-- | src/mainboard/google/brya/variants/brya0/fw_config.c | 16 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/brya0/overridetree.cb | 30 |
2 files changed, 43 insertions, 3 deletions
diff --git a/src/mainboard/google/brya/variants/brya0/fw_config.c b/src/mainboard/google/brya/variants/brya0/fw_config.c index 11cd684c2e..97b460f6a7 100644 --- a/src/mainboard/google/brya/variants/brya0/fw_config.c +++ b/src/mainboard/google/brya/variants/brya0/fw_config.c @@ -77,6 +77,13 @@ static const struct pad_config bt_i2s_disable_pads[] = { PAD_NC(GPP_VGPIO_37, NONE), }; +static void enable_i2s(void) +{ + 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(sndw_disable_pads, ARRAY_SIZE(sndw_disable_pads)); +} + static void fw_config_handle(void *unused) { if (!fw_config_is_provisioned() || fw_config_probe(FW_CONFIG(AUDIO, AUDIO_UNKNOWN))) { @@ -102,9 +109,12 @@ static void fw_config_handle(void *unused) if (fw_config_probe(FW_CONFIG(AUDIO, MAX98357_ALC5682I_I2S))) { printk(BIOS_INFO, "Configure audio over I2S with MAX98357 ALC5682I.\n"); - 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(sndw_disable_pads, ARRAY_SIZE(sndw_disable_pads)); + enable_i2s(); + } + + if (fw_config_probe(FW_CONFIG(AUDIO, ALC1019_NAU88L25B_I2S))) { + printk(BIOS_INFO, "Configure audio over I2S with ALC1019 NAU88L25B.\n"); + enable_i2s(); } } BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL); diff --git a/src/mainboard/google/brya/variants/brya0/overridetree.cb b/src/mainboard/google/brya/variants/brya0/overridetree.cb index 1f78b38267..f053eb6a70 100644 --- a/src/mainboard/google/brya/variants/brya0/overridetree.cb +++ b/src/mainboard/google/brya/variants/brya0/overridetree.cb @@ -200,6 +200,36 @@ chip soc/intel/alderlake probe AUDIO MAX98357_ALC5682I_I2S end end + chip drivers/i2c/nau8825 + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A23)" + register "jkdet_enable" = "1" + register "jkdet_pull_enable" = "0" + register "jkdet_polarity" = "1" # ActiveLow + register "vref_impedance" = "2" # 125kOhm + register "micbias_voltage" = "6" # 2.754 + register "sar_threshold_num" = "4" + register "sar_threshold[0]" = "0x0c" + register "sar_threshold[1]" = "0x1c" + register "sar_threshold[2]" = "0x38" + register "sar_threshold[3]" = "0x60" + register "sar_hysteresis" = "1" + register "sar_voltage" = "0" # VDDA + register "sar_compare_time" = "0" # 500ns + register "sar_sampling_time" = "0" # 2us + register "short_key_debounce" = "2" # 100ms + register "jack_insert_debounce" = "7" # 512ms + register "jack_eject_debounce" = "7" # 512ms + device i2c 1a on + probe AUDIO ALC1019_NAU88L25B_I2S + end + end + chip drivers/generic/alc1015 + register "hid" = ""RTL1019"" + register "sdb" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A11)" + device generic 1 on + probe AUDIO ALC1019_NAU88L25B_I2S + end + end chip drivers/intel/mipi_camera register "acpi_hid" = ""OVTI8856"" register "acpi_uid" = "0" |