Ian Feng has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63779 )
Change subject: mb/google/skyrim/var/skyrim: Add audio codec and amp support ......................................................................
mb/google/skyrim/var/skyrim: Add audio codec and amp support
Add two combination: 1. ALC5682I-VS ALC1019 2. NAU88L25 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 --- M src/mainboard/google/skyrim/Kconfig M src/mainboard/google/skyrim/Kconfig.name M src/mainboard/google/skyrim/variants/baseboard/gpio.c M src/mainboard/google/skyrim/variants/skyrim/overridetree.cb 4 files changed, 67 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/63779/1
diff --git a/src/mainboard/google/skyrim/Kconfig b/src/mainboard/google/skyrim/Kconfig index 5a60c987..35111d3 100644 --- a/src/mainboard/google/skyrim/Kconfig +++ b/src/mainboard/google/skyrim/Kconfig @@ -24,6 +24,7 @@ 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/Kconfig.name b/src/mainboard/google/skyrim/Kconfig.name index a36235c..9711d69 100644 --- a/src/mainboard/google/skyrim/Kconfig.name +++ b/src/mainboard/google/skyrim/Kconfig.name @@ -3,3 +3,5 @@ config BOARD_GOOGLE_SKYRIM bool "-> Skyrim" select BOARD_GOOGLE_BASEBOARD_SKYRIM + select DRIVERS_GENERIC_MAX98357A + select DRIVERS_I2C_NAU8825 diff --git a/src/mainboard/google/skyrim/variants/baseboard/gpio.c b/src/mainboard/google/skyrim/variants/baseboard/gpio.c index 6ff2906..8a1661b 100644 --- a/src/mainboard/google/skyrim/variants/baseboard/gpio.c +++ b/src/mainboard/google/skyrim/variants/baseboard/gpio.c @@ -120,7 +120,7 @@ /* 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 3b33a5d..31b05c6 100644 --- a/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb +++ b/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb @@ -97,4 +97,67 @@ 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