summaryrefslogtreecommitdiff
path: root/src/mainboard/google/octopus
diff options
context:
space:
mode:
authorShamile Khan <shamile.khan@intel.com>2018-03-12 16:54:53 -0700
committerPatrick Georgi <pgeorgi@google.com>2018-03-15 08:50:14 +0000
commitcb9f55ec388f733bbfa4851b3fdd9f49d648425f (patch)
tree642cce52d8b167a75eb6d4f6d983d93ea683b5ff /src/mainboard/google/octopus
parentd91c93251748e1ab5ec49c4a90e5418fc20c8bd4 (diff)
mb/google/octopus: Enable audio components.
Octopus uses MAX98357A speaker amplifier and DA7219 codec. Add device tree entries and Kconfig settings for these components. BUG=b:73292699,b:73230879 BRANCH=None TEST=Build coreboot for Octopus board. Change-Id: I27b5113677a8bd44dbbae587e27616d9e0b90d7f Signed-off-by: Shamile Khan <shamile.khan@intel.com> Reviewed-on: https://review.coreboot.org/25117 Reviewed-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/octopus')
-rw-r--r--src/mainboard/google/octopus/Kconfig5
-rw-r--r--src/mainboard/google/octopus/variants/baseboard/devicetree.cb40
2 files changed, 43 insertions, 2 deletions
diff --git a/src/mainboard/google/octopus/Kconfig b/src/mainboard/google/octopus/Kconfig
index 4546e62d40..3321b5c7aa 100644
--- a/src/mainboard/google/octopus/Kconfig
+++ b/src/mainboard/google/octopus/Kconfig
@@ -3,6 +3,8 @@ config BOARD_GOOGLE_BASEBOARD_OCTOPUS
def_bool n
select SOC_INTEL_GLK
select BOARD_ROMSIZE_KB_16384
+ select DRIVERS_GENERIC_MAX98357A
+ select DRIVERS_I2C_DA7219
select DRIVERS_I2C_GENERIC
select DRIVERS_PS2_KEYBOARD
select EC_GOOGLE_CHROMEEC
@@ -65,5 +67,8 @@ config UART_FOR_CONSOLE
config INCLUDE_NHLT_BLOBS
bool "Include blobs for audio."
+ select NHLT_DMIC_4CH_16B
+ select NHLT_DA7219
+ select NHLT_MAX98357
endif # BOARD_GOOGLE_OCTOPUS
diff --git a/src/mainboard/google/octopus/variants/baseboard/devicetree.cb b/src/mainboard/google/octopus/variants/baseboard/devicetree.cb
index 9d267cf445..e7ee9d3a55 100644
--- a/src/mainboard/google/octopus/variants/baseboard/devicetree.cb
+++ b/src/mainboard/google/octopus/variants/baseboard/devicetree.cb
@@ -60,6 +60,11 @@ chip soc/intel/apollolake
# Enable lpss s0ix
register "lpss_s0ix_enable" = "1"
+ # Enable Audio Clock and Power gating
+ register "hdaudio_clk_gate_enable" = "1"
+ register "hdaudio_pwr_gate_enable" = "1"
+ register "hdaudio_bios_config_lockdown" = "1"
+
# digitizer at 400kHz
register "i2c[0]" = "{
.speed = I2C_SPEED_FAST,
@@ -67,6 +72,13 @@ chip soc/intel/apollolake
.fall_time_ns = 30,
}"
+ # Enable I2C5 for audio codec at 400kHz
+ register "i2c[5]" = "{
+ .speed = I2C_SPEED_FAST,
+ .rise_time_ns = 104,
+ .fall_time_ns = 52,
+ }"
+
# trackpad at 400kHz
register "i2c[6]" = "{
.speed = I2C_SPEED_FAST,
@@ -93,7 +105,13 @@ chip soc/intel/apollolake
device pci 0d.1 on end # - PMC
device pci 0d.2 on end # - Fast SPI
device pci 0d.3 on end # - Shared SRAM
- device pci 0e.0 on end # - Audio
+ device pci 0e.0 on
+ chip drivers/generic/max98357a
+ register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_91)"
+ register "sdmode_delay" = "5"
+ device generic 0 on end
+ end
+ end # - Audio
device pci 0f.0 on end # - Heci1
device pci 0f.1 on end # - Heci2
device pci 0f.2 on end # - Heci3
@@ -122,7 +140,25 @@ chip soc/intel/apollolake
device pci 16.2 on end # - I2C 2
device pci 16.3 on end # - I2C 3
device pci 17.0 off end # - I2C 4
- device pci 17.1 on end # - I2C 5
+ device pci 17.1 on
+ chip drivers/i2c/da7219
+ register "irq" = "ACPI_IRQ_LEVEL_LOW(GPIO_137_IRQ)"
+ register "btn_cfg" = "50"
+ register "mic_det_thr" = "500"
+ register "jack_ins_deb" = "20"
+ register "jack_det_rate" = ""32ms_64ms""
+ register "jack_rem_deb" = "1"
+ register "a_d_btn_thr" = "0xa"
+ register "d_b_btn_thr" = "0x16"
+ register "b_c_btn_thr" = "0x21"
+ register "c_mic_btn_thr" = "0x3e"
+ register "btn_avg" = "4"
+ register "adc_1bit_rpt" = "1"
+ register "micbias_lvl" = "2600"
+ register "mic_amp_in_sel" = ""diff""
+ device i2c 1a on end
+ end
+ end # - I2C 5
device pci 17.2 on
chip drivers/i2c/generic
register "hid" = ""ELAN0000""