diff options
Diffstat (limited to 'board/woomax/board.c')
-rw-r--r-- | board/woomax/board.c | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/board/woomax/board.c b/board/woomax/board.c index e142b4fe1c..16b9bd38e4 100644 --- a/board/woomax/board.c +++ b/board/woomax/board.c @@ -14,6 +14,7 @@ #include "driver/accel_kx022.h" #include "driver/retimer/pi3dpx1207.h" #include "driver/retimer/ps8811.h" +#include "driver/temp_sensor/sb_tsi.h" #include "driver/usb_mux/amd_fp5.h" #include "extpower.h" #include "fan.h" @@ -128,8 +129,28 @@ unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); #endif /* HAS_TASK_MOTIONSENSE */ const struct power_signal_info power_signal_list[] = { + [X86_SLP_S3_N] = { + .gpio = GPIO_PCH_SLP_S3_L, + .flags = POWER_SIGNAL_ACTIVE_HIGH, + .name = "SLP_S3_DEASSERTED", + }, + [X86_SLP_S5_N] = { + .gpio = GPIO_PCH_SLP_S5_L, + .flags = POWER_SIGNAL_ACTIVE_HIGH, + .name = "SLP_S5_DEASSERTED", + }, + [X86_S0_PGOOD] = { + .gpio = GPIO_S0_PGOOD, + .flags = POWER_SIGNAL_ACTIVE_HIGH, + .name = "S0_PGOOD", + }, + [X86_S5_PGOOD] = { + .gpio = GPIO_S5_PGOOD, + .flags = POWER_SIGNAL_ACTIVE_HIGH, + .name = "S5_PGOOD", + }, }; -/* BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); */ +BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); const struct pwm_t pwm_channels[] = { [PWM_CH_KBLIGHT] = { @@ -349,12 +370,44 @@ const struct fan_t fans[] = { BUILD_ASSERT(ARRAY_SIZE(fans) == FAN_CH_COUNT); const struct adc_t adc_channels[] = { + [ADC_TEMP_SENSOR_CHARGER] = { + .name = "CHARGER", + .input_ch = NPCX_ADC_CH2, + .factor_mul = ADC_MAX_VOLT, + .factor_div = ADC_READ_MAX + 1, + .shift = 0, + }, + [ADC_TEMP_SENSOR_SOC] = { + .name = "SOC", + .input_ch = NPCX_ADC_CH3, + .factor_mul = ADC_MAX_VOLT, + .factor_div = ADC_READ_MAX + 1, + .shift = 0, + }, }; -/* BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); */ +BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); const struct temp_sensor_t temp_sensors[] = { + [TEMP_SENSOR_CHARGER] = { + .name = "Charger", + .type = TEMP_SENSOR_TYPE_BOARD, + .read = board_get_temp, + .idx = TEMP_SENSOR_CHARGER, + }, + [TEMP_SENSOR_SOC] = { + .name = "SOC", + .type = TEMP_SENSOR_TYPE_BOARD, + .read = board_get_temp, + .idx = TEMP_SENSOR_SOC, + }, + [TEMP_SENSOR_CPU] = { + .name = "CPU", + .type = TEMP_SENSOR_TYPE_CPU, + .read = sb_tsi_get_val, + .idx = 0, + }, }; -/* BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); */ +BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); const static struct ec_thermal_config thermal_thermistor = { .temp_host = { |