Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] USB serial #29

Open
1 of 3 tasks
vintagepc opened this issue Jan 13, 2021 · 5 comments · May be fixed by #88
Open
1 of 3 tasks

[FEATURE] USB serial #29

vintagepc opened this issue Jan 13, 2021 · 5 comments · May be fixed by #88
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@vintagepc
Copy link
Owner

vintagepc commented Jan 13, 2021

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:

  • Get fake CDC working with a simple chardev.
  • Clean up CDC IRQ hackery
  • Look at full-on USBIP object and handler.
@vintagepc vintagepc added the enhancement New feature or request label Jan 13, 2021
@vintagepc vintagepc added this to the First Print! milestone Jan 13, 2021
@vintagepc
Copy link
Owner Author

vintagepc commented Jan 16, 2021

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 🙄 (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
Copy link
Owner Author

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
Copy link
Owner Author

vintagepc commented Feb 1, 2021

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 vintagepc self-assigned this Feb 27, 2021
@vintagepc
Copy link
Owner Author

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

@vintagepc vintagepc added the help wanted Extra attention is needed label Aug 29, 2021
vintagepc added a commit that referenced this issue Sep 9, 2021
@vintagepc vintagepc mentioned this issue Sep 15, 2021
vintagepc added a commit that referenced this issue Sep 18, 2021
* Partial USB fake CDC (#29)

* Disable CDC if no chardev
@vintagepc vintagepc linked a pull request Sep 26, 2021 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant