summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/octopus/Kconfig1
-rw-r--r--src/mainboard/google/octopus/mainboard.c8
-rw-r--r--src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h1
-rw-r--r--src/mainboard/google/octopus/variants/fleex/gpio.c3
-rw-r--r--src/mainboard/google/octopus/variants/fleex/overridetree.cb15
5 files changed, 27 insertions, 1 deletions
diff --git a/src/mainboard/google/octopus/Kconfig b/src/mainboard/google/octopus/Kconfig
index ba01fe3d5f..611aa35d81 100644
--- a/src/mainboard/google/octopus/Kconfig
+++ b/src/mainboard/google/octopus/Kconfig
@@ -5,6 +5,7 @@ config BOARD_GOOGLE_BASEBOARD_OCTOPUS
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_GPIO_KEYS
select DRIVERS_GENERIC_MAX98357A
+ select DRIVERS_I2C_CS42L42
select DRIVERS_I2C_DA7219
select DRIVERS_I2C_GENERIC
select DRIVERS_I2C_HID
diff --git a/src/mainboard/google/octopus/mainboard.c b/src/mainboard/google/octopus/mainboard.c
index 5bf87e23f5..65bf286f08 100644
--- a/src/mainboard/google/octopus/mainboard.c
+++ b/src/mainboard/google/octopus/mainboard.c
@@ -25,6 +25,7 @@
#include <variant/gpio.h>
extern struct chip_operations drivers_i2c_generic_ops;
+extern struct chip_operations drivers_i2c_cs42l42_ops;
extern struct chip_operations drivers_i2c_da7219_ops;
static bool is_cnvi_held_in_reset(void)
@@ -201,6 +202,13 @@ static void audio_codec_device_update(void)
continue;
}
}
+
+ if ((audio_dev->chip_ops == &drivers_i2c_cs42l42_ops) &&
+ (codec == SSFC_AUDIO_CODEC_CS42L42)) {
+ printk(BIOS_INFO, "enable CS42L42.\n");
+ continue;
+ }
+
printk(BIOS_INFO, "%s has been disabled\n", audio_dev->chip_ops->name);
audio_dev->enabled = 0;
}
diff --git a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h
index 84020d7eb3..cef047aa5d 100644
--- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h
+++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h
@@ -29,6 +29,7 @@ enum ssfc_audio_codec {
SSFC_AUDIO_CODEC_DEFAULT,
SSFC_AUDIO_CODEC_DA7219,
SSFC_AUDIO_CODEC_RT5682,
+ SSFC_AUDIO_CODEC_CS42L42,
};
#define SSFC_AUDIO_CODEC_OFFSET 9
#define SSFC_AUDIO_CODEC_MASK 0x7
diff --git a/src/mainboard/google/octopus/variants/fleex/gpio.c b/src/mainboard/google/octopus/variants/fleex/gpio.c
index 224e38d3ce..732fe6861c 100644
--- a/src/mainboard/google/octopus/variants/fleex/gpio.c
+++ b/src/mainboard/google/octopus/variants/fleex/gpio.c
@@ -18,7 +18,8 @@ static const struct pad_config default_override_table[] = {
PAD_CFG_GPI_APIC_IOS(GPIO_137, NONE, DEEP, LEVEL, INVERT, HIZCRx1, DISPUPD),
PAD_NC(GPIO_143, UP_20K),
- PAD_NC(GPIO_144, UP_20K),
+ /* GPIO_144 -- Codec reset pin. */
+ PAD_CFG_GPO(GPIO_144, 1, PWROK),
PAD_NC(GPIO_145, UP_20K),
/* EN_PP3300_TOUCHSCREEN */
diff --git a/src/mainboard/google/octopus/variants/fleex/overridetree.cb b/src/mainboard/google/octopus/variants/fleex/overridetree.cb
index 1368834ba1..f0343cd69b 100644
--- a/src/mainboard/google/octopus/variants/fleex/overridetree.cb
+++ b/src/mainboard/google/octopus/variants/fleex/overridetree.cb
@@ -135,6 +135,21 @@ chip soc/intel/apollolake
register "property_list[0].integer" = "1"
device i2c 1a on end
end
+ chip drivers/i2c/cs42l42
+ register "irq" = "ACPI_IRQ_LEVEL_LOW(GPIO_137_IRQ)"
+ register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_144)"
+ register "ts_inv" = "true"
+ register "ts_dbnc_rise" = "RISE_DEB_1000_MS"
+ register "ts_dbnc_fall" = "FALL_DEB_0_MS"
+ register "btn_det_init_dbnce" = "100"
+ register "btn_det_event_dbnce" = "10"
+ register "bias_lvls[0]" = "15"
+ register "bias_lvls[1]" = "8"
+ register "bias_lvls[2]" = "4"
+ register "bias_lvls[3]" = "1"
+ register "hs_bias_ramp_rate" = "HSBIAS_RAMP_SLOW"
+ device i2c 48 on end
+ end
end # - I2C 5
device pci 17.2 on
chip drivers/i2c/generic