summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacky Wang <jacky5_wang@pegatron.corp-partner.google.com>2021-01-07 11:19:34 +0800
committerCommit Bot <commit-bot@chromium.org>2021-01-10 16:26:27 +0000
commitb6a38f0f5cd52150a89d3d8e0ada3789d07f559e (patch)
treee6dc0c7f946781c1b6c5c69992de13fb9cf3b625
parent82e91312b0ceaff0ece097eda0ba376073011ff4 (diff)
downloadchrome-ec-b6a38f0f5cd52150a89d3d8e0ada3789d07f559e.tar.gz
galtic: Config the thermal sensor setting
Update thermal sensor configuration setting. BUG=b:176525921 BRANCH=firmware-dedede-13606.B TEST=BOARD=galtic Use "ectool temps all" to check thermal sensor temperature. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ide95e7be7d21bab979a53aa0d2b06f7a8b88cf7a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2612311 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r--board/galtic/board.c15
-rw-r--r--board/galtic/board.h2
-rw-r--r--board/galtic/gpio.inc3
3 files changed, 16 insertions, 4 deletions
diff --git a/board/galtic/board.c b/board/galtic/board.c
index 6e553176fd..91c36a198b 100644
--- a/board/galtic/board.c
+++ b/board/galtic/board.c
@@ -146,6 +146,13 @@ const struct adc_t adc_channels[] = {
.shift = 0,
.channel = CHIP_ADC_CH3
},
+ [ADC_TEMP_SENSOR_3] = {
+ .name = "TEMP_SENSOR3",
+ .factor_mul = ADC_MAX_MVOLT,
+ .factor_div = ADC_READ_MAX + 1,
+ .shift = 0,
+ .channel = CHIP_ADC_CH15
+ },
[ADC_SUB_ANALOG] = {
.name = "SUB_ANALOG",
.factor_mul = ADC_MAX_MVOLT,
@@ -598,14 +605,18 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
/* Thermistors */
const struct temp_sensor_t temp_sensors[] = {
- [TEMP_SENSOR_1] = {.name = "Memory",
+ [TEMP_SENSOR_1] = {.name = "Charger",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
.idx = ADC_TEMP_SENSOR_1},
- [TEMP_SENSOR_2] = {.name = "Ambient",
+ [TEMP_SENSOR_2] = {.name = "Vcore",
.type = TEMP_SENSOR_TYPE_BOARD,
.read = get_temp_3v3_51k1_47k_4050b,
.idx = ADC_TEMP_SENSOR_2},
+ [TEMP_SENSOR_3] = {.name = "Ambient",
+ .type = TEMP_SENSOR_TYPE_BOARD,
+ .read = get_temp_3v3_51k1_47k_4050b,
+ .idx = ADC_TEMP_SENSOR_3},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
diff --git a/board/galtic/board.h b/board/galtic/board.h
index 54471e9363..6af74c5dac 100644
--- a/board/galtic/board.h
+++ b/board/galtic/board.h
@@ -117,6 +117,7 @@ enum adc_channel {
ADC_VSNS_PP3300_A, /* ADC0 */
ADC_TEMP_SENSOR_1, /* ADC2 */
ADC_TEMP_SENSOR_2, /* ADC3 */
+ ADC_TEMP_SENSOR_3, /* ADC15 */
ADC_SUB_ANALOG, /* ADC13 */
ADC_CH_COUNT
};
@@ -124,6 +125,7 @@ enum adc_channel {
enum temp_sensor_id {
TEMP_SENSOR_1,
TEMP_SENSOR_2,
+ TEMP_SENSOR_3,
TEMP_SENSOR_COUNT
};
diff --git a/board/galtic/gpio.inc b/board/galtic/gpio.inc
index cef2d9f993..c97b2e90e9 100644
--- a/board/galtic/gpio.inc
+++ b/board/galtic/gpio.inc
@@ -94,7 +94,6 @@ GPIO(EC_AP_MKBP_INT_L, PIN(L, 5), GPIO_ODR_HIGH)
GPIO(EC_SUB_IO_1_1, PIN(L, 3), GPIO_INPUT)
GPIO(EC_SUB_IO_1_2, PIN(F, 0), GPIO_INPUT)
GPIO(EC_SUB_IO_2_1, PIN(F, 1), GPIO_INPUT)
-GPIO(EC_SUB_IO_2_2, PIN(L, 2), GPIO_INPUT)
/* Misc */
GPIO(EN_BL_OD, PIN(K, 4), GPIO_ODR_LOW)
@@ -136,7 +135,7 @@ ALTERNATE(PIN_MASK(E, BIT(0) | BIT(7)), 0, MODULE_I2C, 0) /* I2C4 */
ALTERNATE(PIN_MASK(A, BIT(4) | BIT(5)), 0, MODULE_I2C, 0) /* I2C5 */
/* ADC */
-ALTERNATE(PIN_MASK(L, BIT(0)), 0, MODULE_ADC, 0) /* ADC13: EC_SUB_ANALOG */
+ALTERNATE(PIN_MASK(L, BIT(0) | BIT(2)), 0, MODULE_ADC, 0) /* ADC13: EC_SUB_ANALOG, ADC15: TEMP_SENSOR_3 */
ALTERNATE(PIN_MASK(I, BIT(0) | BIT(2) | BIT(3)), 0, MODULE_ADC, 0) /* ADC0: EC_VSNS_PP3300_A, ADC2: TEMP_SENSOR_1, ADC3: TEMP_SENSOR_2 */
/* PWM */