diff options
author | Andrew McRae <amcrae@google.com> | 2020-08-05 17:13:19 +1000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-06 01:57:52 +0000 |
commit | 822d58c9fd4867a37ecdddcf4b40789183584132 (patch) | |
tree | 90ddcb01f7dacc69279a62d59ea46c76b46b6347 | |
parent | 82e39fbcb5cdfd368d87ee1fce7b495e727409b3 (diff) | |
download | chrome-ec-822d58c9fd4867a37ecdddcf4b40789183584132.tar.gz |
Puff: Temperature sensor changes
The latest Puff board variants remove temperature sensor 2
and change the location of temperature sensor 1 to the SoC core.
Since one sensor has been removed, this change is backwards compatible
with previous boards (with the only exception that the location of the
sensor has changed, so the description is different). For previous
boards, the second temp sensor will be ignored.
BUG=b:162909373
TEST=Confirm that puff and variants only monitor one temp sensor.
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I0b03cbb24460a6569d36fbc6a0dab1c3c58dffbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2336350
Tested-by: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
-rw-r--r-- | board/puff/board.c | 19 | ||||
-rw-r--r-- | board/puff/board.h | 4 | ||||
-rw-r--r-- | board/puff/gpio.inc | 5 |
3 files changed, 7 insertions, 21 deletions
diff --git a/board/puff/board.c b/board/puff/board.c index 3aa156ca6b..eaea4b4259 100644 --- a/board/puff/board.c +++ b/board/puff/board.c @@ -334,28 +334,16 @@ const struct adc_t adc_channels[] = { .factor_mul = ADC_MAX_VOLT, .factor_div = ADC_READ_MAX + 1, }, - [ADC_TEMP_SENSOR_2] = { - .name = "TEMP_SENSOR_2", - .input_ch = NPCX_ADC_CH1, - .factor_mul = ADC_MAX_VOLT, - .factor_div = ADC_READ_MAX + 1, - }, }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); const struct temp_sensor_t temp_sensors[] = { - [TEMP_SENSOR_PP3300] = { - .name = "PP3300", + [TEMP_SENSOR_CORE] = { + .name = "Core", .type = TEMP_SENSOR_TYPE_BOARD, .read = get_temp_3v3_30k9_47k_4050b, .idx = ADC_TEMP_SENSOR_1, }, - [TEMP_SENSOR_PP5000] = { - .name = "PP5000", - .type = TEMP_SENSOR_TYPE_BOARD, - .read = get_temp_3v3_30k9_47k_4050b, - .idx = ADC_TEMP_SENSOR_2, - }, }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); @@ -410,8 +398,7 @@ const static struct ec_thermal_config thermal_a = { }; struct ec_thermal_config thermal_params[] = { - [TEMP_SENSOR_PP3300] = thermal_a, - [TEMP_SENSOR_PP5000] = thermal_a, + [TEMP_SENSOR_CORE] = thermal_a, }; BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); diff --git a/board/puff/board.h b/board/puff/board.h index 82b8c7f944..7f8c45be9e 100644 --- a/board/puff/board.h +++ b/board/puff/board.h @@ -192,7 +192,6 @@ enum adc_channel { ADC_VBUS, /* ADC4 */ ADC_PPVAR_IMON, /* ADC9 */ ADC_TEMP_SENSOR_1, /* ADC0 */ - ADC_TEMP_SENSOR_2, /* ADC1 */ /* Number of ADC channels */ ADC_CH_COUNT }; @@ -218,8 +217,7 @@ enum mft_channel { }; enum temp_sensor_id { - TEMP_SENSOR_PP3300, - TEMP_SENSOR_PP5000, + TEMP_SENSOR_CORE, TEMP_SENSOR_COUNT }; diff --git a/board/puff/gpio.inc b/board/puff/gpio.inc index bb43f319d2..7e62488cee 100644 --- a/board/puff/gpio.inc +++ b/board/puff/gpio.inc @@ -134,7 +134,7 @@ ALTERNATE(PIN_MASK(B, 0x80), 0, MODULE_PWM, 0) /* PWM5 - Fan 1 ALTERNATE(PIN_MASK(7, 0x08), 0, MODULE_PWM, 0) /* TA2 - Fan Tachometer */ /* ADC */ -ALTERNATE(PIN_MASK(4, 0x3E), 0, MODULE_ADC, 0) /* ADC0-4 */ +ALTERNATE(PIN_MASK(4, 0x2A), 0, MODULE_ADC, 0) /* ADC0, ADC2, ADC4 */ ALTERNATE(PIN_MASK(E, 0x02), 0, MODULE_ADC, 0) /* ADC7 */ ALTERNATE(PIN_MASK(F, 0x01), 0, MODULE_ADC, 0) /* ADC9 */ @@ -147,7 +147,8 @@ UNUSED(PIN(F, 2)) /* EC_I2C_RFU_SDA */ UNUSED(PIN(F, 3)) /* EC_I2C_RFU_SCL */ UNUSED(PIN(C, 0)) /* FAN_PWM_2 */ UNUSED(PIN(8, 0)) /* LED_BLUE_L */ -UNUSED(PIN(4, 2)) /* TEMP_SENSOR_3 */ +UNUSED(PIN(4, 4)) /* ADC1/TEMP_SENSOR_2 */ +UNUSED(PIN(4, 2)) /* ADC3/TEMP_SENSOR_3 */ UNUSED(PIN(C, 2)) /* A12 NC */ UNUSED(PIN(9, 2)) /* K8 NC */ UNUSED(PIN(9, 1)) /* L8 NC */ |