summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/zork/variants/baseboard/helpers.c3
-rw-r--r--src/mainboard/google/zork/variants/shuboz/overridetree.cb86
2 files changed, 89 insertions, 0 deletions
diff --git a/src/mainboard/google/zork/variants/baseboard/helpers.c b/src/mainboard/google/zork/variants/baseboard/helpers.c
index d6c5e4824f..7057a48382 100644
--- a/src/mainboard/google/zork/variants/baseboard/helpers.c
+++ b/src/mainboard/google/zork/variants/baseboard/helpers.c
@@ -55,6 +55,9 @@ enum {
/* Audio AMP type */
FW_CONFIG_MASK_AUDIO_AMP = 0x1,
FW_CONFIG_SHIFT_AUDIO_AMP = 35,
+ /* Audio codec type */
+ FW_CONFIG_MASK_AUDIO_CODEC_SOURCE = 0x3,
+ FW_CONFIG_SHIFT_AUDIO_CODEC_SOURCE = 36,
};
static int get_fw_config(uint64_t *val)
diff --git a/src/mainboard/google/zork/variants/shuboz/overridetree.cb b/src/mainboard/google/zork/variants/shuboz/overridetree.cb
index c3cc9e6c40..32a5e76b6b 100644
--- a/src/mainboard/google/zork/variants/shuboz/overridetree.cb
+++ b/src/mainboard/google/zork/variants/shuboz/overridetree.cb
@@ -1,4 +1,10 @@
# SPDX-License-Identifier: GPL-2.0-or-later
+fw_config
+ field AUDIO_CODEC_SOURCE 36 37
+ option AUDIO_CODEC_ALC5682 0
+ option AUDIO_CODEC_ALC5682I_VS 1
+ end
+end
chip soc/amd/picasso
@@ -51,6 +57,86 @@ chip soc/amd/picasso
# See AMD 55570-B1 Table 13: PCI Device ID Assignments.
device domain 0 on
subsystemid 0x1022 0x1510 inherit
+ device ref internal_bridge_a on
+ device ref acp on
+ chip drivers/amd/i2s_machine_dev
+ register "hid" = ""AMDI5682""
+ # 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 0.0 on
+ probe AUDIO_CODEC_SOURCE AUDIO_CODEC_ALC5682
+ end
+ end
+ chip drivers/amd/i2s_machine_dev
+ register "hid" = ""10029835""
+ # 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_CODEC_SOURCE AUDIO_CODEC_ALC5682I_VS
+ end
+ end
+ end # Audio
+ end
+ device ref lpc_bridge on
+ chip ec/google/chromeec
+ device pnp 0c09.0 on
+ chip ec/google/chromeec/i2c_tunnel
+ device generic 0.0 on
+ chip drivers/i2c/generic
+ register "hid" = ""10EC5682""
+ register "name" = ""RT58""
+ register "uid" = "1"
+ register "desc" = ""Realtek RT5682""
+ register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_84)"
+ register "property_count" = "2"
+ register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
+ register "property_list[0].name" = ""realtek,jd-src""
+ register "property_list[0].integer" = "1"
+ register "property_list[1].type" = "ACPI_DP_TYPE_STRING"
+ register "property_list[1].name" = ""realtek,mclk-name""
+ register "property_list[1].string" = ""oscout1""
+ device i2c 1a on end
+ end
+ probe AUDIO_CODEC_SOURCE AUDIO_CODEC_ALC5682
+ end
+ device generic 1.0 on
+ chip drivers/i2c/generic
+ register "hid" = ""RTL5682""
+ register "name" = ""RT58""
+ register "uid" = "1"
+ register "desc" = ""Realtek RT5682""
+ register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_84)"
+ register "property_count" = "2"
+ register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
+ register "property_list[0].name" = ""realtek,jd-src""
+ register "property_list[0].integer" = "1"
+ register "property_list[1].type" = "ACPI_DP_TYPE_STRING"
+ register "property_list[1].name" = ""realtek,mclk-name""
+ register "property_list[1].string" = ""oscout1""
+ device i2c 1a on end
+ end
+ probe AUDIO_CODEC_SOURCE AUDIO_CODEC_ALC5682I_VS
+ end
+ end
+ end
+ end
+ end
end # domain
device ref i2c_2 on