New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 712746 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature



Sign in to add a comment

EC: Sustain PD contract between sysjumps

Project Member Reported by dnojiri@chromium.org, Apr 18 2017

Issue description

Currently, when EC sysjumps to another image, tcpm starts from the default states. This upsets some type-c adapters, causing the adapter to issue a hard reset. On battery-less systems, this causes the system to brown out.

We can store tcpm states in a jumptag before sysjump and restore them after sysjump.
 
Cc: rspangler@chromium.org vpalatin@chromium.org
Labels: OS-Chrome

Comment 2 by vpalatin@google.com, Apr 20 2017

> We can store tcpm states in a jumptag before sysjump and restore them after sysjump.

'TCPM' state is somewhat large and ill-defined (including GPIO states ...) and you need to re-sync your TCPCs.
Project Member

Comment 3 by sheriffbot@chromium.org, Apr 23 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/da3b7696a41ad15981c5a954f0c0f562c1719a52

commit da3b7696a41ad15981c5a954f0c0f562c1719a52
Author: Aseda Aboagye <aaboagye@google.com>
Date: Thu Apr 26 06:00:02 2018

USB PD: Send SoftReset if in explicit contract at init.

Currently, if a board supports dual role power ports, the EC will
briefly apply Rp resistors on the CC lines upon initializing the PD
tasks.  This was put in place such that the partner port is a known
state.  In the case of an external PD charger, the presence of the Rp
will cause the charger to stop sourcing VBUS.  We only apply the pull up
for reset cases where the EC did not just loose power (e.g. power on
reset or brownout).

This however presents a problem when booting off of AC only.  If a user
types 'reboot ap-off', there will be an extra reset because VBUS is
dropped and the "ap-off" flag will be lost.

This commit simply checks to see if there is an explicit contract in
place for a port.  If an explicit contract is in place and PD
communications are allowed, we will not apply the Rp resistors.  The PD
state machine will then attempt to send a SoftReset to the port partner
in order to reset the PD protocol layer.  If an explicit contract is not
in place, or if PD communications are not allowed, the Rp's will be
asserted briefly as before.

BUG=b:72838807,b:35587129, chromium:712746 
BRANCH=None
TEST=Flash zoombini; Remove battery and plug in just AC; Enter `reboot
ap-off` and verify that AP remains off in the subsequent boot and there
is no extra reset.
TEST=Make zoombini locked.  Have a PD contract in RW, reboot to RO and
verify that VBUS is dropped from a PD charger.
TEST=Repeat test on meowth.

CQ-DEPEND=CL:905922

Change-Id: Ie2e3fe5b6b318e166b2a42dfa3241646369ec571
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/905390
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>

[modify] https://crrev.com/da3b7696a41ad15981c5a954f0c0f562c1719a52/common/usb_pd_protocol.c

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 27 2018

Labels: merge-merged-firmware-scarlet-10388.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/c10395930f5bb0bdcfb81d82c073d9deaf19e4fb

commit c10395930f5bb0bdcfb81d82c073d9deaf19e4fb
Author: Aseda Aboagye <aaboagye@google.com>
Date: Fri Apr 27 23:04:49 2018

USB PD: Send SoftReset if in explicit contract at init.

Currently, if a board supports dual role power ports, the EC will
briefly apply Rp resistors on the CC lines upon initializing the PD
tasks.  This was put in place such that the partner port is a known
state.  In the case of an external PD charger, the presence of the Rp
will cause the charger to stop sourcing VBUS.  We only apply the pull up
for reset cases where the EC did not just loose power (e.g. power on
reset or brownout).

This however presents a problem when booting off of AC only.  If a user
types 'reboot ap-off', there will be an extra reset because VBUS is
dropped and the "ap-off" flag will be lost.

This commit simply checks to see if there is an explicit contract in
place for a port.  If an explicit contract is in place and PD
communications are allowed, we will not apply the Rp resistors.  The PD
state machine will then attempt to send a SoftReset to the port partner
in order to reset the PD protocol layer.  If an explicit contract is not
in place, or if PD communications are not allowed, the Rp's will be
asserted briefly as before.

BUG=b:72838807,b:35587129, chromium:712746 
BRANCH=None
TEST=Flash zoombini; Remove battery and plug in just AC; Enter `reboot
ap-off` and verify that AP remains off in the subsequent boot and there
is no extra reset.
TEST=Make zoombini locked.  Have a PD contract in RW, reboot to RO and
verify that VBUS is dropped from a PD charger.
TEST=Repeat test on meowth.

CQ-DEPEND=CL:905922

Change-Id: Ie2e3fe5b6b318e166b2a42dfa3241646369ec571
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/905390
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
(cherry picked from commit da3b7696a41ad15981c5a954f0c0f562c1719a52)
Reviewed-on: https://chromium-review.googlesource.com/1033367
Reviewed-by: Philip Chen <philipchen@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>

[modify] https://crrev.com/c10395930f5bb0bdcfb81d82c073d9deaf19e4fb/common/usb_pd_protocol.c

Project Member

Comment 6 by bugdroid1@chromium.org, May 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/a12d6d5f39257b67278cf447a559f8b7ad090383

commit a12d6d5f39257b67278cf447a559f8b7ad090383
Author: Philip Chen <philipchen@chromium.org>
Date: Mon May 14 21:55:17 2018

Revert "USB PD: Send SoftReset if in explicit contract at init."

This reverts commit c10395930f5bb0bdcfb81d82c073d9deaf19e4fb.

Reason for revert: b:79693334

Original change's description:
> USB PD: Send SoftReset if in explicit contract at init.
> 
> Currently, if a board supports dual role power ports, the EC will
> briefly apply Rp resistors on the CC lines upon initializing the PD
> tasks.  This was put in place such that the partner port is a known
> state.  In the case of an external PD charger, the presence of the Rp
> will cause the charger to stop sourcing VBUS.  We only apply the pull up
> for reset cases where the EC did not just loose power (e.g. power on
> reset or brownout).
> 
> This however presents a problem when booting off of AC only.  If a user
> types 'reboot ap-off', there will be an extra reset because VBUS is
> dropped and the "ap-off" flag will be lost.
> 
> This commit simply checks to see if there is an explicit contract in
> place for a port.  If an explicit contract is in place and PD
> communications are allowed, we will not apply the Rp resistors.  The PD
> state machine will then attempt to send a SoftReset to the port partner
> in order to reset the PD protocol layer.  If an explicit contract is not
> in place, or if PD communications are not allowed, the Rp's will be
> asserted briefly as before.
> 
> BUG=b:72838807,b:35587129, chromium:712746 
> BRANCH=None
> TEST=Flash zoombini; Remove battery and plug in just AC; Enter `reboot
> ap-off` and verify that AP remains off in the subsequent boot and there
> is no extra reset.
> TEST=Make zoombini locked.  Have a PD contract in RW, reboot to RO and
> verify that VBUS is dropped from a PD charger.
> TEST=Repeat test on meowth.
> 
> CQ-DEPEND=CL:905922
> 
> Change-Id: Ie2e3fe5b6b318e166b2a42dfa3241646369ec571
> Signed-off-by: Aseda Aboagye <aaboagye@google.com>
> Reviewed-on: https://chromium-review.googlesource.com/905390
> Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
> Reviewed-by: Jett Rink <jettrink@chromium.org>
> (cherry picked from commit da3b7696a41ad15981c5a954f0c0f562c1719a52)
> Reviewed-on: https://chromium-review.googlesource.com/1033367
> Reviewed-by: Philip Chen <philipchen@chromium.org>
> Commit-Queue: Philip Chen <philipchen@chromium.org>
> Tested-by: Philip Chen <philipchen@chromium.org>

Bug: b:72838807, b:35587129,  chromium:712746 
Change-Id: Ib91d08718a6ceee3da6f978b53f87968a9cb7b0c
Reviewed-on: https://chromium-review.googlesource.com/1057530
Reviewed-by: Philip Chen <philipchen@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Trybot-Ready: Philip Chen <philipchen@chromium.org>

[modify] https://crrev.com/a12d6d5f39257b67278cf447a559f8b7ad090383/common/usb_pd_protocol.c

Owner: aaboagye@chromium.org
Status: Assigned (was: Untriaged)
Status: Fixed (was: Assigned)

Sign in to add a comment