From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web12.7028.1596111532961943243 for ; Thu, 30 Jul 2020 05:18:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=L0fCbQ15; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id f18so24707869wrs.0 for ; Thu, 30 Jul 2020 05:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KwFX+snX+i9g/wJezv0p9RuklGv8q3DBoPkAuy4hFIE=; b=L0fCbQ158XhcVxN/JucJTrX00p66ZtXY9CjYueNa+v8I8O/EmobV6VSL5VgAyuVNVQ bdTB/FImeo4VrN857UcVf/mmYmGBoIF8vZDCJ8OOCM9KFcz3e1fR3/IOTrJshoxeeAEm TAb8QFyjsapavlAbC1cwmRKN8he6aJmaRO1ca7cKmHbfLRROV8LoEYhy3WerfAY8G+8h RePTGdkCaUqNyG1MSWz99yt9PcVjGFkNLNcwuGqqWHzL+yRNA2GwomeUipL0gopzs/Ha 3QIt/X4F6A61B17eOte8wtBPNrHy/M4DIpk4EZnD021G0vIn1vf+z8e60WF3vj23opqj +T0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KwFX+snX+i9g/wJezv0p9RuklGv8q3DBoPkAuy4hFIE=; b=T60G1w4FZnwhaRXHGKfCz0OsjDtQckvh+DXRmSZXRlSa7V89fTRfeyB+xO9S34CIBP NxhuX3kHaLRrfOEDmvzcsZMc48Eb7+RBIYxvQGaoOGVvl98fr2hkrgjsSxVMlRADrPHf Lk18J8QQwhx/z2oVF52iXFNbgUKFV8T+KLRKtfWcrcgu7m/IcgpAo0A71ssE0MV6i40U 3E1/QMnZVynR4NIBqlo50Si3/dpd7c5iqrnDoyPSADQH+hajvwX0aIYSHSRefmLYxtey elDvEWE7bz4tzpyvJMxxm55Tv4Hmrih4do07w0LzcScTWxJzjZwTNl/I69/oKPhPc3dn XN0g== X-Gm-Message-State: AOAM533SxVxrmkXucHeYP+SaZuE44/fboz9tMRGzBEPRZxxWpOx8XLdS J78lAMukhHF5ruXpIv9NMCnI8A== X-Google-Smtp-Source: ABdhPJxxhyTu0ZJiuzL7snucMpsmBORYpWkX5+XzgJR6+dHVPUfEuRHKNnJu3Sw9hzUszn9oY5lVcA== X-Received: by 2002:a5d:4942:: with SMTP id r2mr29305504wrs.285.1596111531458; Thu, 30 Jul 2020 05:18:51 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id c10sm8587647wro.84.2020.07.30.05.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 05:18:50 -0700 (PDT) Date: Thu, 30 Jul 2020 13:18:48 +0100 From: "Leif Lindholm" 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 Message-ID: <20200730121848.GP31778@vanye> References: <20200720174324.GR12303@vanye> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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