diff options
author | Diana Z <dzigterman@chromium.org> | 2020-03-23 09:56:15 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-26 00:28:16 +0000 |
commit | 7107a70c8c583f128838fc48fef7a6ebbea91188 (patch) | |
tree | fd2a51e41602dfb64577dae444a3ff76c7df7770 /driver/charger/sm5803.h | |
parent | 002db692bc570732d5a2c347085d71bec77c1402 (diff) | |
download | chrome-ec-7107a70c8c583f128838fc48fef7a6ebbea91188.tar.gz |
SM5803: Configure lower TINT threshold
In order to detect when temperatures have returned to a good range and
cease AP throttling, add the lower TINT threshold.
BUG=b:148289370
BRANCH=None
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Id8a22c4220539e3959cd2f831552f57ab12853fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2115569
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/charger/sm5803.h')
-rw-r--r-- | driver/charger/sm5803.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/driver/charger/sm5803.h b/driver/charger/sm5803.h index 8b96ac8f94..09a47b423e 100644 --- a/driver/charger/sm5803.h +++ b/driver/charger/sm5803.h @@ -111,6 +111,7 @@ enum sm5803_gpio0_modes { /* Note: Threshold registers all assume lower 2 bits are 0 */ #define SM5803_REG_VBUS_LOW_TH 0x1B #define SM5803_REG_VBUS_HIGH_TH 0x2B +#define SM5803_REG_TINT_LOW_TH 0x1D #define SM5803_REG_TINT_HIGH_TH 0x2D /* @@ -120,6 +121,13 @@ enum sm5803_gpio0_modes { #define SM5803_VBUS_LOW_LEVEL 0x25 #define SM5803_VBUS_HIGH_LEVEL 0x2C +/* + * TINT thresholds. TINT steps are in 0.43 K with the upper threshold set to + * 360 K and lower threshold to de-assert PROCHOT at 330 K. + */ +#define SM5803_TINT_LOW_LEVEL 0xBF +#define SM5803_TINT_HIGH_LEVEL 0xD1 + #define SM5803_REG_VBUS_MEAS_MSB 0x48 #define SM5803_REG_VBUS_MEAS_LSB 0x49 #define SM5803_VBUS_MEAS_LSB GENMASK(1, 0) @@ -128,6 +136,8 @@ enum sm5803_gpio0_modes { #define SM5803_VBUS_MEAS_OV_TEMP BIT(5) #define SM5803_VBUS_MEAS_CHG_DET BIT(6) +#define SM5803_REG_TINT_MEAS_MSB 0x4E + /* Charger registers (address 0x32) */ #define SM5803_REG_FLOW1 0x1C |