For those who wonder how this thing works, there are 8 ADC inputs in SOC called SARADC and input 6 is connected to vbus pin of usbc socket with a resistive divider.
The SARADC input is 12bits scaled to 1.8V and you exactly read the raw value.
Therefore the gain of the input is = 1.8V/2^12 = 1,8/4096 = 439 x 10e-6, around 500uV per 1 unit of digital value. If you multiply the raw digital value with this gain, you will find the voltage at the input pin of saradc.
But since it is limited to 1.8V, there is a resistive voltage divider to measure highre voltage than 1.8V and the resistor chain is 100K at top 8.2 at the bottom. that will also lead a a gain of 8.2 / (100 + 8.2) = 0.075785.
Therfore:
Vbus * 0,075785 = Vdigital_inp * 0,000439
Vbus = Vdigital_inp * 0,005792
Vbus = Vdigital_inp / 172,45
https://dl.radxa.com/rock5/5b/docs/hw/radxa_rock_5b_v142_sch.pdf
For those who wonders how this works:
You can also get, rocovery key, phone jack status, boot mode selection, and any analogue input attached to pin 22 of gpio header with the same method.
So to my knowledge there is no current sensor anywhere including the PMIC rk806 which i think should be accessible over i2c even in the case kernel has no drivers, but as said i think pmic also has no current sensor or wattmetric sensor.
So one feasible option would be attach an external current sensot, or wattmetric sensor, and read the input with saradc input 4, namely gpio pin22, so that i can be monitored and logged.

