Add config for using S0ix

S0ix does not require eSPI, and eSPI does not mandate S0ix.

Enable S0ix for:

- darp7 (TGL-U)
- darp8 (ADL-P)
- galp5 (TGL-U)
- galp6 (ADL-P)
- lemp10 (TGL-U)
- lemp11 (ADL-U)

It is also currently enabled on ADL-H due to a bug with S3:

- gaze17-3050
- gaze17-3060-b
- oryp9

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2022-08-04 11:09:45 -06:00
committed by Tim Crawford
parent b78631e316
commit 49abf83c08
11 changed files with 40 additions and 5 deletions

View File

@ -10,6 +10,10 @@
#include <ec/gpio.h>
#include <ec/pwm.h>
#ifndef USE_S0IX
#define USE_S0IX 0
#endif
// Fan speed is the lowest requested over HEATUP seconds
#ifndef BOARD_HEATUP
#define BOARD_HEATUP 4
@ -122,13 +126,13 @@ int16_t peci_wr_pkg_config(uint8_t index, uint16_t param, uint32_t data) {
uint8_t peci_get_fan_duty(void) {
uint8_t duty;
#if EC_ESPI
#if USE_S0IX
// Use PECI if CPU is not in C10 state
peci_on = gpio_get(&CPU_C10_GATE_N);
#else // EC_ESPI
#else // USE_S0IX
// Use PECI if in S0 state
peci_on = power_state == POWER_STATE_S0;
#endif // EC_ESPI
#endif // USE_S0IX
if (peci_on) {
// Wait for completion