summaryrefslogtreecommitdiff
path: root/src/mainboard/google/octopus
diff options
context:
space:
mode:
authorKevin Chang <kevin.chang@lcfc.corp-partner.google.com>2021-05-04 14:36:29 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-05-12 14:51:09 +0000
commitd44ca19b83b9b4406c077d467a85e23daf511a8b (patch)
tree2c91f1af33fa442ba9ff44656652b9d37ce5dc96 /src/mainboard/google/octopus
parenta0a778932e30b5543c05174b3498bde9454d3dc5 (diff)
mb/google/octopus/var/phaser: add audio codec into SSFC support for Phaser
Add audio codec module RT5682 in project and define GPIO_137 in the override_table for SSFC framework to adjust IRQ configuration. BUG=b:182221327 BRANCH=octopus TEST=adjust SSFC value of CBI to select RT5682I or DA7219 then check whether device tree is updated correspondingly by disabling unselected one. Signed-off-by: Kevin Chang <kevin.chang@lcfc.corp-partner.google.com> Change-Id: I202f71f57ad2db84fb90b52f9ffd7a1fd05494a3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/52878 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marco Chen <marcochen@google.com>
Diffstat (limited to 'src/mainboard/google/octopus')
-rw-r--r--src/mainboard/google/octopus/Kconfig.name1
-rw-r--r--src/mainboard/google/octopus/variants/phaser/gpio.c4
-rw-r--r--src/mainboard/google/octopus/variants/phaser/overridetree.cb13
3 files changed, 18 insertions, 0 deletions
diff --git a/src/mainboard/google/octopus/Kconfig.name b/src/mainboard/google/octopus/Kconfig.name
index 942726e875..b822d650ed 100644
--- a/src/mainboard/google/octopus/Kconfig.name
+++ b/src/mainboard/google/octopus/Kconfig.name
@@ -16,6 +16,7 @@ config BOARD_GOOGLE_PHASER
select BASEBOARD_OCTOPUS_LAPTOP
select BOARD_GOOGLE_BASEBOARD_OCTOPUS
select NHLT_DA7219 if INCLUDE_NHLT_BLOBS
+ select NHLT_RT5682 if INCLUDE_NHLT_BLOBS
config BOARD_GOOGLE_LICK
bool "-> Lick"
diff --git a/src/mainboard/google/octopus/variants/phaser/gpio.c b/src/mainboard/google/octopus/variants/phaser/gpio.c
index 29b64b54c7..f227b019a9 100644
--- a/src/mainboard/google/octopus/variants/phaser/gpio.c
+++ b/src/mainboard/google/octopus/variants/phaser/gpio.c
@@ -14,6 +14,8 @@ static const struct pad_config default_override_table[] = {
PAD_NC(GPIO_53, UP_20K),
PAD_NC(GPIO_67, UP_20K),
PAD_NC(GPIO_117, UP_20K),
+ PAD_CFG_GPI_APIC_IOS(GPIO_137, NONE, DEEP, LEVEL, INVERT, HIZCRx1,
+ DISPUPD),
PAD_NC(GPIO_143, UP_20K),
/* EN_PP3300_TOUCHSCREEN */
@@ -35,6 +37,8 @@ static const struct pad_config sku1_default_override_table[] = {
PAD_NC(GPIO_53, UP_20K),
PAD_NC(GPIO_67, UP_20K),
PAD_NC(GPIO_117, UP_20K),
+ PAD_CFG_GPI_APIC_IOS(GPIO_137, NONE, DEEP, LEVEL, INVERT, HIZCRx1,
+ DISPUPD),
PAD_NC(GPIO_143, UP_20K),
/* EN_PP3300_TOUCHSCREEN */
diff --git a/src/mainboard/google/octopus/variants/phaser/overridetree.cb b/src/mainboard/google/octopus/variants/phaser/overridetree.cb
index fb2936ac67..45c017a3f6 100644
--- a/src/mainboard/google/octopus/variants/phaser/overridetree.cb
+++ b/src/mainboard/google/octopus/variants/phaser/overridetree.cb
@@ -113,6 +113,19 @@ chip soc/intel/apollolake
register "mic_amp_in_sel" = ""diff""
device i2c 1a on end
end
+ chip drivers/i2c/generic
+ register "hid" = ""10EC5682""
+ register "name" = ""RT58""
+ register "desc" = ""Realtek RT5682""
+ register "irq" = "ACPI_IRQ_LEVEL_LOW(GPIO_137_IRQ)"
+ register "probed" = "1"
+ register "property_count" = "1"
+ # Set the jd_src to RT5668_JD1 for jack detection
+ 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 end
+ end
end # - I2C 5
device pci 17.2 on
chip drivers/i2c/generic