Add reset and UART VDM support to tipd#399
Closed
martinyrm wants to merge 3151 commits into
Closed
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds macvdmtool-like functionality to tipd, supporting target reboot and target+local UART over USB-C (SBU mux)
Two new sysfs entries are created: /sys/class/typec/portX/device/cd321x_vdm/reboot and /sys/class/typec/portX/device/cd321x_vdm/serial
Writing to reboot sends a VDM that resets the connected device (tested by myself on M1 MBA J313AP)
Writing to serial first sends a VDM that causes the target device to enter UART mode and then puts the local CD321x device into UART mode - enabling serial communication between two M1 machines
(many thanks to chaos_princess who tested this successfully with a M1 Pro J314s as the host machine).