1 /* 2 * Copyright 2018 - 2022 NXP 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef __USB_DEVICE_CONFIG_H__ 8 #define __USB_DEVICE_CONFIG_H__ 9 10 #include <zephyr/devicetree.h> 11 #include "usb.h" 12 13 /****************************************************************************** 14 * Definitions 15 *****************************************************************************/ 16 /* EHCI instance count */ 17 #ifdef CONFIG_USB_DC_NXP_EHCI 18 #define USB_DEVICE_CONFIG_EHCI (1U) 19 /* How many the DTD are supported. */ 20 #define USB_DEVICE_CONFIG_EHCI_MAX_DTD (16U) 21 #endif /* CONFIG_USB_DC_NXP_EHCI */ 22 23 #ifdef CONFIG_USB_DC_NXP_LPCIP3511 24 25 #ifdef USBHSD_BASE_ADDRS 26 #define USB_DEVICE_CONFIG_LPCIP3511HS (1U) 27 #else 28 #define USB_DEVICE_CONFIG_LPCIP3511HS (0U) 29 #endif 30 31 #ifdef USB_BASE_ADDRS 32 #define USB_DEVICE_CONFIG_LPCIP3511FS (1U) 33 #else 34 #define USB_DEVICE_CONFIG_LPCIP3511FS (0U) 35 #endif 36 37 #endif /* CONFIG_USB_DC_NXP_LPCIP3511 */ 38 39 /* Whether device is self power. 1U supported, 0U not supported */ 40 #define USB_DEVICE_CONFIG_SELF_POWER (1U) 41 42 #define DT_DRV_COMPAT nxp_mcux_usbd 43 44 /* Number of endpoints supported */ 45 #define USB_DEVICE_CONFIG_ENDPOINTS (DT_INST_PROP(0, num_bidir_endpoints)) 46 47 #endif /* __USB_DEVICE_CONFIG_H__ */ 48