drivers: usb_dc_mcux: Enable second USB EHCI

Enable second usb EHCI if usb2 node has status="okay" Note that this
driver is still an single instance driver, this change simply enables
the driver to work with the usb2 peripheral if that one is enabled, and
usb1 is disabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-02-24 12:41:00 -06:00 committed by Marti Bolivar
commit 4f792714a8

View file

@ -88,7 +88,12 @@ static const usb_device_controller_interface_struct_t mcux_usb_iface = {
USB_DeviceEhciRecv, USB_DeviceEhciCancel, USB_DeviceEhciControl
};
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && CONFIG_USB_DC_NXP_EHCI
#define CONTROLLER_ID kUSB_ControllerEhci0
#elif DT_NODE_HAS_STATUS(DT_NODELABEL(usb2), okay) && CONFIG_USB_DC_NXP_EHCI
#define CONTROLLER_ID kUSB_ControllerEhci1
#endif
extern void USB_DeviceEhciIsrFunction(void *deviceHandle);