My final choice for pd power on rock5b

Rock5b has a full featured typec port, which gives a lot of possibilities to user. And rock5b is the only SBC with this feature. But this feature is not well supported on linux. I’ve been investigating the typec port since I received the rock5b v1.3 developer edition at July 2022. Although issues are not solved thoroughly, I can give some advice on how to avoid pd power issues.

There are two issues:
A, board will get into boot loop(the led will get on and off when pd power is plugged in). This is because it take too much time (longer than 5 seconds) when kernel driver starts to do the negotiation, and the pd power will hard reset the pd state machine, which leads to power down.
B, When system is on nvme ssd, I can’t get into DP alt mode(I am using a typec monitor to power the board, and after system is up the monitor is lighted up). I don’t know why it happends. This issue is solved by changing to a 10 gbs typec cable.

And there are two fixes now:
1, Patch1 makes pd negotiation faster in kernel driver. This will make things better, but doesn’t work all the time. I still get boot loop when system is on NVME SSD.
2, Patch2 will do pd negotiation at u-boot so that kernel will continue with the pd state negotiated by u-boot. But this patch will break DP alt mode because the pd driver in u-boot doesn’t support dp alt mode and DFP/UFP detection.

Patch1 is already merged into the kernel repo of armbian. Here is two versions of u-boot, one has patch2 applied, the other one doesn’t have patch2 applied: uboot.zip (2.1 MB)

If you don’t need dp alt mode and just want your board working with pd power, install linux-u-boot-rock-5b-legacy_23.08.0-trunk--2017.09-Sbf47-P987b-He8c0-Vf9d0-Be203_arm64.deb under dir pd, and run command sudo armbian-install to update the bootloader on SD/eMMC or MTD Flash.

If you want dp alt mode, you can install linux-u-boot-rock-5b-legacy_23.08.0-trunk--2017.09-Sbf47-Pbd5c-He8c0-Vf9d0-Be203_arm64.deb under dir no-pd, and run command sudo armbian-install to update the bootloader on SD/eMMC or MTD Flash. Note: this deb file should be the same as the one in the latest armbian image, you don’t need to install it if you are using the latest 23.05 armbian.

For the dp alt mode issue when my system is on NVME SSD, I have given up trying it. I use nvme mounted as /home partiton and use emmc as my root partition. It’s working fine now. I need a 10gbs typec cable to make dp alt mode work with NVME SSD.

8 Likes

You may want to try a different cable. The USB-C cable situation is a bit of a mess. I initially had a 5gbs cable and had a similar issue with no display, then I switched to a 10gbs cable and since the change running display-port-alt mode from my NVME SSD has been perfect. Hope this helps.

That’s strange. I will find a new cable to test it. Thx for the info.

You’re right. I bought a new 10gbs typec cable and now I can have dp alt mode with nvme ssd.

2 Likes

Instead of the cost of a 10gbs cable get a better power supply with built in cable.
I use a 45W usbc power supply with built in cable. Never a problem with proper equipment.
My 67W phone charger comes with a very solid usbc cable, power only.

I’m talking about dp alt mode with nvme ssd.

why would you want to use the two hdmi connectors which both support HDR10 when one can burden the ‘do everything’ usbc ? it’s just too amazing.
Does your 10gbs cable go to an external hub which distributes various streams to different devices ?
My year&1/2 old laptop has only one usbc, her months old laptop has only one usba and a number of usbc connectors, the way of the future. Maybe future Radxa boards might have more usbc connectors.
I still tend to separate power supply from high speed serial for the physical electrical/signal transmission issues. 40 years in electronics will do that.

You have to ask people who have designed USB pd why they want dp alt mode with one usb typec cable.
My typec cable is connecting directly to the monitor, and the monitor gives power back to the board.
I’m talking about the solution of the issue I encountered, not why I choose to do it this way. I’m using HDMI output for my daily use, but that won’t stop me from trying the typec port.
There are always people who want one cable for both display and power, and I hope my experience will help them.

3 Likes

I have installed both packages and still seem to end up in a boot loop for a few minutes until it finally boots. I am booting from an SDC, using an ameridroid power supply and 480mbps c-to-c cable. It didn’t always do this, so i’m unsure why it started to. TCPM shows im getting 12v 2.5A from the power supply. I have another board using the newest armbian image and it has no issues with the same setup. I have tried that SD in this setup and it also has no issues. Bit lost on why this is happening.

You can connect to a serial console to see how u-boot is doing pd negotiation.

1 Like

Didn’t currently have a UART cable at my disposable, but one thing I have noticed is if I shut down and unplug the power cable and plug it back in, it boots almost immediately. The next boot will do the same. After that, they all get stuck in a loop for a bit before finally booting up.

PD power’s state machine will keep negotiation state for a while, so if you unplug quickly enough, it will continue with the negotiated state last time.

1 Like