Peter Marheine has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on EC MKBP interrupts ......................................................................
mb/google/zork: enable wake on EC MKBP interrupts
The EC generates EC_MKBP_EVENT_DP_ALT_MODE_ENTERED when USB-C connections enter DP alt mode, which should wake the system from S3. The EC signals these events via falling edge on EC_AP_INT_ODL, so this GPIO should be configured as a wake source.
BUG=b:174121852 BRANCH=zork TEST=Manually-generated MKBP event (via EC console) wakes AP from S3.
Change-Id: I8100c6253e8e5cae91586c4f2f45d66c15fecc6d Signed-off-by: Peter Marheine pmarheine@chromium.org --- M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/48844/1
diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c index a2ad517..1a026e2 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c +++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c @@ -69,8 +69,8 @@ PAD_GPI(GPIO_29, PULL_NONE), /* FCH_ESPI_EC_CS_L */ PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE), - /* EC_AP_INT_ODL (Sensor Framesync) */ - PAD_GPI(GPIO_31, PULL_NONE), + /* EC_AP_INT_ODL (mkbp interrupt) */ + PAD_WAKE(GPIO_31, PULL_NONE, EDGE_LOW, S3), /* GPIO_33 - GPIO_39: Not available */ /* NVME_AUX_RESET_L */ PAD_GPO(GPIO_40, HIGH),
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on EC MKBP interrupts ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48844/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/48844/1//COMMIT_MSG@11 PS1, Line 11: EC_AP_INT_ODL EC_AP_INT_ODL is primarily for sensor interrupts in S0 (if required for tight timestamps). All wakes from EC to host happen via GPIO_24 (EC_FCH_WAKE_L). I don't think we need two wake routes from EC to AP. Instead the appropriate wake mask must be set for the respective host event in MAINBOARD_EC_S3_WAKE_EVENTS.
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on EC MKBP interrupts ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48844/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/48844/1//COMMIT_MSG@11 PS1, Line 11: EC_AP_INT_ODL
EC_AP_INT_ODL is primarily for sensor interrupts in S0 (if required for tight timestamps). […]
The EC doesn't currently generate a host event for this, but I'll see what I can do; this change as-is seemed like a weird hack.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on EC MKBP interrupts ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48844/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/48844/1//COMMIT_MSG@11 PS1, Line 11: EC_AP_INT_ODL
The EC doesn't currently generate a host event for this, but I'll see what I can do; this change as- […]
EC_HOST_EVENT_MKBP can be used for that. Reference: https://review.coreboot.org/c/coreboot/+/38735
Frank Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on EC MKBP interrupts ......................................................................
Patch Set 1:
Hi Peter,
Based on the test result in https://partnerissuetracker.corp.google.com/issues/174121852#comment29, it would be modified in baseboard_dalboz as well.
Would you update the gpio for baseboard_dalboz? Thank you.
Hello build bot (Jenkins), Kangheui Won,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48844
to look at the new patch set (#2).
Change subject: mb/google/zork: enable wake on MKBP events ......................................................................
mb/google/zork: enable wake on MKBP events
The EC generates EC_MKBP_EVENT_DP_ALT_MODE_ENTERED when USB-C connections enter DP alt mode, which should wake the system from S3. Configure S3 wake events to include MKBP so this actually wakes the system.
BUG=b:174121852 BRANCH=zork TEST=???
Change-Id: I8100c6253e8e5cae91586c4f2f45d66c15fecc6d Signed-off-by: Peter Marheine pmarheine@chromium.org --- M src/mainboard/google/zork/variants/baseboard/include/baseboard/ec.h 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/48844/2
Hello build bot (Jenkins), Kangheui Won,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48844
to look at the new patch set (#3).
Change subject: mb/google/zork: enable wake on MKBP events ......................................................................
mb/google/zork: enable wake on MKBP events
The EC generates EC_MKBP_EVENT_DP_ALT_MODE_ENTERED when USB-C connections enter DP alt mode, which should wake the system from S3. Configure S3 wake events to include MKBP so this actually wakes the system.
BUG=b:174121852 BRANCH=zork TEST=Generating DP event on MKBP via EC console wakes morphius
Change-Id: I8100c6253e8e5cae91586c4f2f45d66c15fecc6d Signed-off-by: Peter Marheine pmarheine@chromium.org --- M src/mainboard/google/zork/variants/baseboard/include/baseboard/ec.h M src/mainboard/google/zork/variants/morphius/include/variant/ec.h 2 files changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/48844/3
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on MKBP events ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48844/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/48844/1//COMMIT_MSG@11 PS1, Line 11: EC_AP_INT_ODL
EC_HOST_EVENT_MKBP can be used for that. Reference: https://review.coreboot. […]
It took a few days to work out that this didn't seem to be working because Morphius overrides the baseboard setting. 😐
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on MKBP events ......................................................................
Patch Set 3: Code-Review+2
Kangheui Won has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on MKBP events ......................................................................
Patch Set 3: Code-Review+2
Sam McNally has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on MKBP events ......................................................................
Patch Set 3: Code-Review+2
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on MKBP events ......................................................................
Patch Set 3: Code-Review+2
Karthik Ramasubramanian has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48844 )
Change subject: mb/google/zork: enable wake on MKBP events ......................................................................
mb/google/zork: enable wake on MKBP events
The EC generates EC_MKBP_EVENT_DP_ALT_MODE_ENTERED when USB-C connections enter DP alt mode, which should wake the system from S3. Configure S3 wake events to include MKBP so this actually wakes the system.
BUG=b:174121852 BRANCH=zork TEST=Generating DP event on MKBP via EC console wakes morphius
Change-Id: I8100c6253e8e5cae91586c4f2f45d66c15fecc6d Signed-off-by: Peter Marheine pmarheine@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/48844 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: EricR Lai ericr_lai@compal.corp-partner.google.com Reviewed-by: Kangheui Won khwon@chromium.org Reviewed-by: Sam McNally sammc@google.com Reviewed-by: Martin Roth martinroth@google.com --- M src/mainboard/google/zork/variants/baseboard/include/baseboard/ec.h M src/mainboard/google/zork/variants/morphius/include/variant/ec.h 2 files changed, 4 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved EricR Lai: Looks good to me, approved Kangheui Won: Looks good to me, approved Sam McNally: Looks good to me, approved
diff --git a/src/mainboard/google/zork/variants/baseboard/include/baseboard/ec.h b/src/mainboard/google/zork/variants/baseboard/include/baseboard/ec.h index dc06a78..46177fc 100644 --- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/ec.h +++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/ec.h @@ -38,7 +38,8 @@ #define MAINBOARD_EC_S3_WAKE_EVENTS \ (MAINBOARD_EC_S5_WAKE_EVENTS |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED) |\ - EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE)) + EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE) |\ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP))
/* Log EC wake events plus EC shutdown events */ #define MAINBOARD_EC_LOG_EVENTS \ diff --git a/src/mainboard/google/zork/variants/morphius/include/variant/ec.h b/src/mainboard/google/zork/variants/morphius/include/variant/ec.h index 3afa327..3564d54 100644 --- a/src/mainboard/google/zork/variants/morphius/include/variant/ec.h +++ b/src/mainboard/google/zork/variants/morphius/include/variant/ec.h @@ -14,7 +14,8 @@ (MAINBOARD_EC_S5_WAKE_EVENTS |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_DEVICE) |\ - EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE)) + EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE) | \ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP)) /* Enable trackpoint S3 wakeups */ #define MAINBOARD_EC_S3_DEVICE_EVENTS \ (EC_DEVICE_EVENT_MASK(EC_DEVICE_EVENT_TRACKPAD))