Hi Leif, Sorry I missed your mail. For License issue I will update it later. I know there are some DesignWare USB controller driver, but most of them are for USB Host Mode. The driver "UsbDeviceDxe" is for USB Device Mode (i.e. peripheral). Usually it can be as the driver to support Android Fastboot feature. How about your suggestion about directory name? (Also change driver name?) Best regards, Vin ________________________________ From: Leif Lindholm Sent: Thursday, July 30, 2020 8:18 PM To: Vin Xue Cc: devel@edk2.groups.io ; Michael D Kinney Subject: Re: [edk2-platforms PATCH 1/5] Silicon/Synopsys/DesignWare: Import DesignWare USB3 peripheral driver Hi Vin, +Mike, Sorry for delay in responding. OK, so we know where it comes from - but we can no longer accept code under the plan 2-clause BSD license into edk2-platforms master. However, 2-clause BSD can be relicensed as 2-clause BSD + patent. Please do so, converting the comment header license statements to SPDX-License-Identifier: BSD-2-Clause-Patent tags. I also think there is more than one DesignWare USB controller, so we could probably do with a more specific directory name than "UsbDeviceDxe". Best Regards, Leif On Tue, Jul 21, 2020 at 03:51:19 +0000, Vin Xue wrote: > Hi Leif, > > The origin code is from edk2-platforms > /devel-IntelAtomProcessorE3900 branch. > https://github.com/tianocore/edk2-platforms/ > tree/devel-IntelAtomProcessorE3900/Platform/ > BroxtonPlatformPkg/Common/Features/UsbDeviceDxe > > In Patch 1/5 is the origin source code with BSD2 license, and > I updated license to BSD+Patent license in Patch 2/5. > Please check it. > > From my review, the driver code flow is similar to Linux kernel > DWC3 driver. Maybe it's feasible to ARM platform if do some changes. > > Best regards, > Vin > > ________________________________ > From: Leif Lindholm > Sent: Tuesday, July 21, 2020 1:43 AM > To: Vin Xue > Cc: devel@edk2.groups.io ; Ard Biesheuvel ; Meenakshi Aggarwal > Subject: Re: [edk2-platforms PATCH 1/5] Silicon/Synopsys/DesignWare: Import DesignWare USB3 peripheral driver > > Hi Vin, +Meenakshi > > Can you clarify the exact origin of this source code please? > We can only accept bsd+patent code contributions, and these days we > use only SPDX tags rather than full license statements at top of > files. > > Meenakshi - I would certainly prefer to have a single (and > Arm-functional) driver for DWC3 rather than init-only drivers per > platform. Can you have a look at this code plese and see if it looks > feasible to integrate in the NXP platforms? > > Regards, > > Leif > > On Fri, Jul 17, 2020 at 18:01:59 +0800, Vin Xue wrote: > > Incorporate the driver for the DesignWare USB3 DRD controller device > > mode (peripheral) that is defined in > > edk2-platforms/devel-IntelAtomProcessorE3900 branch. > > > > The driver is supported by Intel Atom series (Merrifield/BayTrail/ > > CherryTrail/Broxton/ApoloLake/GeminiLake etc.) and Core series > > (6th Generation and newer). > > > > The driver verified on AAEON UP Squared developer board (Intel > > ApoloLake platform). > > > > The driver supports Synopsys DesignWare DWC_usb3 and DWC_usb31 IP. > > > > It is better if the driver can be ported to ARM silicon. > > > > Cc: Ard Biesheuvel > > Cc: Leif Lindholm > > Signed-off-by: Vin Xue > > --- > > .../Drivers/UsbDeviceDxe/ComponentName.c | 305 ++ > > .../Drivers/UsbDeviceDxe/UsbDeviceDxe.c | 395 ++ > > .../Drivers/UsbDeviceDxe/UsbDeviceDxe.h | 159 + > > .../Drivers/UsbDeviceDxe/UsbDeviceDxe.inf | 74 + > > .../Drivers/UsbDeviceDxe/UsbDeviceMode.c | 1489 ++++++ > > .../Drivers/UsbDeviceDxe/UsbDeviceMode.h | 39 + > > .../Drivers/UsbDeviceDxe/UsbFuncIo.c | 2221 +++++++++ > > .../Drivers/UsbDeviceDxe/UsbFuncIo.h | 234 + > > .../Drivers/UsbDeviceDxe/UsbIoNode.c | 177 + > > .../Drivers/UsbDeviceDxe/UsbIoNode.h | 90 + > > .../Drivers/UsbDeviceDxe/XdciCommon.h | 156 + > > .../DesignWare/Drivers/UsbDeviceDxe/XdciDWC.c | 4030 +++++++++++++++++ > > .../DesignWare/Drivers/UsbDeviceDxe/XdciDWC.h | 741 +++ > > .../Drivers/UsbDeviceDxe/XdciDevice.c | 695 +++ > > .../Drivers/UsbDeviceDxe/XdciDevice.h | 184 + > > .../Drivers/UsbDeviceDxe/XdciInterface.h | 241 + > > .../Drivers/UsbDeviceDxe/XdciTable.c | 55 + > > .../Drivers/UsbDeviceDxe/XdciUtility.c | 148 + > > .../Drivers/UsbDeviceDxe/XdciUtility.h | 62 + > > .../DesignWare/Include/Library/UsbDeviceLib.h | 323 ++ > > .../DesignWare/Include/Protocol/EfiUsbFnIo.h | 430 ++ > > .../Include/Protocol/UsbDeviceModeProtocol.h | 104 + > > 22 files changed, 12352 insertions(+) > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/ComponentName.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbDeviceDxe.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbDeviceDxe.h > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbDeviceDxe.inf > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbDeviceMode.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbDeviceMode.h > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbFuncIo.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbFuncIo.h > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbIoNode.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/UsbIoNode.h > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciCommon.h > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciDWC.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciDWC.h > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciDevice.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciDevice.h > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciInterface.h > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciTable.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciUtility.c > > create mode 100644 Silicon/Synopsys/DesignWare/Drivers/UsbDeviceDxe/XdciUtility.h > > create mode 100644 Silicon/Synopsys/DesignWare/Include/Library/UsbDeviceLib.h > > create mode 100644 Silicon/Synopsys/DesignWare/Include/Protocol/EfiUsbFnIo.h > > create mode 100644 Silicon/Synopsys/DesignWare/Include/Protocol/UsbDeviceModeProtocol.h