diff options
author | Vitaly Rodionov <vitaly.rodionov@cirrus.corp-partner.google.com> | 2021-05-06 19:50:36 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-05-12 08:00:12 +0000 |
commit | 2be6da1d49ea7abc5102a6bcc2b7749192032fb9 (patch) | |
tree | 137ac0ebb1d43ba156a51ef324e2dec1c43a26f1 /src/drivers/i2c/cs42l42 | |
parent | 5d24231427bd57d9304ef75d1b9aa552321942ae (diff) |
drivers/i2c/cs42l42: Make HS_BIAS_SENSE_EN optional
HSBIAS_SENSE_EN configures HSBIAS output current sense through
the external 2.21-k resistor. HSBIAS_SENSE is hardware feature to reduce
the potential pop noise during the headset plug out slowly. But on some
platforms ESD voltage will affect it causing test to fail, especially
with CTIA headset type. For different hardware setups, a designer might
want to tweak default behavior.
Signed-off-by: Vitaly Rodionov <vitaly.rodionov@cirrus.corp-partner.google.com>
Change-Id: I87c6f01af1bdb5b1cb8e399191519598d7fbe9ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52981
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c/cs42l42')
-rw-r--r-- | src/drivers/i2c/cs42l42/chip.h | 10 | ||||
-rw-r--r-- | src/drivers/i2c/cs42l42/cs42l42.c | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/drivers/i2c/cs42l42/chip.h b/src/drivers/i2c/cs42l42/chip.h index 5be2e14cd1..1adffe7088 100644 --- a/src/drivers/i2c/cs42l42/chip.h +++ b/src/drivers/i2c/cs42l42/chip.h @@ -106,4 +106,14 @@ struct drivers_i2c_cs42l42_config { uint64_t bias_lvls[4]; /* headset bias ramp rate */ enum cs42l42_hs_bias_ramp_rate hs_bias_ramp_rate; + /* + * cirrus,hs-bias-sense-disable: This is boolean property. If present the + * HSBIAS sense is disabled. Configures HSBIAS output current sense through + * the external 2.21-k resistor. HSBIAS_SENSE is hardware feature to reduce + * the potential pop noise during the headset plug out slowly. But on some + * platforms ESD voltage will affect it causing test to fail, especially + * with CTIA headset type. For different hardware setups, a designer might + * want to tweak default behavior. + */ + bool hs_bias_sense_disable; }; diff --git a/src/drivers/i2c/cs42l42/cs42l42.c b/src/drivers/i2c/cs42l42/cs42l42.c index d2ff6df8a3..a871cfceed 100644 --- a/src/drivers/i2c/cs42l42/cs42l42.c +++ b/src/drivers/i2c/cs42l42/cs42l42.c @@ -87,6 +87,8 @@ static void cs42l42_fill_ssdt(const struct device *dev) acpi_dp_add_integer_array(dsd, "cirrus,bias-lvls", config->bias_lvls, 4); acpi_dp_add_integer(dsd, "cirrus,hs-bias-ramp-rate", config->hs_bias_ramp_rate); + if (config->hs_bias_sense_disable) + acpi_dp_add_integer(dsd, "cirrus,hs-bias-sense-disable", 1); /* Write Device Property Hierarchy */ acpi_dp_write(dsd); |