I found the ncell_status register and the PDSS_NCELL_STATUS_VBUS_P_STATUS mask, which I think might contain the information I want, but it is always 0. Is there some documentation for these registers that goes into more detail than ccg3_regs.h?
Pin 40 cannot connect to ADC.
There are no documentation that describe more register info than ccg3_regs.h
Can you see if you can use VSYS? VSYS_DET comparator can be used to detect changes on the VSYS supply.
I'm detecting if VBUS_P is present by detecting if VSYS is present while the VBUS_C FETs are disabled. This would indicate that VBUS_P is supplying my VSYS supply.
I also had to add a resistor to discharge the capacitor on VBUS. Without that, I could quickly switch from external power to USB power without the CCG noticing (since the VBUS_P FETs are enabled.) The resistor solved some other problems as well.