-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Generalize Synopsys DCD/HCD #382
Comments
closed seem it doesn't seem to be feasible at the moment |
Yea, I'm a month late. I agree this is the best approach for now, but I'd love to eventually see if a "generic" driver is possible. Or at least whether there are "common" parts that are unlikely to change that can be factored out (or parts that change the same way for all chips using Synopsys IP as tinyusb evolves) . |
@cr1901 yeah, you are right, maybe we could extract the hanlding/processing function such as transfer into common function shared by these dcd rather than merging them all together. I will re-open this and will look at this later on. |
@hathach Appreciated, especially since I was a month late to actually say anything :D! |
no problem at all, I mostly file issue whenever idea come up as reminder anyway :) |
Seem like EFM from EnergyMicro/Silab also use Synopsys as well, change The issue name for better meaning. I am hoping to implement it like ehci/ohci where multiple vendors can calls/implement common API to get the driver running. |
If you're not using a broken compiler, a common API will be zero runtime cost anyway thanks to LTO. So this seems like a good idea. |
GD32VF103 (RISC-V from GigaDevice) is also using the same driver, in fact I was able to run TinyUSB just by copying stm32f1_fsdev driver plus some structs/defines from stm32 libraries - no changes at all :) |
thanks for confirmation that the stack work with gd32vf103, I also have this board in my drawer as well. Will put it into the official board later on when having time. However, fsdev driver is totally different than the synopsys one mentioned in this issue. |
Sic, it seems that my reading skills are failing me. Sorry for making mess. Should I remove my comment? |
no problems at all, I have no issues with your comments. At least it provide information that it does work with the gd f103 risc-v :) |
Is your feature request related to a problem? Please describe.
95% of stm32 synopsys and esp32s2 are the same. The differences are mostly register name and address base. Merging them reduce maintaining effort for driver. It is also a good chance to generalize the synopsys driver making adding MCU from other vendor using the same IP easier.
Describe the solution you'd like
merge and rename common driver as
synopsys/dcd_synopsys
Ref: linux driver for dwc https://github.com/torvalds/linux/tree/master/drivers/usb/dwc2
MCUs that use synopsys IP
The text was updated successfully, but these errors were encountered: