summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben.chen2@quanta.corp-partner.google.com <ben.chen2@quanta.corp-partner.google.com>2019-08-13 16:47:42 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-30 21:04:43 +0000
commit3f3ff2cf500ea7c6312cfa99c5f7b840a9d70e13 (patch)
tree0f7a5869a4e55524abfcad85f574245588e31792
parentc48135498f3e3673ada533bdc0a0e46a881b0bd9 (diff)
downloadchrome-ec-3f3ff2cf500ea7c6312cfa99c5f7b840a9d70e13.tar.gz
Kindred: Add WIFI temperature sensor.
This patch enable temp sensor 3 near by WIFI. BUG=b:140127035 BRANCH=master TEST=run 'temps', verify that temp sensor is present and reasonable. Change-Id: I266cb1ecd92a8727d65c33bae686f5b6848ca168 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1751304 Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: David Wu <david_wu@quanta.corp-partner.google.com> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
-rw-r--r--board/kindred/board.c7
-rw-r--r--board/kindred/board.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/board/kindred/board.c b/board/kindred/board.c
index 266120259a..0febc4ef4c 100644
--- a/board/kindred/board.c
+++ b/board/kindred/board.c
@@ -306,6 +306,8 @@ const struct adc_t adc_channels[] = {
"TEMP_AMB", NPCX_ADC_CH0, ADC_MAX_VOLT, ADC_READ_MAX+1, 0},
[ADC_TEMP_SENSOR_2] = {
"TEMP_CHARGER", NPCX_ADC_CH1, ADC_MAX_VOLT, ADC_READ_MAX+1, 0},
+ [ADC_TEMP_SENSOR_3] = {
+ "TEMP_WIFI", NPCX_ADC_CH3, ADC_MAX_VOLT, ADC_READ_MAX+1, 0},
};
BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
@@ -320,6 +322,11 @@ const struct temp_sensor_t temp_sensors[] = {
.read = get_temp_3v3_30k9_47k_4050b,
.idx = ADC_TEMP_SENSOR_2,
.action_delay_sec = 1},
+ [TEMP_SENSOR_3] = {.name = "Temp3",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_30k9_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_3,
+ .action_delay_sec = 1},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/kindred/board.h b/board/kindred/board.h
index 04e6caf549..8dc292b1df 100644
--- a/board/kindred/board.h
+++ b/board/kindred/board.h
@@ -123,6 +123,7 @@ extern enum gpio_signal gpio_en_pp5000_a;
enum adc_channel {
ADC_TEMP_SENSOR_1, /* ADC0 */
ADC_TEMP_SENSOR_2, /* ADC1 */
+ ADC_TEMP_SENSOR_3, /* ADC3 */
ADC_CH_COUNT
};
@@ -154,6 +155,7 @@ enum mft_channel {
enum temp_sensor_id {
TEMP_SENSOR_1,
TEMP_SENSOR_2,
+ TEMP_SENSOR_3,
TEMP_SENSOR_COUNT
};