diff options
author | Frank Wu <frank_wu@compal.corp-partner.google.com> | 2021-03-19 17:06:40 +0800 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2021-03-26 17:45:38 +0000 |
commit | fe4c6b8d30b6dfd6cdb0ab8e42363c0cb04cfe41 (patch) | |
tree | d788c3f48d71add15b554eedd928405958715dcf /src/mainboard/google/zork | |
parent | a889e2a33723478fc2ca460acaad04ba771828fa (diff) | |
download | coreboot-fe4c6b8d30b6dfd6cdb0ab8e42363c0cb04cfe41.tar.xz |
mb/google/zork/vilboz: Enable ALC1015 AMP driver
Enable ALC1015 driver for audio support in vilboz
BUG=b:177971830
BRANCH=firmware-zork-13434.B
TEST=emerge-zork coreboot chromeos-bootimage, then verify with ALC1015 AMP
Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: If0abfd6570579fe637a7bef31de2f01d58f3bdf6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51053
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Diffstat (limited to 'src/mainboard/google/zork')
-rw-r--r-- | src/mainboard/google/zork/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/helpers.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/vilboz/overridetree.cb | 36 |
3 files changed, 38 insertions, 2 deletions
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index 77672cc199..aff1898343 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -17,6 +17,7 @@ config BOARD_SPECIFIC_OPTIONS select DRIVERS_AMD_I2S_MACHINE_DEV select DISABLE_SPI_FLASH_ROM_SHARING select DRIVERS_GENERIC_GPIO_KEYS + select DRIVERS_GENERIC_ALC1015 select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID select DRIVERS_I2C_SX9324 diff --git a/src/mainboard/google/zork/variants/baseboard/helpers.c b/src/mainboard/google/zork/variants/baseboard/helpers.c index 38f0a72658..9af015946f 100644 --- a/src/mainboard/google/zork/variants/baseboard/helpers.c +++ b/src/mainboard/google/zork/variants/baseboard/helpers.c @@ -52,6 +52,9 @@ enum { /* WWAN presence */ FW_CONFIG_MASK_WWAN = 0x1, FW_CONFIG_SHIFT_WWAN = 29, + /* Audio AMP type */ + FW_CONFIG_MASK_AUDIO_AMP = 0x1, + FW_CONFIG_SHIFT_AUDIO_AMP = 35, }; static int get_fw_config(uint64_t *val) diff --git a/src/mainboard/google/zork/variants/vilboz/overridetree.cb b/src/mainboard/google/zork/variants/vilboz/overridetree.cb index 35936baf7d..6af363d26b 100644 --- a/src/mainboard/google/zork/variants/vilboz/overridetree.cb +++ b/src/mainboard/google/zork/variants/vilboz/overridetree.cb @@ -1,5 +1,12 @@ # SPDX-License-Identifier: GPL-2.0-or-later +fw_config + field AUDIO_AMP 35 + option AUDIO_AMP_I2C_MODE 0 + option AUDIO_AMP_AUTO_MODE 1 + end +end + chip soc/amd/picasso # Start : OPN Performance Configuration @@ -173,7 +180,31 @@ chip soc/amd/picasso # Set low (0) = Select DMIC0 # Set high (1) = Select DMIC1 register "dmic_select_gpio" = "ACPI_GPIO_OUTPUT(GPIO_67)" - device generic 0.0 on end + device generic 0.0 on + probe AUDIO_AMP AUDIO_AMP_I2C_MODE + end + end + chip drivers/amd/i2s_machine_dev + register "hid" = ""AMDP1015"" + # DMIC select GPIO for ACP machine device + # This GPIO is used to select DMIC0 or DMIC1 by the + # kernel driver. It does not really have a polarity + # since low and high control the selection of DMIC and + # hence does not have an active polarity. + # Kernel driver does not use the polarity field and + # instead treats the GPIO selection as follows: + # Set low (0) = Select DMIC0 + # Set high (1) = Select DMIC1 + register "dmic_select_gpio" = "ACPI_GPIO_OUTPUT(GPIO_67)" + device generic 1.0 on + probe AUDIO_AMP AUDIO_AMP_AUTO_MODE + end + end + chip drivers/generic/alc1015 + register "sdb" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_91)" + device generic 1.1 on + probe AUDIO_AMP AUDIO_AMP_AUTO_MODE + end end end # Audio end @@ -183,7 +214,7 @@ chip soc/amd/picasso chip ec/google/chromeec/i2c_tunnel register "uid" = "1" register "remote_bus" = "8" - device generic 0.0 on + device generic 0.1 on chip drivers/i2c/generic register "hid" = ""10EC1015"" register "desc" = ""RT1015 Tweeter Left Speaker Amp"" @@ -198,6 +229,7 @@ chip soc/amd/picasso register "name" = ""TR"" device i2c 29 on end end + probe AUDIO_AMP AUDIO_AMP_I2C_MODE end end end |