Skip to content

usb: first bits of automatic powers supply handling

This is basically a respin of my !222 (closed) with @angus.ainslie data role switching on top. Incidentally this is also base of !226 (closed) / !257 (closed). It would be cool to merge this since this makes dedicated dp/hdmi adapters work out of the box as well as some hubs (when powered via usb-a cable (hence /cc @david.hamner @todd). It also makes e.g. attaching an usb-stick or librem key work out of the box.

We can work on other device with follow up patches.

Make sure you use that with the 0.1.1 tps firmware. 0.1.2 breaks the hub scenario (firmware-tps6598x-nonfree#2 (closed))

Notes:

  • when using DP power your hub via an USB-A adapter. Without that it will likely not try dp-alt-mode since it can't establish a PD conract. Note that it will then not charge the phone.
  • if you're only interested in the hub functionality/charging you can use a PD adapter and it will charge the phone

The above is the reason why this does in no way supersede !226 (closed) since that handles the contract negotiation.

Testing notes (thanks for the reminder @martin.kepplinger):

  • make sure you're using 0.1.1 tps firmware
  • boot this kernel
  • either plug in dedicated usb-c -> HDMI/DP adatper
  • or
    • plug usb-a power into hub
    • plug HDMI cable into hub
    • plug hub into phone
Edited by Guido Gunther

Merge request reports