[PATCH v2 0/4] USB-PD TCPM improvements
Sebastian Reichel
sebastian.reichel at collabora.com
Mon Mar 3 17:06:04 CET 2025
Hi Anand,
On Mon, Mar 03, 2025 at 01:08:24PM +0530, Anand Moon wrote:
> On Sat, 1 Mar 2025 at 23:41, Peter Robinson <pbrobinson at gmail.com> wrote:
> > On Thu, 27 Feb 2025 at 06:01, Anand Moon <linux.amoon at gmail.com> wrote:
> >> On Thu, 27 Feb 2025 at 00:15, Sebastian Reichel
> >> <sebastian.reichel at collabora.com> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I have a couple of fixes/improvements for the TCPM code. Three are fixing
> >> > actual problems I noticed on the Rock 5B, which prevented booting up the
> >> > system. One of them simply adds an error print before potentially committing
> >> > hara-kiri by triggering a hard reset, which helps people understanding
> >> > why their boards reset themself in case there are more problems. I've
> >> > recently added the same print to the kernel TCPM code.
> >> >
> >> I have encountered issues with the Raspberry Pi Type C power
> >> supply on a few occasions. Thanks for these changes, but it
> >> dose not resolve the issue completely.
I don't promise fixing all issues with this series. USB-PD is super
complex. This series improves things and shouldn't have any
regressions. It also helps with debugging further issues by having
the extra print.
> > I don't believe the RPi Type-C power supply supports power delivery.
>
> RPi 5 Type-C power supply is generally compatible with the Rock 5B
> for daily use. I also have the Radxa 65W official Type-C power
> supply for the Radxa Rock 5B board. I was checking the connection
> messages with different power sources.
>
> >> Do you have plans to add a device tree node for this board?
> >
> > For which board?
>
> Radxa Rock 5B and Rock 5B+ indeed have a versatile USB Type-C port
> that can be used both as a display port and a power source.
>
> During my investigation, I discovered that the Type-C port uses
> the FCS,FUSB302 the driver instead of the TCPM driver. The
> FUSB302 driver is specifically designed for USB Power Delivery
> (USB PD) and supports various power delivery protocols.
The fusb302 driver uses the TCPM framework. TCPM means "Type C Port
Manager". The chip is not autonomous (like some other USB-PD chips).
Without a driver telling it, what messages should be exchanged, it
will stay quiet. TCPM implements the huge USB-PD state machine,
which knows when a specific messages is expected or needs to be
send. The remote side (i.e. the power-supply) has a similar state
machine implemented. Ending up in a bad state in the state machine
results in the system trying to do a hard reset to go back to the
start. A hard reset involves removing the supply voltage and thus
kills boards like the Rock 5B. To avoid this the state machine must
be tweaked. That's why FUSB302 is not really mentioned here - the
driver is passing the messages correctly. TCPM is the relevant bit,
as that contains the state machine.
> As of now, I don't have a Type-C power source monitor to test the
> feature
You can also get debug information from the Rock 5B itself. But
then you should make sure it has a backup power-supply (e.g. PoE
or via the GPIO header), so that it does not reset itself when a
USB-PD hard reset happens. Also this setup has some side-effects
to the communication itself, since it affects the timings if you
enable too much debug messages.
Greetings,
-- 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/20250303/64cca8af/attachment.sig>
More information about the U-Boot
mailing list