diff options
author | Ilya Stolyarov <i.stolyarov@thirdpin.ru> | 2019-07-04 18:58:15 +0300 |
---|---|---|
committer | Ilya Stolyarov <i.stolyarov@thirdpin.ru> | 2019-07-04 20:00:56 +0300 |
commit | f344eac0b9bfbfc21dc4a4caf818c952e2957141 (patch) | |
tree | fc77ab303daf414e6fa450ca9886aeeb9305a846 /include/libopencm3 | |
parent | 0aef0dfcc7fde3523160aae1cf9755ca9845084c (diff) |
FEAT: [ulpi] Registers and initialization
Diffstat (limited to 'include/libopencm3')
-rw-r--r-- | include/libopencm3/usb/dwc/otg_common.h | 4 | ||||
-rw-r--r-- | include/libopencm3/usb/dwc/otg_hs.h | 17 | ||||
-rw-r--r-- | include/libopencm3/usb/usbd.h | 2 |
3 files changed, 21 insertions, 2 deletions
diff --git a/include/libopencm3/usb/dwc/otg_common.h b/include/libopencm3/usb/dwc/otg_common.h index 8a703713..366ed14d 100644 --- a/include/libopencm3/usb/dwc/otg_common.h +++ b/include/libopencm3/usb/dwc/otg_common.h @@ -248,7 +248,9 @@ #define OTG_DCTL_RWUSIG (1 << 0) /* OTG device configuration register (OTG_DCFG) */ -#define OTG_DCFG_DSPD 0x0003 +#define OTG_DCFG_DSPD_MASK (0x3 << 0) +#define OTG_DCFG_DSPD_FS_INT 0x0003 +#define OTG_DCFG_DSPD OTG_DCFG_DSPD_FS_INT #define OTG_DCFG_NZLSOHSK 0x0004 #define OTG_DCFG_DAD 0x07F0 #define OTG_DCFG_PFIVL 0x1800 diff --git a/include/libopencm3/usb/dwc/otg_hs.h b/include/libopencm3/usb/dwc/otg_hs.h index 7b5124cd..99b24a9b 100644 --- a/include/libopencm3/usb/dwc/otg_hs.h +++ b/include/libopencm3/usb/dwc/otg_hs.h @@ -141,7 +141,7 @@ #define OTG_DIEPEACHMSK1_INEPNMM (1 << 5) #define OTG_DIEPEACHMSK1_ITTXFEMSK (1 << 4) #define OTG_DIEPEACHMSK1_TOM (1 << 3) -/* Bit 2 - Reserved */ +/* Bit 2 - Reserved */ #define OTG_DIEPEACHMSK1_EPDM (1 << 1) #define OTG_DIEPEACHMSK1_XFRCM (1 << 0) @@ -170,4 +170,19 @@ #define OTG_HCSPLT_HUBADDR_MASK (0x7f << 7) #define OTG_HCSPLT_PORTADDR_MASK (0x7f << 0) +/* OTG USB configuration register (OTG_GUSBCFG) */ +#define OTG_GUSBCFG_ULPIIPD (1 << 25) +#define OTG_GUSBCFG_PTCI (1 << 24) +#define OTG_GUSBCFG_PCCI (1 << 23) +#define OTG_GUSBCFG_TSDPS (1 << 22) +#define OTG_GUSBCFG_ULPIEVBUSI (1 << 21) +#define OTG_GUSBCFG_ULPIEVBUSD (1 << 20) +#define OTG_GUSBCFG_ULPICSM (1 << 19) +#define OTG_GUSBCFG_ULPIAR (1 << 18) +#define OTG_GUSBCFG_ULPIFSLS (1 << 17) +#define OTG_GUSBCFG_PHYLPCS (1 << 15) + +/* OTG device configuration register (OTG_DCFG) */ +#define OTG_DCFG_DSPD_FS_EXT (0x2 << 0) + #endif diff --git a/include/libopencm3/usb/usbd.h b/include/libopencm3/usb/usbd.h index b0ba701d..a213eeb4 100644 --- a/include/libopencm3/usb/usbd.h +++ b/include/libopencm3/usb/usbd.h @@ -55,9 +55,11 @@ typedef struct _usbd_device usbd_device; extern const usbd_driver st_usbfs_v1_usb_driver; extern const usbd_driver stm32f107_usb_driver; extern const usbd_driver stm32f207_usb_driver; +extern const usbd_driver stm32_dwc_usb_driver_ulpi; extern const usbd_driver st_usbfs_v2_usb_driver; #define otgfs_usb_driver stm32f107_usb_driver #define otghs_usb_driver stm32f207_usb_driver +#define otghs_usb_driver_ulpi stm32_dwc_usb_driver_ulpi extern const usbd_driver efm32lg_usb_driver; extern const usbd_driver efm32hg_usb_driver; extern const usbd_driver lm4f_usb_driver; |