summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2022-04-27 09:52:39 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-28 23:37:58 +0000
commitcd4e03e727c1adae841b912e2971d0ee84b842f8 (patch)
treef5b8951125c5536d19d4400f816a6fb5a28933e8
parenta123436acbb7aa28bf31986beb703a3007c63d85 (diff)
downloadchrome-ec-cd4e03e727c1adae841b912e2971d0ee84b842f8.tar.gz
volteer: Enable PROCHOT gate based on C10
Enable PROCHOT gating based on the C10 state for all Volteer boards that support monitoring the C10 signal from the PCH. BUG=b:185810479 BRANCH=volteer TEST=Observer AP enters C10 state, EC skips turning on the fans. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I9adc1902b97a2a85b351c88d1d9c44ed17d1056a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615480 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r--baseboard/volteer/power.c8
-rw-r--r--board/chronicler/board.h1
-rw-r--r--board/chronicler/gpio.inc3
-rw-r--r--board/volet/board.h1
-rw-r--r--board/volet/gpio.inc2
-rw-r--r--board/volteer/board.h1
-rw-r--r--board/volteer/gpio.inc3
-rw-r--r--board/voxel/board.h1
-rw-r--r--board/voxel/gpio.inc2
9 files changed, 16 insertions, 6 deletions
diff --git a/baseboard/volteer/power.c b/baseboard/volteer/power.c
index 005319c3fa..b0d6b847ce 100644
--- a/baseboard/volteer/power.c
+++ b/baseboard/volteer/power.c
@@ -51,6 +51,10 @@ const int pwrok_signal_deassert_count = ARRAY_SIZE(pwrok_signal_deassert_list);
static const struct prochot_cfg volteer_prochot_cfg = {
.gpio_prochot_in = GPIO_EC_PROCHOT_IN_L,
+#ifdef CONFIG_CPU_PROCHOT_GATE_ON_C10
+ .gpio_c10_in = GPIO_CPU_C10_GATE_L,
+ .c10_active_high = false,
+#endif
};
static void baseboard_init(void)
@@ -58,5 +62,9 @@ static void baseboard_init(void)
/* Enable monitoring of the PROCHOT input to the EC */
throttle_ap_config_prochot(&volteer_prochot_cfg);
gpio_enable_interrupt(GPIO_EC_PROCHOT_IN_L);
+
+#ifdef CONFIG_CPU_PROCHOT_GATE_ON_C10
+ gpio_enable_interrupt(GPIO_CPU_C10_GATE_L);
+#endif
}
DECLARE_HOOK(HOOK_INIT, baseboard_init, HOOK_PRIO_DEFAULT);
diff --git a/board/chronicler/board.h b/board/chronicler/board.h
index 87d1c2a21f..4cd634ef9a 100644
--- a/board/chronicler/board.h
+++ b/board/chronicler/board.h
@@ -28,6 +28,7 @@
/* Chipset features */
#define CONFIG_POWER_PP5000_CONTROL
+#define CONFIG_CPU_PROCHOT_GATE_ON_C10
/* Sensors */
#undef CONFIG_TABLET_MODE
diff --git a/board/chronicler/gpio.inc b/board/chronicler/gpio.inc
index b85322ac6c..b8b8d4f5e7 100644
--- a/board/chronicler/gpio.inc
+++ b/board/chronicler/gpio.inc
@@ -63,6 +63,7 @@ GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH)
GPIO(EC_ENTERING_RW, PIN(E, 3), GPIO_OUT_LOW)
GPIO(EC_PROCHOT_ODL, PIN(6, 3), GPIO_ODR_HIGH)
GPIO_INT(EC_PROCHOT_IN_L, PIN(F, 0), GPIO_INT_BOTH, throttle_ap_prochot_input_interrupt)
+GPIO_INT(CPU_C10_GATE_L, PIN(6, 7), GPIO_INT_RISING, throttle_ap_c10_input_interrupt)
GPIO(SYS_RST_ODL, PIN(C, 5), GPIO_ODR_HIGH)
GPIO(EC_PCH_INT_ODL, PIN(B, 0), GPIO_ODR_HIGH)
@@ -101,7 +102,6 @@ GPIO(C1_CHARGE_LED_WHITE_L, PIN(C, 2), GPIO_OUT_HIGH) /* White C1 port */
/* Unused signals */
GPIO(CHARGER_INT_L, PIN(7, 3), GPIO_INPUT) /* Interrupt not used from ISL9241, on board pull-up */
GPIO(EC_GP_SEL0_ODL, PIN(B, 6), GPIO_OUT_LOW) /* Cannot be configured as input, drive output low, don't rely on the default setting of PxDOUT register */
-GPIO(CPU_C10_GATE_L, PIN(6, 7), GPIO_INPUT) /* Unused power sequence signal from AP. Has an on-board pull-down. */
GPIO(EN_PP5000_USB_AG, PIN(A, 7), GPIO_INPUT | GPIO_PULL_UP) /* Unconnected power sequencing signal */
GPIO(UNUSED_GPIO41, PIN(4, 1), GPIO_INPUT | GPIO_PULL_UP)
GPIO(UNUSED_GPIOF2, PIN(F, 2), GPIO_INPUT | GPIO_PULL_UP)
@@ -176,4 +176,3 @@ ALTERNATE(PIN_MASK(0, BIT(0) | BIT(1) | BIT(2)), 0, MODULE_PMU, 0) /* GPIO00 =
/* Temperature sensors */
ALTERNATE(PIN_MASK(4, BIT(2) | BIT(4) | BIT(5)), 0, MODULE_ADC, 0) /* TEMP_SENSOR1,2,4 */
ALTERNATE(PIN_MASK(F, BIT(1)), 0, MODULE_ADC, 0) /* TEMP_SENSOR3 */
-
diff --git a/board/volet/board.h b/board/volet/board.h
index 4e957c449c..c75eeed31f 100644
--- a/board/volet/board.h
+++ b/board/volet/board.h
@@ -30,6 +30,7 @@
/* Chipset features */
#define CONFIG_POWER_PP5000_CONTROL
+#define CONFIG_CPU_PROCHOT_GATE_ON_C10
/* LED defines */
#define CONFIG_LED_ONOFF_STATES
diff --git a/board/volet/gpio.inc b/board/volet/gpio.inc
index bf5377a716..16471d0817 100644
--- a/board/volet/gpio.inc
+++ b/board/volet/gpio.inc
@@ -77,10 +77,10 @@ GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH)
GPIO(EC_ENTERING_RW, PIN(E, 3), GPIO_OUT_LOW)
GPIO(EC_PROCHOT_ODL, PIN(6, 3), GPIO_ODR_HIGH)
GPIO_INT(EC_PROCHOT_IN_L, PIN(F, 0), GPIO_INT_BOTH, throttle_ap_prochot_input_interrupt)
+GPIO_INT(CPU_C10_GATE_L, PIN(6, 7), GPIO_INT_RISING, throttle_ap_c10_input_interrupt)
GPIO(SYS_RST_ODL, PIN(C, 5), GPIO_ODR_HIGH)
GPIO(EC_PCH_INT_ODL, PIN(B, 0), GPIO_ODR_HIGH)
-GPIO(CPU_C10_GATE_L, PIN(6, 7), GPIO_INPUT)
/* USB and USBC Signals */
GPIO(EN_PP5000_USBA, PIN(3, 5), GPIO_OUT_LOW) /* Enable USB-A charging - all ports */
diff --git a/board/volteer/board.h b/board/volteer/board.h
index 5d820a0db0..db8dd29be1 100644
--- a/board/volteer/board.h
+++ b/board/volteer/board.h
@@ -34,6 +34,7 @@
/* Chipset features */
#define CONFIG_POWER_PP5000_CONTROL
+#define CONFIG_CPU_PROCHOT_GATE_ON_C10
/* LED defines */
#define CONFIG_LED_PWM
diff --git a/board/volteer/gpio.inc b/board/volteer/gpio.inc
index 89cfe9c5bd..45aa5b28c4 100644
--- a/board/volteer/gpio.inc
+++ b/board/volteer/gpio.inc
@@ -77,6 +77,7 @@ GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH)
GPIO(EC_ENTERING_RW, PIN(E, 3), GPIO_OUT_LOW)
GPIO(EC_PROCHOT_ODL, PIN(6, 3), GPIO_ODR_HIGH)
GPIO_INT(EC_PROCHOT_IN_L, PIN(F, 0), GPIO_INT_BOTH, throttle_ap_prochot_input_interrupt)
+GPIO_INT(CPU_C10_GATE_L, PIN(6, 7), GPIO_INT_RISING, throttle_ap_c10_input_interrupt)
GPIO(SYS_RST_ODL, PIN(C, 5), GPIO_ODR_HIGH)
GPIO(EC_PCH_INT_ODL, PIN(B, 0), GPIO_ODR_HIGH)
@@ -109,7 +110,6 @@ GPIO(EC_SLP_S0IX, PIN(7, 2), GPIO_INPUT | GPIO_PULL_UP)
/* Unused signals */
GPIO(CHARGER_INT_L, PIN(7, 3), GPIO_INPUT) /* Interrupt not used from ISL9241, on board pull-up */
GPIO(EC_GP_SEL0_ODL, PIN(B, 6), GPIO_OUT_LOW) /* Cannot be configured as input, drive output low, don't rely on the default setting of PxDOUT register */
-GPIO(CPU_C10_GATE_L, PIN(6, 7), GPIO_INPUT) /* Unused power sequence signal from AP. Has an on-board pull-down. */
GPIO(EN_PP5000_USB_AG, PIN(A, 7), GPIO_INPUT | GPIO_PULL_UP) /* Unconnected power sequencing signal */
GPIO(UNUSED_GPIO41, PIN(4, 1), GPIO_INPUT | GPIO_PULL_UP)
GPIO(UNUSED_GPIOF2, PIN(F, 2), GPIO_INPUT | GPIO_PULL_UP)
@@ -185,4 +185,3 @@ ALTERNATE(PIN_MASK(0, BIT(0) | BIT(1) | BIT(2)), 0, MODULE_PMU, 0) /* GPIO00 =
/* Temperature sensors */
ALTERNATE(PIN_MASK(4, BIT(2) | BIT(4) | BIT(5)), 0, MODULE_ADC, 0) /* TEMP_SENSOR1,2,4 */
ALTERNATE(PIN_MASK(F, BIT(1)), 0, MODULE_ADC, 0) /* TEMP_SENSOR3 */
-
diff --git a/board/voxel/board.h b/board/voxel/board.h
index a672cf8bc1..cd2ec0ef1f 100644
--- a/board/voxel/board.h
+++ b/board/voxel/board.h
@@ -30,6 +30,7 @@
/* Chipset features */
#define CONFIG_POWER_PP5000_CONTROL
+#define CONFIG_CPU_PROCHOT_GATE_ON_C10
/* LED defines */
#define CONFIG_LED_ONOFF_STATES
diff --git a/board/voxel/gpio.inc b/board/voxel/gpio.inc
index 5c16ff02bc..3b0c04d21d 100644
--- a/board/voxel/gpio.inc
+++ b/board/voxel/gpio.inc
@@ -77,10 +77,10 @@ GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH)
GPIO(EC_ENTERING_RW, PIN(E, 3), GPIO_OUT_LOW)
GPIO(EC_PROCHOT_ODL, PIN(6, 3), GPIO_ODR_HIGH)
GPIO_INT(EC_PROCHOT_IN_L, PIN(F, 0), GPIO_INT_BOTH, throttle_ap_prochot_input_interrupt)
+GPIO_INT(CPU_C10_GATE_L, PIN(6, 7), GPIO_INT_RISING, throttle_ap_c10_input_interrupt)
GPIO(SYS_RST_ODL, PIN(C, 5), GPIO_ODR_HIGH)
GPIO(EC_PCH_INT_ODL, PIN(B, 0), GPIO_ODR_HIGH)
-GPIO(CPU_C10_GATE_L, PIN(6, 7), GPIO_INPUT)
/* USB and USBC Signals */
GPIO(EN_PP5000_USBA, PIN(3, 5), GPIO_OUT_LOW) /* Enable USB-A charging - all ports */