From 82a9f865fd8b11d339c3c035ae9a8a730049bdcb Mon Sep 17 00:00:00 2001 From: Eric Lai Date: Thu, 15 Sep 2022 16:06:18 +0800 Subject: [PATCH] drivers/i2c/nau8825: Add ADCOUT IO drive strength control Add a property to control the driving of ADCOUT. BUG=b:234789689 TEST= build passed. Signed-off-by: Eric Lai Change-Id: Ibbedd5838a795ee645a5458b960062c5530ff3b5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67659 Tested-by: build bot (Jenkins) Reviewed-by: Kangheui Won --- src/drivers/i2c/nau8825/chip.h | 5 +++++ src/drivers/i2c/nau8825/nau8825.c | 1 + 2 files changed, 6 insertions(+) diff --git a/src/drivers/i2c/nau8825/chip.h b/src/drivers/i2c/nau8825/chip.h index 5b160c8724..ce17d3f71c 100644 --- a/src/drivers/i2c/nau8825/chip.h +++ b/src/drivers/i2c/nau8825/chip.h @@ -96,4 +96,9 @@ struct drivers_i2c_nau8825_config { * R is Button impedance */ uint64_t sar_threshold[NAU8825_MAX_BUTTONS]; + + /* Make the drive strength of ADCOUT IO PIN strong if set. + * Otherwise, the drive keeps normal strength. + */ + bool adcout_ds; }; diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c index 0915914cbc..76fd8715fb 100644 --- a/src/drivers/i2c/nau8825/nau8825.c +++ b/src/drivers/i2c/nau8825/nau8825.c @@ -69,6 +69,7 @@ static void nau8825_fill_ssdt(const struct device *dev) NAU8825_DP_INT("jack-insert-debounce", config->jack_insert_debounce); NAU8825_DP_INT("jack-eject-deboune", config->jack_eject_debounce); NAU8825_DP_INT("sar-threshold-num", config->sar_threshold_num); + NAU8825_DP_INT("adcout-drive-strong", config->adcout_ds ? 1 : 0); acpi_dp_add_integer_array(dp, "nuvoton,sar-threshold", config->sar_threshold, config->sar_threshold_num); acpi_dp_write(dp);