Add PD_EN to oryp11 to ensure it powers off

This commit is contained in:
Jeremy Soller
2023-03-17 08:43:02 -06:00
parent 3eaa5e6e06
commit c76919b189
2 changed files with 5 additions and 2 deletions

View File

@ -24,6 +24,7 @@ struct Gpio __code LID_SW_N = GPIO(B, 1);
struct Gpio __code ME_WE = GPIO(H, 0);
struct Gpio __code PCH_DPWROK_EC = GPIO(F, 3);
struct Gpio __code PCH_PWROK_EC = GPIO(C, 6); // renamed to SYS_PWROK_EC
struct Gpio __code PD_EN = GPIO(F, 6); // renamed to PD_POWER_EN
struct Gpio __code PWR_BTN_N = GPIO(D, 5);
struct Gpio __code PWR_SW_N = GPIO(B, 3);
struct Gpio __code SLP_SUS_N = GPIO(H, 7);
@ -64,8 +65,8 @@ void gpio_init() {
GPDRD = BIT(4);
// USB_PWR_EN
GPDRE = BIT(3);
// CC_EN, PD_POWER_EN, PCH_DPWROK_EC
GPDRF = BIT(7) | BIT(6) | BIT(3);
// CC_EN, PCH_DPWROK_EC
GPDRF = BIT(7) | BIT(3);
// H_PROCHOT_EC
GPDRG = BIT(6);
GPDRH = 0;

View File

@ -30,6 +30,8 @@ extern struct Gpio __code LID_SW_N;
extern struct Gpio __code ME_WE;
extern struct Gpio __code PCH_DPWROK_EC;
extern struct Gpio __code PCH_PWROK_EC;
#define HAVE_PD_EN 1
extern struct Gpio __code PD_EN;
#define HAVE_PM_PWROK 0
extern struct Gpio __code PWR_BTN_N;
extern struct Gpio __code PWR_SW_N;