megi's PinePhone Development Log RSS

+972

2022–02–22: Pinephone Pro – Debugging Type C port issues

Helping debug Type-C port related issues is not as simple as sending a dmesg output as on original Pinephone.

If you have issues with some USB functionality not working on Pinephone Pro, you should reboot your phone (so that the logs are clear and contain only information relevant to the issue), reproduce the issue, and immediately collect all the needed debugging information, by running this script:

#!/bin/bash
uname -a
cat /etc/os-release
dmesg
echo -e "\nfusb302:\n"
cat /sys/kernel/debug/usb/fusb302-4-0022/{regs,log}
echo -e "\ntcpm:\n"
cat /sys/kernel/debug/usb/tcpm-4-0022/log
echo -e "\npower:\n"
cat /sys/class/power_supply/*/{device/uevent,uevent}
echo -e "\nextcon:\n"
cat /sys/class/extcon/extcon*/{name,state}
echo -e "\nalt-dp:\n"
cat /sys/kernel/debug/dri/*/state
echo -e "\nregulators:\n"
cat /sys/kernel/debug/regulator/regulator_summary
echo -e "\nkconfig:\n"
zcat /proc/config{,.gz}
echo -e "\nkmodules:\n"
lsmod

The script is also downloadable from here

Run the script as:

bash ppp-typec-dbg.sh > typec.log

Then you can inspect the typec.log yourself and/or send it to me (x@xnux.eu) along with some description of the issue, the USB devices you're using and the expected behavior.