Vitaly Rodionov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/52981 )
Change subject: drivers/i2c/cs42l42: Make HS_BIAS_SENSE_EN optional ......................................................................
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 --- M src/drivers/i2c/cs42l42/chip.h M src/drivers/i2c/cs42l42/cs42l42.c 2 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/52981/1
diff --git a/src/drivers/i2c/cs42l42/chip.h b/src/drivers/i2c/cs42l42/chip.h index 5be2e14..f68bf9e 100644 --- a/src/drivers/i2c/cs42l42/chip.h +++ b/src/drivers/i2c/cs42l42/chip.h @@ -106,4 +106,16 @@ uint64_t bias_lvls[4]; /* headset bias ramp rate */ enum cs42l42_hs_bias_ramp_rate hs_bias_ramp_rate; + /* + * cirrus,hs-bias-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. + * false - disabled + * true - enabled + * Default = true + */ + bool hs_bias_sense_en; }; diff --git a/src/drivers/i2c/cs42l42/cs42l42.c b/src/drivers/i2c/cs42l42/cs42l42.c index d2ff6df..5ab0516 100644 --- a/src/drivers/i2c/cs42l42/cs42l42.c +++ b/src/drivers/i2c/cs42l42/cs42l42.c @@ -87,7 +87,7 @@
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); - + acpi_dp_add_integer(dsd, "cirrus,hs-bias-sense-en", config->hs_bias_sense_en ? 1 : 0); /* Write Device Property Hierarchy */ acpi_dp_write(dsd);