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

Issue 780905 link

Starred by 5 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Dec 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

usb-pd: USB data disconnecting on power swap

Project Member Reported by sha...@chromium.org, Nov 2 2017

Issue description

Moving b/35559452 public for additional discussion with partners.

USB data lines should not disconnect on a power swap. If a USB-C device is attached to a chromebook, and that device is externally powered (eg. a phone) or has a cap to survive temporary VBUS loss (eg. some hubs) then we expect USB data to continue uninterrupted, we should not see devices re-enumerate.

Our original pi3usb9281 switches automatically opened on loss of VBUS, but even after using a new revision of the part (w/ EC FW patches to support leaving switches closed on VBUS loss), we still saw re-enumeration on power swap. We now have designs without pi3usb9281, and we're still seeing failure.

It's not clear why USB data is getting disconnected, but bleung@ has some data to share, and maybe a theory that certain host controllers are misbehaving.
 
Cc: bleung@google.com
Owner: sha...@chromium.org
Status: assigned (was: Untriaged)
I believe Shawnn@ made some progress on this today on a Kevin with a Rohm charger.

Shawn, correct me if I'm wrong, but you mentioned that you had found that the Rohm had some setting for gates on the D+/D- (and also BC 1.2 detection) that was affecting us during PR_SWAPs.
Yes, we're setting the D+/D- switches to "auto", which causes them to open during BC1.2 detection (which always occurs on VBUS rise). We've confirmed that it's possible to keep these switches closed, which avoids the disconnect on power swap. I've contacted Rohm for more info, and I'm working on some changes to skip BC1.2 detection during power swap and keep the switches closed throughout.
Thanks Shawn!

Let me know when there are some changes that we can pick over to an Eve or a Reef firmware so we can try to get the same good result some other systems that have a similar architecture.
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 7 2017

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

commit fee1bde58def62ff7cbd40e060844c0cc496a032
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Tue Nov 07 20:17:44 2017

pd: Add pd_capable() to check PD capability of partner port

It's undesirable to do BC1.2 detection on power swap, so add a function
to check if the partner port is known to be PD-capable.

BUG= chromium:780905 
BRANCH=gru
TEST=With subsequent CL, attach USB-PD phone capable of role swap.
Verify USB 2.0 device is enumerated on plug, and not re-enumerated
through a series of "pd # swap power" commands on the EC console. Also
verify BC1.2 charging and PD charging are still functional on kevin.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ifa75c94e9758d3e407492bbda6fc52ed7bc378fa
Reviewed-on: https://chromium-review.googlesource.com/755877
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>

[modify] https://crrev.com/fee1bde58def62ff7cbd40e060844c0cc496a032/include/usb_pd.h
[modify] https://crrev.com/fee1bde58def62ff7cbd40e060844c0cc496a032/common/usb_pd_protocol.c

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 7 2017

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

commit 0354ad02cba910c90fd0c0e622c3b0b698802a1c
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Tue Nov 07 23:25:22 2017

bd9995x: Leave USB data switches closed on PD power swap

In order for BC1.2 detection to succeed, USB data switches must be
open. Previously we performed BC1.2 detection whenever VBUS transitioned
up to 5V, including on power swap. In fact, there is no need to do BC1.2
detection on a PD-capable port, since we will always charge using the
USB-C or PD negotiated ILIM. Skip BC1.2 detection on power swap (and
more generally when a partner port is known to speak PD) by manually
triggering BC1.2 detection. In addition, manage USB switch state
differently, so that "auto mode" is only enabled during BC1.2 detection.

BUG= chromium:780905 
BRANCH=gru
TEST=Attach USB-PD phone capable of role swap. Verify USB 2.0 device is
enumerated on plug, and not re-enumerated through a series of
"pd # swap power" commands on the EC console. Also verify BC1.2 charging
and PD charging are still functional on kevin.

Change-Id: I1d7d4dee3bc8d2e7885e7adb49ded84b4f515ad5
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/755878
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>

[modify] https://crrev.com/0354ad02cba910c90fd0c0e622c3b0b698802a1c/driver/charger/bd9995x.h
[modify] https://crrev.com/0354ad02cba910c90fd0c0e622c3b0b698802a1c/driver/charger/bd9995x.c

Comment 6 by bleung@chromium.org, Nov 17 2017

Cc: tbroch@chromium.org
Project Member

Comment 7 by bugdroid1@chromium.org, Feb 12 2018

Labels: merge-merged-firmware-eve-9584.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/26828c3c3c55673e10bfdd5eee244a5206a1c04f

commit 26828c3c3c55673e10bfdd5eee244a5206a1c04f
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Mon Feb 12 19:49:21 2018

bd9995x: Leave USB data switches closed on PD power swap

In order for BC1.2 detection to succeed, USB data switches must be
open. Previously we performed BC1.2 detection whenever VBUS transitioned
up to 5V, including on power swap. In fact, there is no need to do BC1.2
detection on a PD-capable port, since we will always charge using the
USB-C or PD negotiated ILIM. Skip BC1.2 detection on power swap (and
more generally when a partner port is known to speak PD) by manually
triggering BC1.2 detection. In addition, manage USB switch state
differently, so that "auto mode" is only enabled during BC1.2 detection.

BUG= chromium:780905 
BRANCH=gru
TEST=Attach USB-PD phone capable of role swap. Verify USB 2.0 device is
enumerated on plug, and not re-enumerated through a series of
"pd # swap power" commands on the EC console. Also verify BC1.2 charging
and PD charging are still functional on kevin.

Change-Id: I53a0c0b72a439524b9726713018c607425451ff1
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Original-Commit-Id: 0354ad02cba910c90fd0c0e622c3b0b698802a1c
Original-Change-Id: I1d7d4dee3bc8d2e7885e7adb49ded84b4f515ad5
Original-Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/755878
Original-Commit-Ready: Shawn N <shawnn@chromium.org>
Original-Tested-by: Shawn N <shawnn@chromium.org>
Original-Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/914644

[modify] https://crrev.com/26828c3c3c55673e10bfdd5eee244a5206a1c04f/driver/charger/bd9995x.h
[modify] https://crrev.com/26828c3c3c55673e10bfdd5eee244a5206a1c04f/driver/charger/bd9995x.c

Project Member

Comment 8 by bugdroid1@chromium.org, Feb 12 2018

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

commit 7305c29756e0d468fe4654b1567ec7e60b5f2d60
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Mon Feb 12 19:49:25 2018

pd: Add pd_capable() to check PD capability of partner port

It's undesirable to do BC1.2 detection on power swap, so add a function
to check if the partner port is known to be PD-capable.

BUG= chromium:780905 
BRANCH=gru
TEST=With subsequent CL, attach USB-PD phone capable of role swap.
Verify USB 2.0 device is enumerated on plug, and not re-enumerated
through a series of "pd # swap power" commands on the EC console. Also
verify BC1.2 charging and PD charging are still functional on kevin.

Change-Id: I4b775506beadb66e170b34a8acedf69a8a5dcf3d
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Original-Commit-Id: fee1bde58def62ff7cbd40e060844c0cc496a032
Original-Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Original-Change-Id: Ifa75c94e9758d3e407492bbda6fc52ed7bc378fa
Original-Reviewed-on: https://chromium-review.googlesource.com/755877
Original-Commit-Ready: Shawn N <shawnn@chromium.org>
Original-Tested-by: Shawn N <shawnn@chromium.org>
Original-Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/914648

[modify] https://crrev.com/7305c29756e0d468fe4654b1567ec7e60b5f2d60/include/usb_pd.h
[modify] https://crrev.com/7305c29756e0d468fe4654b1567ec7e60b5f2d60/common/usb_pd_protocol.c

Hello!
This bug is receiving this notice because there has been no acknowledgment of its existence in quite a bit of time.
- If you are currently working on this bug, please provide an update.
- If you are currently affected by this bug, please update with your current symptoms and relevant logs.

If there has been no updates provided by EOD Wednesday, 12/12/18 (5pm EST), this bug will be archived and can be re-opened at any time deemed necessary.

Thank you!
Status: Verified (was: Assigned)

Sign in to add a comment