[PATCH v5 0/6] FUSB302 USB-C controller support

Sebastian Reichel sebastian.reichel at collabora.com
Wed Sep 4 02:03:27 CEST 2024


Hi Soeren,

On Wed, Sep 04, 2024 at 12:26:43AM GMT, Soeren Moch wrote:
> >   * non PD capable (reports 5V 0A)
>
> With a dumb power supply (actually 12V w/o USB-PD) I see a error message
> (not really sure if that makes sense, but no strong opinion from my side)
> and 5V/1.5A reported with 'tcpm info', see below.
> Can we expect 1.5A as fallback supply w/o USB-PD negotiation? 5V OK, but
> I'm not sure if USB2/USB3 type A to type C cables are allowed according
> to the USB spec, with lower possible currents.
> 
> I'm not sure what the 'right' thing is to report in this situation
> (also cable orientation makes no sense).
> Just want to mention that I see something different here.

USB-C sources, which are not PD capable can use pull-up resistors to
change source advertisement as follows:

    | advert.   | pull-up to 5V | pull-up to 3.3V |
    | --------- | ------------- | --------------- |
    | default   | 56K           | 36K             |
    | 1.5A @ 5V | 22K           | 12K             |
    | 3.0A @ 5V | 10K           | 4.7K            |

default means 500mA for USB2 or 900mA for USB3, which is reported as
0 in this series. Your setup seems to have pull resistors advertising
the 1.5A profile. If your setup includes an USB-A to USB-C cable the
pull resistors are in the cable, since the pull resistors are on the
CC pins, which do not exist for USB-A.

The same pull-up resistors should give away the cable orientation :)

> >   * RavPower 90W
> >   * UGREEN 100W
> >   * Anker 45W
> >   * RavPower PB
> > 
> > Changes since PATCHv4:
> >   * Rebase to latest master (v2024.10-rc4)
> >   * Fix regression introduced in PATCHv3: The exit code for fusb302_set_vconn()
> >     when vconn stays the same should be 0 instead of undefined
> >   * Fix regression introduced in PATCHv3: tcpm_set_polarity() needs to update
> >     port->polarity when there is no driver specific set_polarity function
> I can confirm that these fixes indeed fix my reported regression from v2.
> Booting to Linux works perfectly fine when powering from simple USB-PD
> supplies (12V, 20V), as well as with power from my notebook computer.
> 
> So for the v5 series:
> Tested-by: Soeren Moch <smoch at web.de>
> 
> I also tested powering from a UGREEN USB-C dock (see boot log below).
> This also worked well. Only the data role was not switched correctly
> to host as required for the dock. At least we got this 'not supported'
> message probably related to that. Maybe that can be fixed later in
> follow-up patches.

Yes, this series focuses on getting sink power role working as this
is needed to enable USB-C support in Linux (or any other OS). Handling
for data role swapping can happen on top of this. Linux should be able
to swap the data role if it had been configured the wrong way around in
the bootloader without triggering a hard reset. So this should only be
needed to have the dock's USB ports working in U-Boot itself.

Also acting as USB-PD Source is not fully implemented and needs to be
added on top of this once it is required by anyone.

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240904/5cdf2a31/attachment.sig>


More information about the U-Boot mailing list