Comment by jck
12 hours ago
Very cool!
Is your laptop something like framework which has open source firmware?
I(and many other people) have a similar issue with usb-c charging not working consistently. I've been meaning to try one of these new smart models to help me debug the issue.
ASUS Zephyrus, but it was able to reverse engineer the ports and I was able to download the firware from the controller itself, write an emulator that emulates running the firmware on multiple controllers with different instruction sets (the USB Power Delivery controller is RISC-V) and the communication between them. Also it found out how to read the communication buffer that was on the devices for debugging, which helped it understand the USB data packets that were doing the handshaking and voltage/current negotiation.
I had to reboot my laptop a few times though until I got to this, but it was a fun experience anyways.
At this point open source isn't as much advantage as long as the firmware is not encrypted :)
Wow, that is impressive. I've been meaning to do this by hand to fix the issue on my Lenovo IdeaPad for a while but haven't gotten around to it.
I'll try handing it off to one of these new frontier models.