diff options
-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 |