Skip to content

Commit 1aea300

Browse files
committed
drivers: usb: dwc2: Added host register set
Added register bitmask description with low-level abstraction
1 parent 6147ee5 commit 1aea300

File tree

3 files changed

+1122
-2
lines changed

3 files changed

+1122
-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; // 0x0400
86+
volatile uint32_t hfir; // 0x0404
87+
volatile uint32_t hfnum; // 0x0408
88+
uint32_t reserved_0x40c[1]; // 0x040c
89+
volatile uint32_t hptxsts; // 0x0410
90+
volatile uint32_t haint; // 0x0414
91+
volatile uint32_t haintmsk; // 0x0418
92+
volatile uint32_t hflbaddr; // 0x041c
93+
uint32_t reserved_0x420_0x43c[8]; // 0x0420 to 0x043c
94+
volatile uint32_t hprt; // 0x0440
95+
uint32_t reserved_0x0444_0x04fc[47]; // 0x0444 to 0x04fc
96+
// Host Channel Registers
97+
usb_dwc2_host_chan_regs_t host_chans[16];// 0x0500 to 0x06fc (depends on available amount of channels on hardware)
98+
uint32_t reserved_0x0704_0x07fc[64]; // 0x0700 to 0x07fc
8599
/* Device mode register 0x0800 .. 0x0D00 */
86100
volatile uint32_t dcfg;
87101
volatile uint32_t dctl;

0 commit comments

Comments
 (0)