diff options
author | Ian Feng <ian_feng@compal.corp-partner.google.com> | 2022-04-22 16:29:05 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-06-07 12:42:32 +0000 |
commit | 2c89d08a587691b5afc852efbbbf767f252aba58 (patch) | |
tree | ea2b6355ca4b952a7dde254cd5a9dde9ae671c4a /src/mainboard/google | |
parent | f658b3588904737b1641bd1664dd17e9a6805237 (diff) |
mb/google/skyrim/var/skyrim: Add audio codec and amp support
Add two combination:
1. ALC5682I-VS and ALC1019
2. NAU88L25 and MAX98360
BUG=b:227165780, b:228879074
TEST=emerge-skyrim coreboot chromeos-bootimage
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: I36d7b5c4e88825ceaa6922d9e3bed366f55a0d81
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63779
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-hsuan Hsu <yuhsuan@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/skyrim/Kconfig | 3 | ||||
-rw-r--r-- | src/mainboard/google/skyrim/variants/baseboard/gpio.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/skyrim/variants/skyrim/overridetree.cb | 63 |
3 files changed, 67 insertions, 1 deletions
diff --git a/src/mainboard/google/skyrim/Kconfig b/src/mainboard/google/skyrim/Kconfig index 106b683b71..5da562ac04 100644 --- a/src/mainboard/google/skyrim/Kconfig +++ b/src/mainboard/google/skyrim/Kconfig @@ -16,8 +16,10 @@ config BOARD_SPECIFIC_OPTIONS select AMD_SOC_CONSOLE_UART select BOARD_ROMSIZE_KB_16384 select DRIVERS_GENERIC_GPIO_KEYS + select DRIVERS_GENERIC_MAX98357A select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID + select DRIVERS_I2C_NAU8825 select DRIVERS_USB_HUB select DRIVERS_WIFI_GENERIC select EC_GOOGLE_CHROMEEC @@ -27,6 +29,7 @@ config BOARD_SPECIFIC_OPTIONS select ELOG select ELOG_GSMI select FW_CONFIG + select FW_CONFIG_SOURCE_CHROMEEC_CBI select I2C_TPM select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 diff --git a/src/mainboard/google/skyrim/variants/baseboard/gpio.c b/src/mainboard/google/skyrim/variants/baseboard/gpio.c index 1390e0958f..13b5d98044 100644 --- a/src/mainboard/google/skyrim/variants/baseboard/gpio.c +++ b/src/mainboard/google/skyrim/variants/baseboard/gpio.c @@ -120,7 +120,7 @@ static const struct soc_amd_gpio base_gpio_table[] = { /* SOC_BIOS_WP_L */ PAD_GPI(GPIO_138, PULL_NONE), /* EN_SPKR */ - PAD_GPO(GPIO_139, HIGH), + PAD_GPO(GPIO_139, LOW), /* RAM_ID_0 / DEV_BEEP_EN */ PAD_GPI(GPIO_144, PULL_NONE), /* UART1_TXD / FP */ diff --git a/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb b/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb index b61945ac18..8f1e683189 100644 --- a/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb +++ b/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb @@ -156,4 +156,67 @@ chip soc/amd/sabrina device generic 0 on end end end # I2C1 + device ref i2c_2 on + chip drivers/i2c/generic + register "hid" = ""RTL5682"" + register "name" = ""RT58"" + register "desc" = ""Realtek RT5682"" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_90)" + 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_DB AUDIO_DB_C_ALC5682I_A_ALC1019 + end + end + chip drivers/i2c/nau8825 + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_90)" + 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_DB AUDIO_DB_C_NAU88L25YGB_A_MAX98360AENL + end + end + chip drivers/i2c/generic + register "hid" = ""10EC1019"" + register "desc" = ""Realtek SPK AMP R"" + register "uid" = "1" + device i2c 29 on + probe AUDIO_DB AUDIO_DB_C_ALC5682I_A_ALC1019 + end + end + chip drivers/i2c/generic + register "hid" = ""10EC1019"" + register "desc" = ""Realtek SPK AMP L"" + register "uid" = "2" + register "probed" = "1" + device i2c 2a on + probe AUDIO_DB AUDIO_DB_C_ALC5682I_A_ALC1019 + end + end + end # I2C2 + chip drivers/generic/max98357a + register "hid" = ""MX98360A"" + register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_139)" + register "sdmode_delay" = "5" + device generic 0.1 on + probe AUDIO_DB AUDIO_DB_C_NAU88L25YGB_A_MAX98360AENL + end + end end # chip soc/amd/sabrina |