Skip to content

Commit 555632f

Browse files
committed
drivers: usb: dwc2: Added host register set
Added register bitmask description with low-level abstraction Signed-off-by: Roman Leonov <[email protected]>
1 parent 7f51b74 commit 555632f

File tree

3 files changed

+1113
-2
lines changed

3 files changed

+1113
-2
lines changed

drivers/usb/common/usb_dwc2_hw.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#define ZEPHYR_DRIVERS_USB_COMMON_USB_DWC2_HW
1010

1111
#include <stdint.h>
12+
#include "usb_dwc2_reg.h"
1213

1314
#ifdef __cplusplus
1415
extern "C" {
@@ -80,8 +81,21 @@ struct usb_dwc2_reg {
8081
volatile uint32_t dieptxf[15];
8182
};
8283
volatile uint32_t reserved2[176];
83-
/* Host mode register 0x0400 .. 0x0670 */
84-
uint32_t reserved3[256];
84+
/* Host mode register 0x0400 .. 0x07FF */
85+
volatile uint32_t hcfg;
86+
volatile uint32_t hfir;
87+
volatile uint32_t hfnum;
88+
volatile uint32_t reserved_0x40c[1];
89+
volatile uint32_t hptxsts;
90+
volatile uint32_t haint;
91+
volatile uint32_t haintmsk;
92+
volatile uint32_t hflbaddr;
93+
volatile uint32_t reserved_0x420_0x43c[8];
94+
volatile uint32_t hprt;
95+
volatile uint32_t reserved_0x0444_0x04fc[47];
96+
/* Host Channel Registers 0x0500 to 0x06fc (depends on available amount of channels on hardware) */
97+
usb_dwc2_host_chan_regs_t host_chans[16];
98+
volatile uint32_t reserved_0x0704_0x07fc[64];
8599
/* Device mode register 0x0800 .. 0x0D00 */
86100
volatile uint32_t dcfg;
87101
volatile uint32_t dctl;

0 commit comments

Comments
 (0)