summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorPaul Fagerburg <pfagerburg@chromium.org>2019-10-09 10:32:07 -0600
committerCommit Bot <commit-bot@chromium.org>2019-10-10 18:21:12 +0000
commit552f9e9ce218718629b8178ef12823958b2044fa (patch)
tree660b2de11a577dcc1a682bf44b103ed4f1b16cc9 /board
parenteea0da9e3d21b9b8bc6b95ef007fee4d2fdb0ba4 (diff)
downloadchrome-ec-552f9e9ce218718629b8178ef12823958b2044fa.tar.gz
helios: Add TEMP_SENSOR4
Helios adds TEMP_SENSOR4 to the EC ADC2 pin. Add this to the list of temperature sensors that the EC can report on. BRANCH=None BUG=b:142266102 TEST=`make buildall -j` Verify that Helios builds correctly. Change-Id: I05ccaf5ac339d8a7e1ccd1e3079fc7bddfb841be Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1848968 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Commit-Queue: Sean Abraham <seanabraham@chromium.org> Commit-Queue: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Diffstat (limited to 'board')
-rw-r--r--board/helios/board.c7
-rw-r--r--board/helios/board.h2
-rw-r--r--board/helios/gpio.inc2
3 files changed, 10 insertions, 1 deletions
diff --git a/board/helios/board.c b/board/helios/board.c
index 0b11c17673..85a7882706 100644
--- a/board/helios/board.c
+++ b/board/helios/board.c
@@ -346,6 +346,8 @@ const struct adc_t adc_channels[] = {
"TEMP_5V_REG", NPCX_ADC_CH1, ADC_MAX_VOLT, ADC_READ_MAX+1, 0},
[ADC_TEMP_SENSOR_3] = {
"TEMP_AMB", NPCX_ADC_CH3, ADC_MAX_VOLT, ADC_READ_MAX+1, 0},
+ [ADC_TEMP_SENSOR_4] = {
+ "TEMP_CPU", NPCX_ADC_CH2, ADC_MAX_VOLT, ADC_READ_MAX+1, 0},
};
BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
@@ -365,6 +367,11 @@ const struct temp_sensor_t temp_sensors[] = {
.read = get_temp_3v3_30k9_47k_4050b,
.idx = ADC_TEMP_SENSOR_3,
.action_delay_sec = 1},
+ [TEMP_SENSOR_4] = {.name = "Temp4",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_30k9_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_4,
+ .action_delay_sec = 1},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/helios/board.h b/board/helios/board.h
index 11c22c3812..b83c3fd61d 100644
--- a/board/helios/board.h
+++ b/board/helios/board.h
@@ -101,6 +101,7 @@ enum adc_channel {
ADC_TEMP_SENSOR_1, /* ADC0 */
ADC_TEMP_SENSOR_2, /* ADC1 */
ADC_TEMP_SENSOR_3, /* ADC3 */
+ ADC_TEMP_SENSOR_4, /* ADC2 */
ADC_CH_COUNT
};
@@ -134,6 +135,7 @@ enum temp_sensor_id {
TEMP_SENSOR_1,
TEMP_SENSOR_2,
TEMP_SENSOR_3,
+ TEMP_SENSOR_4,
TEMP_SENSOR_COUNT
};
diff --git a/board/helios/gpio.inc b/board/helios/gpio.inc
index 6a88a2f07d..316709e6d9 100644
--- a/board/helios/gpio.inc
+++ b/board/helios/gpio.inc
@@ -113,7 +113,7 @@ ALTERNATE(PIN_MASK(B, 0x80), 0, MODULE_PWM, 0) /* PW
ALTERNATE(PIN_MASK(4, 0x01), 0, MODULE_PWM, 0) /* TA1 - Fan Tachometer */
/* ADC */
-ALTERNATE(PIN_MASK(4, 0x34), 0, MODULE_ADC, 0) /* ADC0, ADC1, ADC3 */
+ALTERNATE(PIN_MASK(4, 0x3C), 0, MODULE_ADC, 0) /* ADC0, ADC1, ADC2, ADC3 */
/* Power Switch Logic (PSL) inputs */
ALTERNATE(PIN_MASK(D, 0x04), 0, MODULE_PMU, 0) /* GPIOD2 = LID_OPEN */