diff options
Diffstat (limited to 'board/scout')
-rw-r--r-- | board/scout/board.c | 54 | ||||
-rw-r--r-- | board/scout/board.h | 5 | ||||
-rw-r--r-- | board/scout/gpio.inc | 6 | ||||
-rw-r--r-- | board/scout/led.c | 10 |
4 files changed, 62 insertions, 13 deletions
diff --git a/board/scout/board.c b/board/scout/board.c index d45b627ce1..8c9de5da64 100644 --- a/board/scout/board.c +++ b/board/scout/board.c @@ -233,12 +233,48 @@ const struct pwm_t pwm_channels[] = { /******************************************************************************/ /* I2C port map configuration */ const struct i2c_port_t i2c_ports[] = { - {"ina", I2C_PORT_INA, 400, GPIO_I2C0_SCL, GPIO_I2C0_SDA}, - {"ppc0", I2C_PORT_PPC0, 400, GPIO_I2C1_SCL, GPIO_I2C1_SDA}, - {"scaler", I2C_PORT_SCALER, 400, GPIO_I2C2_SCL, GPIO_I2C2_SDA}, - {"tcpc0", I2C_PORT_TCPC0, 400, GPIO_I2C3_SCL, GPIO_I2C3_SDA}, - {"power", I2C_PORT_POWER, 400, GPIO_I2C5_SCL, GPIO_I2C5_SDA}, - {"eeprom", I2C_PORT_EEPROM, 400, GPIO_I2C7_SCL, GPIO_I2C7_SDA}, + { + .name = "ina", + .port = I2C_PORT_INA, + .kbps = 400, + .scl = GPIO_I2C0_SCL, + .sda = GPIO_I2C0_SDA + }, + { + .name = "ppc0", + .port = I2C_PORT_PPC0, + .kbps = 400, + .scl = GPIO_I2C1_SCL, + .sda = GPIO_I2C1_SDA + }, + { + .name = "scaler", + .port = I2C_PORT_SCALER, + .kbps = 400, + .scl = GPIO_I2C2_SCL, + .sda = GPIO_I2C2_SDA + }, + { + .name = "tcpc0", + .port = I2C_PORT_TCPC0, + .kbps = 400, + .scl = GPIO_I2C3_SCL, + .sda = GPIO_I2C3_SDA + }, + { + .name = "power", + .port = I2C_PORT_POWER, + .kbps = 400, + .scl = GPIO_I2C5_SCL, + .sda = GPIO_I2C5_SDA + }, + { + .name = "eeprom", + .port = I2C_PORT_EEPROM, + .kbps = 400, + .scl = GPIO_I2C7_SCL, + .sda = GPIO_I2C7_SDA + }, }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); @@ -320,8 +356,8 @@ const struct fan_conf fan_conf_0 = { }; const struct fan_rpm fan_rpm_0 = { - .rpm_min = 2500, - .rpm_start = 2500, + .rpm_min = 2400, + .rpm_start = 2400, .rpm_max = 5300, }; @@ -519,6 +555,8 @@ void board_enable_s0_rails(int enable) gpio_set_level(GPIO_EC_CAM_V3P3_EN, enable); gpio_set_level(GPIO_PP3300_TPU_A_EN, enable); + + gpio_set_level(GPIO_EN_LOAD_SWITCH, enable); } int ec_config_get_usb4_present(void) diff --git a/board/scout/board.h b/board/scout/board.h index 5a09624b15..67b9c3bdeb 100644 --- a/board/scout/board.h +++ b/board/scout/board.h @@ -38,7 +38,7 @@ #define CONFIG_MKBP_USE_HOST_EVENT #undef CONFIG_KEYBOARD_RUNTIME_KEYS #undef CONFIG_HIBERNATE -#define CONFIG_HOSTCMD_ESPI +#define CONFIG_HOST_INTERFACE_ESPI #define CONFIG_LED_COMMON #undef CONFIG_LID_SWITCH #define CONFIG_LTO @@ -123,7 +123,7 @@ #undef CONFIG_FAN_INIT_SPEED #define CONFIG_FAN_INIT_SPEED 0 #define CONFIG_TEMP_SENSOR -#define CONFIG_TEMP_SENSOR_POWER_GPIO GPIO_EN_ROA_RAILS +#define CONFIG_TEMP_SENSOR_POWER #define CONFIG_THERMISTOR #define CONFIG_STEINHART_HART_3V3_30K9_47K_4050B #define CONFIG_THROTTLE_AP @@ -256,6 +256,7 @@ unsigned int ec_config_get_thermal_solution(void); #define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L #define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L #define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L +#define GPIO_TEMP_SENSOR_POWER GPIO_EN_ROA_RAILS #define GPIO_AC_PRESENT GPIO_BJ_ADP_PRESENT_L /* diff --git a/board/scout/gpio.inc b/board/scout/gpio.inc index 583e4159bd..fa3530a401 100644 --- a/board/scout/gpio.inc +++ b/board/scout/gpio.inc @@ -60,7 +60,7 @@ GPIO_INT(USB_A3_OC_ODL, PIN(0, 3), GPIO_INT_BOTH, port_ocp_interrupt) GPIO(EC_PCH_PWROK, PIN(0, 5), GPIO_OUT_LOW) GPIO(EC_PCH_SYS_PWROK, PIN(3, 7), GPIO_OUT_LOW) GPIO(EC_PCH_PWR_BTN_ODL, PIN(C, 1), GPIO_ODR_HIGH) -GPIO(EC_PCH_RTCRST, PIN(7, 6), GPIO_ODR_HIGH) +GPIO(EC_PCH_RTCRST, PIN(7, 6), GPIO_OUT_LOW) GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH) GPIO(EC_PROCHOT_IN_OD, PIN(3, 4), GPIO_INPUT) GPIO(EC_PROCHOT_ODL, PIN(6, 3), GPIO_ODR_HIGH) @@ -87,6 +87,7 @@ GPIO(EC_MX8M_ONOFF, PIN(9, 3), GPIO_OUT_LOW) GPIO(EC_SCALER_EN, PIN(E, 0), GPIO_OUT_LOW) GPIO(PP3300_TPU_A_EN, PIN(B, 0), GPIO_OUT_LOW) GPIO(PWR_CTRL, PIN(6, 2), GPIO_OUT_LOW) +GPIO(EN_LOAD_SWITCH, PIN(4, 2), GPIO_OUT_LOW) /* Barreljack */ GPIO(EN_PPVAR_BJ_ADP_L, PIN(0, 4), GPIO_OUT_LOW) @@ -143,7 +144,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, ADC1, ADC2, ADC4 */ +ALTERNATE(PIN_MASK(4, 0x3A), 0, MODULE_ADC, 0) /* ADC0, ADC1, ADC2, ADC4 */ ALTERNATE(PIN_MASK(E, 0x02), 0, MODULE_ADC, 0) /* ADC7 */ ALTERNATE(PIN_MASK(F, 0x01), 0, MODULE_ADC, 0) /* ADC9 */ @@ -154,7 +155,6 @@ ALTERNATE(PIN_MASK(6, 0x30), 0, MODULE_UART, 0) /* UART from EC UNUSED(PIN(1, 3)) /* EC_GP_SEL1_ODL */ UNUSED(PIN(C, 0)) /* FAN_PWM_2 */ UNUSED(PIN(8, 0)) /* LED_BLUE_L */ -UNUSED(PIN(4, 2)) /* ADC3/TEMP_SENSOR_3 */ UNUSED(PIN(C, 2)) /* A12 NC */ UNUSED(PIN(1, 2)) /* C6 NC */ UNUSED(PIN(6, 6)) /* H4 NC */ diff --git a/board/scout/led.c b/board/scout/led.c index a9f70d2d40..3066c182d1 100644 --- a/board/scout/led.c +++ b/board/scout/led.c @@ -199,6 +199,16 @@ static void led_init(void) } DECLARE_HOOK(HOOK_INIT, led_init, HOOK_PRIO_INIT_PWM + 1); +void board_led_auto_control(void) +{ + if (chipset_in_state(CHIPSET_STATE_ON)) + led_resume(); + else if (chipset_in_state(CHIPSET_STATE_SUSPEND)) + led_suspend_hook(); + else if (chipset_in_state(CHIPSET_STATE_ANY_OFF)) + led_shutdown_hook(); +} + void led_alert(int enable) { if (enable) { |