drivers: usb: common: Added host register set for DWC2 controller [part1]#101886
Conversation
josuah
left a comment
There was a problem hiding this comment.
Identical to the original PR except for a typo fix...
--- a/drivers/usb/common/usb_dwc2_hw.h
+++ b/drivers/usb/common/usb_dwc2_hw.h
@@ -92,7 +92,7 @@ struct usb_dwc2_reg {
volatile uint32_t dieptxf[15];
};
volatile uint32_t reserved2[176];
- /* Host mode register 0x0400 .. 0x07FF */
+ /* Host mode registers 0x0400 .. 0x07FF */
volatile uint32_t hcfg;
volatile uint32_t hfir;
volatile uint32_t hfnum;
@@ -106,7 +106,7 @@ struct usb_dwc2_reg {
volatile uint32_t reserved_0x0444_0x04fc[47];
struct usb_dwc2_host_chan host_chan_regs[16];
volatile uint32_t reserved_0x0704_0x07fc[64];
- /* Device mode register 0x0800 .. 0x0D00 */
+ /* Device mode registers 0x0800 .. 0x0D00 */
volatile uint32_t dcfg;
volatile uint32_t dctl;
volatile uint32_t dsts;So these registers were verified to work.
8f817a4 to
d523701
Compare
|
thanks for the review! All the notes are addressed. PTAL. |
d523701 to
db5ae4e
Compare
|
To summarize the CI error, you might need to unify the Author of git configuration and the "Signed-off-by:" line in the commit to be the same. Thank you for the submission and the modifications! |
|
Hi @josuah thanks for additional clarification. I’ll try to set up as much checks as possible localy and fix the CI, meanwhile I move the PR to draft and poke you once again when it will be ready. |
0317a4a to
13a2fca
Compare
|
Hi @josuah, thanks for the waiting, PTAL when possible. ⚡ |
13a2fca to
788af2c
Compare
tmon-nordic
left a comment
There was a problem hiding this comment.
I hope I got all the suggestions right. I will recheck against the specification once you update the PR. Getting the register definitions is very tiring, but absolutely critical - any problems here can lead to so many wasted hours during troubleshooting.
|
Hi @tmon-nordic, thanks a lot, I‘ll take the commit suggestions and update the rest. I moved this to the draft and notify you when it will be ready. |
8a60ac0 to
119a661
Compare
|
|
Hi @tmon-nordic,
Done, PTAL. PS. I kept one thread as "not resolved" as I have concerns regarding the name, otherwise all done. |
|
Hi @tmon-nordic, will be there anything else from your side? |
Added register bitmask description with low-level abstraction Signed-off-by: Roman Leonov <jam_roma@yahoo.com> Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
119a661 to
a179f8d
Compare
|
@roma-jam I just fixed the indentation. Please follow the style in the file/subsystem next time. |
|
thanks for the review and for all suggestions. The next one is also ready from my side, PTAL: #102963 There you may find adding common files and basic skeletal for the I have split the changes from the original PR into several chunks to make them small, decrease the efforts of review and increase the pace of merging those changes, which we are already agreed on. (Sorry if I repeating myself, I feel I am saying that for the thousand times, but let it be the last one). During the upcoming changes if there arise any other tasks/ideas from your side, like merging some logic from udc and uhc for dwc2 (something like to create PS. I already found out, that it is possible to do that (dwc2_common.c for udc and uhc) and it makes sense as I need to reuse some features like core reset etc., but I decided to proceed with just "adding" the new code first and only then to propose any "changes" in the already implemented code. |
I second you for keeping it as future improvement, which will make merging DWC2 UHC support quicker and save time for further integration later. |
|
Hi @roma-jam! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |



Description
Added host register description for DWC2 controller. Prerequisites for UHC DWC2 driver.
Changes
Updated
drivers/usb/common/usb_dwc2_hw.h: Added Host related def & structsRelated