Skip to content

Commit

Permalink
Enable power switch WDT on IT8587E boards
Browse files Browse the repository at this point in the history
Enable PWRSW WDT 2 and use the default timeout of 10 seconds.

Allows forcing an EC reset in case it gets into an invalid state.

Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Jul 4, 2024
1 parent 1e02be1 commit 66afa11
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/board/system76/addw1/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ struct Gpio __code WLAN_PWR_EN = GPIO(B, 0);
// uncrustify:on

void gpio_init(void) {
// PWRSW WDT 2 Enable
GCR8 = BIT(4);

// Enable LPC reset on GPD2
GCR = 0x04;

Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/darp5/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ struct Gpio __code WLAN_PWR_EN = GPIO(J, 4);
// uncrustify:on

void gpio_init(void) {
// PWRSW WDT 2 Enable
GCR8 = BIT(4);

// Enable LPC reset on GPD2
GCR = 0x04;

Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/galp3-c/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ struct Gpio __code WLAN_PWR_EN = GPIO(J, 4);
// uncrustify:on

void gpio_init(void) {
// PWRSW WDT 2 Enable
GCR8 = BIT(4);

// Enable LPC reset on GPD2
GCR = 0x04;

Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/oryp5/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ struct Gpio __code WLAN_PWR_EN = GPIO(B, 0);
// uncrustify:on

void gpio_init(void) {
// PWRSW WDT 2 Enable
GCR8 = BIT(4);

// Enable LPC reset on GPD2
GCR = 0x04;

Expand Down

0 comments on commit 66afa11

Please sign in to comment.