Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
mb/google/zork: Power off fingerprint sensor on shutdown
When the system shuts down, turn the fingerprint sensor off. This sets the GPIOs correctly for the next boot. The fingerprint sensor was previously left on, and was just powering down when the rails went low.
On suspend, the fingerprint sensor stays awake and puts itself in a low powerstate mode based on the SLP_Sx_L pin states.
BUG=b:171837716 TEST=Fingerprint sensor still works after S3, GPIO state on the boot following a shutdown is low. BRANCH=Zork
Signed-off-by: Martin Roth martinroth@chromium.org Change-Id: I4b292181d67c08c20fa4c473b363cfe2f934bff0
Change-Id: I3837b58372d8f4a504535e76bd21c667d68f8995 --- M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c 1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/47311/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 bf27622..389ff5b 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c +++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c @@ -337,8 +337,25 @@ PAD_GPO(GPIO_76, LOW), };
+static const struct soc_amd_gpio gpio_fp_shutdown_table[] = { + /* NVME_AUX_RESET_L */ + PAD_GPO(GPIO_40, LOW), + /* EN_PWR_CAMERA */ + PAD_GPO(GPIO_76, LOW), + + /* FPMCU_RST_L */ + PAD_GPO(GPIO_11, LOW), + /* EN_PWR_FP */ + PAD_GPO(GPIO_32, LOW), +}; + const __weak struct soc_amd_gpio *variant_sleep_gpio_table(size_t *size, int slp_typ) { + if (slp_typ == SLP_TYP_S5) { + *size = ARRAY_SIZE(gpio_fp_shutdown_table); + return gpio_fp_shutdown_table; + } + *size = ARRAY_SIZE(gpio_sleep_table); return gpio_sleep_table; }
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47311
to look at the new patch set (#3).
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
mb/google/zork: Power off fingerprint sensor on shutdown
When the system shuts down, turn the fingerprint sensor off. This sets the GPIOs correctly for the next boot. The fingerprint sensor was previously left on, and was just powering down when the rails went low.
On suspend, the fingerprint sensor stays awake and puts itself in a low powerstate mode based on the SLP_Sx_L pin states.
BUG=b:171837716 TEST=Fingerprint sensor still works after S3, GPIO state on the boot following a shutdown is low. BRANCH=Zork
Signed-off-by: Martin Roth martinroth@chromium.org Change-Id: I3837b58372d8f4a504535e76bd21c667d68f8995 --- M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c 1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/47311/3
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... PS3, Line 354: if (slp_typ == SLP_TYP_S5) { I think this can be handled on the boot-up path. Currently, you have a check to configure the pads as GPO low when the device reboots. Instead it can be done for all paths which are not resuming from S3. Then you don't need the conditional here.
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... PS3, Line 354: if (slp_typ == SLP_TYP_S5) {
I think this can be handled on the boot-up path. […]
The request from the fingerprint team was to take these low at shutdown. If they decide that's not needed, I'm happy to change it.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
Patch Set 8: Code-Review+2
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... PS3, Line 354: if (slp_typ == SLP_TYP_S5) {
The request from the fingerprint team was to take these low at shutdown. […]
The fingerprint team has said that this shutdown is desired, although not required. Since this matches what's being done on the intel board, I think it makes sense to leave it in.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... PS3, Line 354: if (slp_typ == SLP_TYP_S5) {
The fingerprint team has said that this shutdown is desired, although not required. […]
Quick question: Is there external PD on the GPIO_11 signal? If yes, then you don't need this setting at all. All GPIOs are reset on any kind of SoC reset. It guarantees that the pad state is set to default. So, as long as there is an external strong PD on the EN_PWR_FP pin, this configuration is not really required.
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... PS3, Line 354: if (slp_typ == SLP_TYP_S5) {
Quick question: Is there external PD on the GPIO_11 signal? If yes, then you don't need this setting […]
No, there isn't a pulldown. There's actually a pull-up, but it's PP3300_FPMCU
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... PS3, Line 354: if (slp_typ == SLP_TYP_S5) {
No, there isn't a pulldown. […]
What do you think Furquan?
I agree with you that this patch isn't critical as everything will lose power on a shutdown eventually. Personally, I'm inclined to merge it since the fingerprint guys would like it, but if you'd still rather we didn't, I'm fine with that too.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/47311/3/src/mainboard/google/zork/v... PS3, Line 354: if (slp_typ == SLP_TYP_S5) {
What do you think Furquan? […]
Sorry, I missed posting an update here last week. I talked to Michael and he confirmed that zork devices have external pull-downs to ensure that the signals are driven low in case of reset (where the pads go back to their default state). I don't want to block this change from going in if it is required, but I think it would be good to evaluate if the weak pull down serves the purpose of ensuring that the signal is pulled low on reset. It also gets rid of the requirement of configuring the pads as GPO driven low early in bootblock. Can you please check on that and fix the flow as a follow-up if required.
Marking as resolved to continue landing this patch for now.
Paul Fagerburg has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47311 )
Change subject: mb/google/zork: Power off fingerprint sensor on shutdown ......................................................................
mb/google/zork: Power off fingerprint sensor on shutdown
When the system shuts down, turn the fingerprint sensor off. This sets the GPIOs correctly for the next boot. The fingerprint sensor was previously left on, and was just powering down when the rails went low.
On suspend, the fingerprint sensor stays awake and puts itself in a low powerstate mode based on the SLP_Sx_L pin states.
BUG=b:171837716 TEST=Fingerprint sensor still works after S3, GPIO state on the boot following a shutdown is low. BRANCH=Zork
Signed-off-by: Martin Roth martinroth@chromium.org Change-Id: I3837b58372d8f4a504535e76bd21c667d68f8995 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47311 Reviewed-by: Furquan Shaikh furquan@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c 1 file changed, 17 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
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 9e980db..14b85b0 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c +++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c @@ -350,8 +350,25 @@ PAD_GPO(GPIO_76, LOW), };
+static const struct soc_amd_gpio gpio_fp_shutdown_table[] = { + /* NVME_AUX_RESET_L */ + PAD_GPO(GPIO_40, LOW), + /* EN_PWR_CAMERA */ + PAD_GPO(GPIO_76, LOW), + + /* FPMCU_RST_L */ + PAD_GPO(GPIO_11, LOW), + /* EN_PWR_FP */ + PAD_GPO(GPIO_32, LOW), +}; + const __weak struct soc_amd_gpio *variant_sleep_gpio_table(size_t *size, int slp_typ) { + if (slp_typ == SLP_TYP_S5) { + *size = ARRAY_SIZE(gpio_fp_shutdown_table); + return gpio_fp_shutdown_table; + } + *size = ARRAY_SIZE(gpio_sleep_table); return gpio_sleep_table; }