vintagepc / MINI404

Like MK404... with an appendectomy :smile: (Simulates MK3.x, MK4, MINI and XL)
https://vintagepc.github.io/MINI404/
Other
28 stars 8 forks source link

[FEATURE] USB serial #29

Open vintagepc opened 3 years ago

vintagepc commented 3 years ago

Is your feature request related to a problem? Please describe. Need to get USB FS (serial) port working.

Describe the solution you'd like Ideally interpret the usb STM register reads/writes and pipe the data thru to a PTY on the host system.

Describe alternatives you've considered Alterntely, a shim might be possible as a temporary solution (but not ideal).

Progress:

vintagepc commented 3 years ago

Looks like the USB controller is very similar to the dw2 specification shared by the RPI0 and a few other SoCs. Useful links: https://sourceforge.net/p/wive-ng/wive-ng-mt/ci/master/tree/docs/DataSheets/RT3050_5x_V2.0_081408_0902.pdf

http://www.capital-micro.com/PDF/CME-M7_Family_User_Guide_EN.pdf

There's also a reference to a DWG databook which is buried behind mandatory registration :roll_eyes: (https://www.synopsys.com/dw/doc.php/iip/DWC_otg/latest/doc/DWC_otg_databook.pdf)

Interesting reading: https://gitter.im/libopencm3/discuss/archives/2016/07/09

vintagepc commented 3 years ago

This part may be tricky, I believe it should be possible but the challenge will be to find a way to connect the host bus to the client's device, rather than a host device to the client's bus.

vintagepc commented 3 years ago

There are a few options here. Look at the usbip vhci-hcd module that's included by default in the linux core. It may be possible to interface with that directly.

https://www.kernel.org/doc/readme/tools-usb-usbip-README

Alternately, look at the way simavr does it with usb-vhci and see if that module can compile on newer kernels. https://github.com/buserror/simavr/tree/master/examples/extra_board_usb

vintagepc commented 3 years ago

https://docs.citrix.com/en-us/linux-virtual-delivery-agent/current-release/configuration/configure-usb-redirection.html#build-the-vhci-kernel-module

vintagepc commented 3 years ago

USBIP for windows: https://github.com/cezanne/usbip-win