Skip to content

usb/dwc3 / phy/tusb1210: Add TUSB1211 charger detection

Hans de Goede linux-phy linux-usb 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 2 repliesIn review
  2. v19 patches 2 repliesSuperseded

Changes in v2 from the cover letter

[PATCH v2 9/9] phy: ti: tusb1210: Add charger detection:
- Add an online attribute to the registered power_supply class device, otherwise upower thinks it is an extra system battery
- Add tusb1210_remove_charger_detect() function to properly unregister the tusb->psy_nb notifier and to cancel tusb->chg_det_work

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9usb: dwc3: pci: Add "snps, dis_u2_susphy_quirk" for Intel Bay Traildrivers/usb/dwc3/dwc3-pci.c+12 -10 replies
2/9usb: dwc3: pci: Fix Bay Trail phy GPIO mappingsdrivers/usb/dwc3/dwc3-pci.c+2 -20 replies
3/9usb: dwc3: pci: Set the swnode from inside dwc3_pci_quirks()drivers/usb/dwc3/dwc3-pci.c+4 -70 replies
4/9usb: dwc3: pci: Set "linux, phy_charger_detect" property on some Bay Trail boardsdrivers/usb/dwc3/dwc3-pci.c+24 -00 replies
5/9usb: dwc3: pci: Also apply Bay Trail GPIO mappings to ulpi-devicedrivers/usb/dwc3/dwc3-pci.c+8 -00 replies
6/9phy: ti: tusb1210: Improve ulpi_read()/_write() error checkingdrivers/phy/ti/phy-tusb1210.c+48 -140 replies
7/9phy: ti: tusb1210: Drop tusb->vendor_specific2 != 0 check from tusb1210_power_on()drivers/phy/ti/phy-tusb1210.c+2 -50 replies
8/9phy: ti: tusb1210: Add a delay between power-on and restoring the phy-parametersdrivers/phy/ti/phy-tusb1210.c+5 -00 replies
9/9phy: ti: tusb1210: Add charger detectiondrivers/phy/ti/phy-tusb1210.c+370 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/9] usb/dwc3 / phy/tusb1210: Add TUSB1211 charger detection

Hi All,

Here is v2 of the patchs-series to add support for USB charger-type (SDP/DCP) detection using a tusb1210 phy connected to a dwc3 controller.

Changes in v2:
[PATCH v2 9/9] phy: ti: tusb1210: Add charger detection:
- Add an online attribute to the registered power_supply class device, otherwise upower thinks it is an extra system battery
- Add tusb1210_remove_charger_detect() function to properly unregister the tusb->psy_nb notifier and to cancel tusb->chg_det_work

v1 cover-letter:

Some Android x86 tablets with a Bay Trail (BYT) SoC (with DWC3 UDC) and a Crystal Cove PMIC, which does not support charger-detection, rely on a TUSB1211 phy for charger-detection.

This series adds support for this, it starts with some dwc3 bug-fixes for issues hit while developing this, as well as adding support to the dwc3 code to set a special property checked by the tusb1210 driver to signal that it needs to enable charger-detection.

The 2nd half of the series does some refactoring / fixes to the tusb1210 driver and adds the charger-detection support.

Regards,

Hans

Hans de Goede (8):
usb: dwc3: pci: Add "snps,dis_u2_susphy_quirk" for Intel Bay Trail
usb: dwc3: pci: Fix Bay Trail phy GPIO mappings
usb: dwc3: pci: Set the swnode from inside dwc3_pci_quirks()
usb: dwc3: pci: Set "linux,phy_charger_detect" property on some Bay
Trail boards
usb: dwc3: pci: Also apply Bay Trail GPIO mappings to ulpi-device
phy: ti: tusb1210: Improve ulpi_read()/_write() error checking
phy: ti: tusb1210: Drop tusb->vendor_specific2 != 0 check from

    tusb1210_power_on()

phy: ti: tusb1210: Add a delay between power-on and restoring the
phy-parameters

Stephan Gerhold (1):
phy: ti: tusb1210: Add charger detection

 drivers/phy/ti/phy-tusb1210.c | 439 ++++++++++++++++++++++++++++++++--
 drivers/usb/dwc3/dwc3-pci.c   |  60 ++++-
 2 files changed, 467 insertions(+), 32 deletions(-)
Signature · 1 line
2.33.1