diff options
author | martin yan <martin.yan@microchip.corp-partner.google.com> | 2021-06-03 11:58:21 -0400 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-10 21:39:28 +0000 |
commit | af535e7e927affe68a8a3ea9d6f064cb19b7beab (patch) | |
tree | 910c04acb55be85c933446df9d5845dc96d9c449 /chip/mchp | |
parent | e1a4f619b08dd49b3784cbd4b64c4e60414ec8c0 (diff) | |
download | chrome-ec-af535e7e927affe68a8a3ea9d6f064cb19b7beab.tar.gz |
mchp: Add ADC MAX reading value for MEC172x
Update ADC_READ_MAX for MEC172x, its ADC is 12BIT resolution in default
BRANCH=none
BUG=b:190518298
TEST=Tested on ADL RVP via UART console
> temps
Ambient : 300 K = 27 C 34%
DDR : 299 K = 26 C 31%
Skin : 301 K = 28 C 37%
VR : 297 K = 24 C 25%
Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com>
Change-Id: If657d79d989b017fb34df437e28ceed291c9e1d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2935558
Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'chip/mchp')
-rw-r--r-- | chip/mchp/adc_chip.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chip/mchp/adc_chip.h b/chip/mchp/adc_chip.h index 0da34f40f1..ae29ef1f92 100644 --- a/chip/mchp/adc_chip.h +++ b/chip/mchp/adc_chip.h @@ -38,7 +38,12 @@ extern const struct adc_t adc_channels[]; /* Minimum and maximum values returned by adc_read_channel(). */ #define ADC_READ_MIN 0 +#ifdef CHIP_FAMILY_MEC172X +/* MEC172x ADC is 12BIT resolution in default */ +#define ADC_READ_MAX 4095 +#else #define ADC_READ_MAX 1023 +#endif /* Just plain id mapping for code readability */ #define MCHP_ADC_CH(x) (x) |