USB-C PD Negotiation Wrong - 12V/0A in message

Hi There,

I have been looking at issues the VIM4 has with some PSU’s and not others and the case I can see is the USB-C PD negotiate correctly.

I can see all the voltage and current negotions and in the end, VIM4 requests 12V / 0A .
yes ZERO Amps!

Some PSU’s use this value and set the current limit too low! Others PSU’s dont care.

Is there a way to get VIM4 to request 12V/3A ?

Richard

Hi @there,

Which PSU and how can we reproduce this issue?

Regards,
Nick

It happens on all PD psu’s … if you monitor the PD negotiation, VIM4 gets a list of all supported Voltage/Current from PSU and then selects 12V/0A. PSU’s that have the Texas Instruments (TI) USB-PD controllers default to 2.5A in that case - which is not enough for a fully loaded A311D2 (USB hard drives, graphics high res and NPU running)
I have another generic PD PSU that ignores the 0A and always delivers maximum current.

The end result is that VIM4 is telling the PSU to supply 12V/0A - it should be 12V/3A

Additional:
Newer uboot bootloaders have the ‘tcpm’ command to help debug PD issues. Are there plans to update uboot from the 2019.01 version? (6 years old!)

Hi @RichardPar,

This is the log for our official pd adaptor, could you provide the log from your side?

fusb302_init: Device ID: 0x91
CC connected in 0 as UFP
charge ic max_vol = 12000mv max_cur = 6000ma
chip->pos_power = 3, chip->pd_output_vol=12000  chip->pd_output_cur=2500
fusb302 detect chip.port_num = 0

There is no plan at this moment.

Regards,
Nick

fusb302_init: Device ID: 0x91
CC connected in 0 as UFP
charge ic max_vol = 12000mv max_cur = 6000ma
chip->pos_power = 3, chip->pd_output_vol=12000  chip->pd_output_cur=3000
fusb302 detect chip.port_num = 0

This is a log from the PD negotiation..

It showing that 12V/0A is requested - and the analyser is showing a mismatch as 0A is not valid.

Hello @RichardPar

Could you share us how you get such message?

I use a DSLogic analyser DSLogic Plus - DreamSourceLab connected to the PD lines on VIM4. The software has a built in PD decoder.

I connected 2 of these to make an adapter (removed the resistors from the board) and connected the analyser to CC1 and CC2

Richard

I can share the logs I have (for about 10 different PD power supplies)

@numbqq

There is one bug in the uboot,
/drivers/power/mfd/fusb302.c (from patch)

The & 0x3ff on voltage is messing up the data. I removed the & 0x3ff from VOLTAGE and it works much better.

function set_mesg()

+			case 0:
+				/* Fixed Supply */
+				chip->send_load[0] |= ((CAP_FPDO_VOLTAGE(chip->rec_load[chip->pos_power - 1]) << 10) & 0x3ff);
+				chip->send_load[0] |= (CAP_FPDO_CURRENT(chip->rec_load[chip->pos_power - 1]) & 0x3ff);
+				break;
+			case 1:
+				/* Battery */
+				chip->send_load[0] |= ((CAP_VPDO_VOLTAGE(chip->rec_load[chip->pos_power - 1]) << 10) & 0x3ff);
+				chip->send_load[0] |= (CAP_VPDO_CURRENT(chip->rec_load[chip->pos_power - 1]) & 0x3ff);
+				break;
+			default:

I changed to

image

Richard

Hello @RichardPar

Does it work well after this change? We don’t have chance to check at this moment.

It does work after the change. There are many other quirks, but this works. I can get to full 2.5A load with the change. Preiously I could only get 0.5A Max

1 Like

Hello @RichardPar

Could you send a PR to us? :wink:

I will make a patch this weekend.. no problem!

Edit: Done

1 Like