The secret of the "Debug Accessory Mode" Adapter.
The exact internals of Google's proprietary "Suzy-Q" debugging device are, at the time of this writing, unknown.
However, I have found how to make an apparently-compatible device:
We connect the USB-C "business end" into a Asus C101PA machine; the USB-B end into a reasonable Linux PC, where we then:
echo 18d1 5014 > /sys/bus/usb-serial/drivers/generic/new_id
...and /dev/ttyUSB0 ... 5 , the UARTs of the RK3399 chip, appear.
Theoretically, there are also Google-particular "vendor" endpoints. But we will look at these later.
The unfortunate bit is that the output is, evidently, molested between leaving the RK3399 and emerging from the USB-C debug controller, by the machine's embedded controller Cr50 chip: observe, the typical reset output of Rockchip (e.g., DDR init info) is not seen in the spew.
Therefore the "debug accessory" cable can be used for kernel debugging, but not for bootloader debugging. Unless we diddle the EC controller firmware, to force it to relay UART output immediately from power-on.
Edit: Read here re: the USB endpoints.
(to be continued...)
It seems that now the SuzyQ pinout is public: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/master/docs/ccd.md
And they even released a datasheet for the cable product: https://www.chromium.org/chromium-os/ccd/951-00273-01_20180607_suzyqable_SCH_1.pdf
However, while trying to mess with my CR50 I can't get any serial interface to show up... On these schematics, CC1 and CC2 are not grounded but connected to VBUS using 22 kΩ and 56 kΩ resistors. Do you know why is it so different from the USB-C spec and what pinout is the correct one?
Dear g16pp1,
That "official" cable has been available for several years.
In fact I do not know why it differs substantially from mine (the rationale for the resistor values in the latter is documented in the previous article.)
FWIW mine worked with my machine, and if you build it, will probably work with yours too.
Yours,
-S
Dear Stanislav,
Thank you for your reply.
I actually will give your schematic a try since I can't get mine to work.
Did you see the device appearing (either using lsusb, dmesg...) on your Linux box immediately upon connection?
Best regards