Skip to content

Commit

Permalink
arch/arm64/src/imx9: Add imx9 usb device driver
Browse files Browse the repository at this point in the history
This is a modified version from imxrt driver, which has the same controller.

Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine committed Apr 4, 2024
1 parent 1e907ae commit cac5392
Show file tree
Hide file tree
Showing 5 changed files with 3,910 additions and 0 deletions.
44 changes: 44 additions & 0 deletions arch/arm64/src/imx9/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,50 @@ config IMX9_FLEXIO2_PWM_CHANNEL_PINS
hex "FlexIO outputs used for FLEXIO2 timers"
default 0x0000000000000000

config IMX9_USBDEV
bool
default n
select USBDEV

config IMX9_USBDEV_USBC1
bool "USB Device using controller 1"
default n
select IMX9_USBDEV

config IMX9_USBDEV_USBC2
depends on !IMX9_USBDEV_USBC1
bool "USB Device using controller 2"
default n
select IMX9_USBDEV

if IMX9_USBDEV

menu "USB device controller driver (DCD) options"

config IMX9_USBDEV_NOVBUS
bool "No USB VBUS sensing"
default n

config IMX9_USBDEV_FRAME_INTERRUPT
bool "USB frame interrupt"
default n
---help---
Handle USB Start-Of-Frame events. Enable reading SOF from interrupt
handler vs. simply reading on demand. Probably a bad idea... Unless
there is some issue with sampling the SOF from hardware asynchronously.

config IMX9_USBDEV_REGDEBUG
bool "Register level debug"
depends on DEBUG_USB_INFO
default n
---help---
Output detailed register-level USB device debug information. Requires
also CONFIG_DEBUG_USB_INFO.

endmenu # USB device controller driver (DCD) options

endif # IMX9_USBDEV

endmenu # iMX Peripheral Selection

config IMX9_GPIO_IRQ
Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/src/imx9/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ endif
ifeq ($(CONFIG_IMX9_FLEXIO_PWM),y)
CHIP_CSRCS += imx9_flexio_pwm.c
endif

ifeq ($(CONFIG_IMX9_USBDEV),y)
CHIP_CSRCS += imx9_usbdev.c
endif
Loading

0 comments on commit cac5392

Please sign in to comment.