EC: Sustain PD contract between sysjumps |
|||||
Issue descriptionCurrently, 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.
,
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.
,
Apr 23 2018
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
,
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
,
Apr 27 2018
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
,
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
,
Nov 2
,
Nov 2
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dnojiri@chromium.org
, Apr 18 2017Labels: OS-Chrome