Status of PD support during u-boot

I’m quite happy with the Rock 5B so far, but the partial support of PD negotiation is holding me back from fully using it.

Can someone from Radxa comment on the support of PD negotiation during u-boot? What are the hurdles to overcome and is there some expectation on when it’s fully supported?

I believe there are some things depending on full support, at least for me. The most obvious thing is of course stable booting and no reboots due to power issues. Less obvious things are the impact of some workarounds (e.g. no output on serial console during booting, at least until the system has fully booted).

I’m using an RPi power brick which is ok for my current power needs, but I would like to add more peripherals.

Also if something goes wrong during boot, I’m not confident that I can do something about it. I think at the moment I can’t even pick the kernel that I want to boot with the serial console.

Maybe there are more effects of not having full PD negotiation, I don’t know.

Anyway, long story short, is it possible to get an update from Radxa regarding the PD negotiation support?

Many thanks in advance!

You already have answers for about half of your questions in meta-thread regarding PD.

Correct me if I’m wrong, that message is about support after u-boot completed, it’s about Linux kernel support. I understood that most problems with booting (ok, maybe not with stability after booting) were due to the fact that PD negotiation is only done after the Linux kernel has started (so after u-boot).

There have been some workarounds (disabling console output) to make sure u-boot finishes faster so that more adapters work.

IIUC, if u-boot can do PD negotiation, most (of not all) of the problem goes away (and this would mean that the workarounds can go away as well).

Do I see it wrong? Maybe I’m missing something, I don’t know

Please re-read thread that i linked. Including post before the one that i linked. You are mostly interested in the posts from Jack

Thanks for replying again. I did read that thread and many others on this forum about PD and other topics. I just re-read part of the thread and especially Jack’s answers, but I couldn’t see anything about what I asked.

To be sure, I mean about this: NVMe Boot Loop (Power) and this: ROCK5 Android12 Bringup Status Update and this: ROCK 5B Debug Party Invitation

This answer from Jack is also relevant: ROCK 5B Debug Party Invitation

I think this message from the topic you linked also mentioned that work was done to try to add PD negotiation support to u-boot, but was removed again: Rock5 does not work on most PD power supplies

You can see that in this branch: https://github.com/radxa/u-boot/commits/stable-5.10-rock5

TypeC and PD support was added on July 28th, then reverted on August 2nd. On September 13th the console was disabled (presumably to make u-boot spend less time so the kernel can start PD negotiation before the power cuts out). The latest commit seems to be from October 31st, but no word on when PD negotiation will be back in that branch of u-boot. If I’m not mistaken, that’s the u-boot we are using for the Rock 5B.

Anyway, long story, but I’m wondering what the status/estimates are on PD negotiation support in u-boot. So if someone from Radxa can clarify that I would very much appreciate it!

2 Likes

I want to share my USB PD success story with rock5b.
I received my rock5b 3 days ago. Tried booting from sdcard using radxa’s debian image, infinite boot loop on three usb charges: aliexpress GaN 65w, dell laptop charger, hp laptop charger. I used this debian image https://github.com/radxa/debos-radxa/releases/download/20221201-0835/rock-5b-debian-bullseye-xfce4-arm64-20221201-1424-gpt.img.xz

Then I flashed the same debian image to nvme ssd using nvme to usb3 adapter on my laptop. Nvme ssd alone didn’t boot at all (no suitable spi loader yet). But with both ssd and nvme installed booted sucessfully with dell laptop charger only. Rock5b took uboot from sdcard but the linux image was taken from nvme drive.

After booting, I have updated the SPI to boot from nvme directly. This spi image https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img

Flashed SPI with:

sudo dd if=zero.img of=/dev/mtdblock0
sudo dd if=rkspi_loader.img of=/dev/mtdblock0
sync

as specified at https://wiki.radxa.com/Rock5/install/spi

Also did sudo apt update; sudo apt upgrade
Removed sdcard. Now sbc boots native from nvme ssd.
Now ALL three of my USB PD chargers work with rock5b no problem.

My interpretation of the results: you need to load linux kernel fast for USB PD negotiation not to timeout. Latest uboot with console disabled and fast ssd gives you this. Could be sudo apt upgrade played a role, I am not certain about it.

1 Like

Thanks for your input, I have a similar experience.

I think I may not have emphasized it correctly, but I also want the console on during boot so I can for example try out different kernels and be confident that I can fix it if things go wrong.

I know I can keep my SD card ready and insert it when things go wrong, but then I need physical access and I don’t need that if I use the serial console.

So I acknowledge the improvements and progress that has been made with supporting PD power supplies. I am curious about even more progress, specifically console support.

@RadxaNaoki do you know, or do you know someone who can answer this?

I still didn’t get any response to my question. @jack, do you know?

as far as I know, there is no activity for PD support in u-boot.

Any idea if I re-enable PD patch in u-boot, if it solve the problem with problematic power suplies?
As mainline kernel don’t have USB but still we use u-boot

And any idea why that code was removed from u-boot ?

I looked at that patch, and it seems like a lot of unrelated changes got checked in as part of the “PD” patch (things like disabling NVMe support for some reason - probably the commit was made from a “dirty” working copy). Someone will need to remake that commit in a clean manner.