From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::342; helo=mail-wm1-x342.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9DF45211A1E2C for ; Fri, 14 Dec 2018 09:10:49 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id g67so6506303wmd.2 for ; Fri, 14 Dec 2018 09:10:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pn6QP0+4BioN5kcGW+5/gN/3GdJ65RjIS1EIslEbVnU=; b=dv6b5buKsY7T50qbgwfymjB/S/QsWT4S8W12907DZ0CDBaZfz1VutXMxCO2blLhRfz BL8XwvDHbVYT0DcH3sFlMTIaYDoYtNTwomOs1G4c/eHiySa+wgDcNle5Wpm5RTX9NHzi f4umqX5/wlQesGse40TRlgDml+CEP/KXo59ug= 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=pn6QP0+4BioN5kcGW+5/gN/3GdJ65RjIS1EIslEbVnU=; b=IWwCkkvn/NOlNiinwI7Ls5MRX3P1xEbFnivHVobzjPpNk6siqzdcCCeRDs+BtFn1UF Tj0dV1jY4AmH17A8Hk1x/Obr1GJ2aBe6njUxO48+Q77bilMf8PI41MHOUnil1NG1wgz7 UmtiEsnsXCSmssea05y1HGIcjnJstUBCqkn0bbUo4XeH+uJIzaj2IvI5kGat1Z5JtjX6 c7Djf37M8HonsVg9XseAi5EAiij/T8AkYUEMXx5zNYVo6NjWvCQ25ajKk6xXF0e+HJx2 hm2xg4ibyq0QVdu+LuXCXORsbvfauUvLT9EcmpWYmv/0Q9tCzENlgFxoSpTRFOhUQBw1 klkA== X-Gm-Message-State: AA+aEWbqjJv+K2YpaCekV81HV8Uoh3hKE8+PhT6m4lG4gow0VKqlJFZ9 OLt3BJHhGWm7lpvr1UM3rsOdFQ== X-Google-Smtp-Source: AFSGD/WzFBA5aB6phlWt6basFHmvZ3VfnbtnABXFJ8eeZR7DjJGbM4OgCNIVGrpsKIokvzTqBAOI9A== X-Received: by 2002:a1c:8d49:: with SMTP id p70mr4198470wmd.68.1544807447630; Fri, 14 Dec 2018 09:10:47 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id o4sm5183664wmh.40.2018.12.14.09.10.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Dec 2018 09:10:46 -0800 (PST) Date: Fri, 14 Dec 2018 17:10:44 +0000 From: Leif Lindholm To: Chris Co Cc: "edk2-devel@lists.01.org" , Ard Biesheuvel , Michael D Kinney Message-ID: <20181214171044.7ucuthkgci3dtfxc@bivouac.eciton.net> References: <20180921082542.35768-1-christopher.co@microsoft.com> <20180921082542.35768-18-christopher.co@microsoft.com> MIME-Version: 1.0 In-Reply-To: <20180921082542.35768-18-christopher.co@microsoft.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms 17/27] Silicon/NXP: Add i.MX6 USB Phy Library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 17:10:50 -0000 X-List-Received-Date: Fri, 14 Dec 2018 17:10:50 -0000 X-List-Received-Date: Fri, 14 Dec 2018 17:10:50 -0000 X-List-Received-Date: Fri, 14 Dec 2018 17:10:50 -0000 X-List-Received-Date: Fri, 14 Dec 2018 17:10:50 -0000 X-List-Received-Date: Fri, 14 Dec 2018 17:10:50 -0000 X-List-Received-Date: Fri, 14 Dec 2018 17:10:50 -0000 X-List-Received-Date: Fri, 14 Dec 2018 17:10:50 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Sep 21, 2018 at 08:26:09AM +0000, Chris Co wrote: > This adds support for configuring the USB EHCI PHY on NXP i.MX6 SoCs. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Christopher Co > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Michael D Kinney > --- > Silicon/NXP/iMX6Pkg/Include/iMX6UsbPhy.h | 20 ++ > Silicon/NXP/iMX6Pkg/Library/iMX6UsbPhyLib/iMX6UsbPhy.c | 328 ++++++++++++++++++++ > Silicon/NXP/iMX6Pkg/Library/iMX6UsbPhyLib/iMX6UsbPhyLib.inf | 43 +++ > 3 files changed, 391 insertions(+) > > diff --git a/Silicon/NXP/iMX6Pkg/Include/iMX6UsbPhy.h b/Silicon/NXP/iMX6Pkg/Include/iMX6UsbPhy.h > new file mode 100644 > index 000000000000..153c5461a6ad > --- /dev/null > +++ b/Silicon/NXP/iMX6Pkg/Include/iMX6UsbPhy.h > @@ -0,0 +1,20 @@ > +/** @file > +* > +* Copyright (c) 2018 Microsoft Corporation. All rights reserved. > +* > +* This program and the accompanying materials > +* are licensed and made available under the terms and conditions of the BSD License > +* which accompanies this distribution. The full text of the license may be found at > +* http://opensource.org/licenses/bsd-license.php > +* > +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +* > +**/ > + > +#ifndef _IMX6_USB_PHY_H_ > +#define _IMX6_USB_PHY_H_ > + > +EFI_STATUS ImxUsbPhyInit (IMX_USBPHY_ID ImxUsbPhyId); > + > +#endif // _IMX6_USB_PHY_H_ > diff --git a/Silicon/NXP/iMX6Pkg/Library/iMX6UsbPhyLib/iMX6UsbPhy.c b/Silicon/NXP/iMX6Pkg/Library/iMX6UsbPhyLib/iMX6UsbPhy.c > new file mode 100644 > index 000000000000..317d17d14844 > --- /dev/null > +++ b/Silicon/NXP/iMX6Pkg/Library/iMX6UsbPhyLib/iMX6UsbPhy.c > @@ -0,0 +1,328 @@ > +/** @file > +* > +* Copyright (c) 2018 Microsoft Corporation. All rights reserved. > +* > +* This program and the accompanying materials > +* are licensed and made available under the terms and conditions of the BSD License > +* which accompanies this distribution. The full text of the license may be found at > +* http://opensource.org/licenses/bsd-license.php > +* > +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +* > +**/ > + > +#include > + > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#define USB_PHY_PLL_LOCK_TIMEOUT_USEC (UINT32)(1000*1000) > +#define USB_EHCI_STOP_RESET_TIMEOUT_USEC (UINT32)(1000*1000) > + > +#define IMX_CCM_ANALOG_PLL_USB1_REG_LOCK 0x80000000 > +#define IMX_USB_CMD_REG_RUN 0x00000001 > +#define IMX_USB_CMD_REG_RESET 0x00000002 > + > +/** > + Wait for a register bit to be on/off > +**/ > +EFI_STATUS > +RegisterWaitBit ( > + IN volatile VOID *RegisterAddr, Why volatile? > + IN UINT32 Mask, > + IN BOOLEAN IsWaitOn, > + IN UINT32 TimeOutUsec Could just be called MicroSeconds (would match elsewhere in edk2). > + ) > +{ > + UINT32 RegisterValue; > + UINT32 TimeUsec; TimeWaited? > + > + TimeUsec = 0; > + do { > + RegisterValue = MmioRead32 ((UINTN)RegisterAddr) & Mask; > + if (((RegisterValue == Mask) && IsWaitOn) || ((RegisterValue == 0) > + && !IsWaitOn)) { Could you re-break this line to keep either side of || together and aligned horizontally? > + return EFI_SUCCESS; > + } > + > + MicroSecondDelay (10); > + TimeUsec += 10; > + } while (TimeUsec < TimeOutUsec); > + > + return EFI_TIMEOUT; > +} > + > +/** > + Turn on the 480Mhz PLL > +**/ > +EFI_STATUS > +ImxUsbPhyEnablePll ( > + IN IMX_USBPHY_ID ImxUsbPhyId > + ) > +{ > + volatile IMX_CCM_ANALOG_REGISTERS *CcmAnaRegsPtr; > + volatile IMX_CCM_ANALOG_PLL_USB1_REG *PllUsbClrRegPtr; > + volatile IMX_CCM_ANALOG_PLL_USB1_REG *PllUsbSetRegPtr; I am very confused by these. Three volatile pointers are created and never used to access anything directly. You can drop the volatile on all three, and the latter two would make more sense as UINTN. > + IMX_CCM_ANALOG_PLL_USB1_REG PllUsbClrReg; > + IMX_CCM_ANALOG_PLL_USB1_REG PllUsbSetReg; > + EFI_STATUS Status; > + > + CcmAnaRegsPtr = (IMX_CCM_ANALOG_REGISTERS *)IMX_CCM_ANALOG_BASE; > + > + switch (ImxUsbPhyId) { > + case IMX_USBPHY0: > + PllUsbClrRegPtr = (IMX_CCM_ANALOG_PLL_USB1_REG *)&CcmAnaRegsPtr->PLL_USB1_CLR; > + PllUsbSetRegPtr = (IMX_CCM_ANALOG_PLL_USB1_REG *)&CcmAnaRegsPtr->PLL_USB1_SET; > + break; > + case IMX_USBPHY1: > + PllUsbClrRegPtr = (IMX_CCM_ANALOG_PLL_USB1_REG *)&CcmAnaRegsPtr->PLL_USB2_CLR; > + PllUsbSetRegPtr = (IMX_CCM_ANALOG_PLL_USB1_REG *)&CcmAnaRegsPtr->PLL_USB2_SET; > + break; > + default: > + return EFI_INVALID_PARAMETER; > + } > + > + PllUsbClrReg.AsUint32 = 0; > + PllUsbClrReg.BYPASS = 1; > + MmioWrite32 ((UINTN)PllUsbClrRegPtr, PllUsbClrReg.AsUint32); > + > + PllUsbSetReg.AsUint32 = 0; > + PllUsbSetReg.EN_USB_CLKS = 1; > + PllUsbSetReg.POWER = 1; > + PllUsbSetReg.ENABLE = 1; > + MmioWrite32 ((UINTN)PllUsbSetRegPtr, PllUsbSetReg.AsUint32); > + > + // Wait for PLL to lock > + Status = RegisterWaitBit ( > + PllUsbSetRegPtr, > + IMX_CCM_ANALOG_PLL_USB1_REG_LOCK, > + TRUE, > + USB_PHY_PLL_LOCK_TIMEOUT_USEC); > + > + if (Status != EFI_SUCCESS) { > + DEBUG ((DEBUG_ERROR, "PLL 480Mhz failed to lock for PHY %d\n", > + (UINT32)ImxUsbPhyId)); > + // On failure disable the PHY > + PllUsbClrReg.AsUint32 = 0; > + PllUsbSetReg.EN_USB_CLKS = 1; > + PllUsbSetReg.POWER = 1; > + PllUsbSetReg.ENABLE = 1; > + MmioWrite32 ((UINTN)PllUsbClrRegPtr, PllUsbSetReg.AsUint32); > + return Status; > + } > + > + return EFI_SUCCESS; > +} > + > +/** > + Reset the EHCI controller associated with the given PHY. > +**/ > +EFI_STATUS > +ImxUsbEhciResetController ( > + IN IMX_USBPHY_ID ImxUsbPhyId > + ) > +{ > + volatile USB_USBCMD_REG *UsbCmdRegPtr; > + volatile USB_USBMODE_REG *UsbModeRegPtr; Again, volatile with no function. Please address this antipattern throughout: drop volatile, hold addresses as UINTN. (Oh, and Ptr->Address.) > + EFI_STATUS Status; > + USB_USBCMD_REG UsbCmdReg; > + USB_USBMODE_REG UsbModeReg; > + > + switch (ImxUsbPhyId) { > + case IMX_USBPHY0: > + UsbCmdRegPtr = (USB_USBCMD_REG *) (IMX_USBCORE_BASE + IMX_USBCORE_LENGTH * 0 + > + IMX_USBCMD_OFFSET); > + break; > + case IMX_USBPHY1: > + UsbCmdRegPtr = (USB_USBCMD_REG *) (IMX_USBCORE_BASE + IMX_USBCORE_LENGTH * 1 + > + IMX_USBCMD_OFFSET); > + break; > + default: > + return EFI_INVALID_PARAMETER; > + } > + > + // The host controller can only be reset when it is stopped. > + UsbCmdReg.AsUint32 = MmioRead32 ((UINTN)UsbCmdRegPtr); > + UsbCmdReg.RS = 0; > + MmioWrite32 ((UINTN)UsbCmdRegPtr, UsbCmdReg.AsUint32); > + > + // Wait for controller to stop > + Status = RegisterWaitBit ( > + UsbCmdRegPtr, > + IMX_USB_CMD_REG_RUN, > + FALSE, > + USB_EHCI_STOP_RESET_TIMEOUT_USEC); > + if (Status != EFI_SUCCESS) { > + ASSERT_EFI_ERROR (Status); > + DEBUG ((DEBUG_ERROR, "Failed to stop EHCI controller (PHY %d)\n", > + (UINT32)ImxUsbPhyId)); > + return Status; > + } > + > + // Reset the controller > + UsbCmdReg.AsUint32 = MmioRead32 ((UINTN)UsbCmdRegPtr); > + UsbCmdReg.RST = 1; > + MmioWrite32 ((UINTN)UsbCmdRegPtr, UsbCmdReg.AsUint32); > + > + // Wait for controller reset to complete > + Status = RegisterWaitBit ( > + UsbCmdRegPtr, > + IMX_USB_CMD_REG_RESET, > + FALSE, > + USB_EHCI_STOP_RESET_TIMEOUT_USEC); > + > + if (Status != EFI_SUCCESS) { > + ASSERT_EFI_ERROR (Status); > + DEBUG ((DEBUG_ERROR, "Failed to reset EHCI controller (PHY %d)\n", > + (UINT32)ImxUsbPhyId)); > + return Status; > + } > + > + // Force OTG port into Host mode. We have seen that ID_PIN can be > + // unreliable in some board designs (e.g. SABRESED). > + // If the OTG port is not forced into Host mode, the USB stack fails to > + // start. > + if (ImxUsbPhyId == IMX_USBPHY0) { > + DEBUG ((DEBUG_INFO, "Switching USB OTG Port to Host\n")); > + > + UsbModeRegPtr = (USB_USBMODE_REG *) (IMX_USBCORE_BASE + IMX_USBMODE_OFFSET); > + UsbModeReg.AsUint32 = MmioRead32 ((UINTN)UsbModeRegPtr); > + UsbModeReg.CM = IMX_USBMODE_HOST; > + MmioWrite32 ((UINTN)UsbModeRegPtr, UsbModeReg.AsUint32); > + > + UsbModeReg.AsUint32 = MmioRead32 ((UINTN)UsbModeRegPtr); > + ASSERT (UsbModeReg.CM == IMX_USBMODE_HOST); > + } > + > + return EFI_SUCCESS; > +} > + > +/** > + Initialize a USB PHY > +**/ > +EFI_STATUS > +ImxUsbPhyInit ( > + IN IMX_USBPHY_ID ImxUsbPhyId > + ) > +{ > + volatile IMX_USBANA_REGISTERS *UsbAnaRegsPtr; > + volatile IMX_USBANA_USB_REGISTERS *UsbAnaUsbRegsPtr; > + volatile USBNC_USB_UH_CTRL_REG *UsbNcUhCtrlRegPtr; > + volatile IMX_USBNONCORE_REGISTERS *UsbNonCoreRegPtr; > + volatile IMX_USBPHY_REGISTERS *UsbPhyRegsPtr; > + EFI_STATUS Status; > + USB_ANALOG_USB_CHRG_DETECT_REG UsbAnaChrgDetReg; > + USB_ANALOG_USB_MISC_REG UsbAnaMicReg; > + USBNC_USB_UH_CTRL_REG UsbNcHcCtrlReg; > + USBPHYx_CTRL_REG UsbPhyCtrlReg; > + > + UsbAnaRegsPtr = (IMX_USBANA_REGISTERS *)IMX_USBANA_BASE; > + UsbNonCoreRegPtr = (IMX_USBNONCORE_REGISTERS *)IMX_USBNONCORE_BASE; > + > + switch (ImxUsbPhyId) { > + case IMX_USBPHY0: > + UsbPhyRegsPtr = (IMX_USBPHY_REGISTERS *)IMX_USBPHY1_BASE; > + UsbAnaUsbRegsPtr = &UsbAnaRegsPtr->USBANA[0]; > + UsbNcUhCtrlRegPtr = (USBNC_USB_UH_CTRL_REG *) > + &UsbNonCoreRegPtr->USBNC_USB_OTG_CTRL; > + break; > + case IMX_USBPHY1: > + UsbPhyRegsPtr = (IMX_USBPHY_REGISTERS *)IMX_USBPHY2_BASE; > + UsbAnaUsbRegsPtr = &UsbAnaRegsPtr->USBANA[1]; > + UsbNcUhCtrlRegPtr = (USBNC_USB_UH_CTRL_REG *) > + &UsbNonCoreRegPtr->USBNC_USB_UH1_CTRL; > + break; > + default: > + return EFI_INVALID_PARAMETER; > + } > + > + // USB power configuration: > + // Set power polarity > + UsbNcHcCtrlReg.AsUint32 = MmioRead32 ((UINTN)UsbNcUhCtrlRegPtr); > + UsbNcHcCtrlReg.PWR_POL = 1; > + UsbNcHcCtrlReg.AsUint32 |= 0x2; // Reserved bit Urgh! Please don't do this. If we're doing bitfield structs, let's do them consistently. Using the full 32-bit union alias to zero or read is fine, but oring things into it is too much. > + MmioWrite32 ((UINTN)UsbNcUhCtrlRegPtr, UsbNcHcCtrlReg.AsUint32); > + > + // Disable external USB charger detector > + UsbAnaChrgDetReg.AsUint32 = 0; > + UsbAnaChrgDetReg.EN_B = 1; > + UsbAnaChrgDetReg.CHK_CHRG_B = 1; > + MmioWrite32 ((UINTN)&UsbAnaUsbRegsPtr->USB_ANALOG_USB_CHRG_DETECT_SET, > + UsbAnaChrgDetReg.AsUint32); > + > + // Enable the 480Mhz PLL > + Status = ImxUsbPhyEnablePll (ImxUsbPhyId); > + if (Status != EFI_SUCCESS) { > + ASSERT_EFI_ERROR (Status); > + DEBUG ((DEBUG_ERROR, "Failed to enable PLL 480Mhz failed for PHY %d\n", > + (UINT32)ImxUsbPhyId)); > + return Status; > + } > + > + // Configure Over Current > + UsbNcHcCtrlReg.AsUint32 = MmioRead32 ((UINTN)UsbNcUhCtrlRegPtr); > + UsbNcHcCtrlReg.OVER_CUR_POL = 0; > + UsbNcHcCtrlReg.OVER_CUR_DIS = 1; > + MmioWrite32 ((UINTN)UsbNcUhCtrlRegPtr, UsbNcHcCtrlReg.AsUint32); > + > + // Enable USBH PHY clock > + UsbPhyCtrlReg.AsUint32 = 0; > + UsbPhyCtrlReg.CLKGATE = 1; > + MmioWrite32 ((UINTN)&UsbPhyRegsPtr->USBPHY_CTRL_CLR, UsbPhyCtrlReg.AsUint32); > + MicroSecondDelay (10); > + > + // Enable clock to UTMI block > + UsbAnaMicReg.AsUint32 = 0; > + UsbAnaMicReg.EN_CLK_UTMI = 1; > + MmioWrite32 ((UINTN)&UsbAnaUsbRegsPtr->USB_ANALOG_USB_MISC_SET, > + UsbAnaMicReg.AsUint32); > + MicroSecondDelay (10); > + > + // Enable USBH PHY > + // Reset the associated EHCI controller > + Status = ImxUsbEhciResetController (ImxUsbPhyId); > + if (Status != EFI_SUCCESS) { > + return Status; > + } > + > + // Reset the PHY > + UsbPhyCtrlReg.AsUint32 = 0; > + UsbPhyCtrlReg.SFTRST = 1; > + MmioWrite32 ((UINTN)&UsbPhyRegsPtr->USBPHY_CTRL_SET, UsbPhyCtrlReg.AsUint32); > + MicroSecondDelay (10); > + > + UsbPhyCtrlReg.AsUint32 = 0; > + UsbPhyCtrlReg.SFTRST = 1; > + UsbPhyCtrlReg.CLKGATE = 1; > + MmioWrite32 ((UINTN)&UsbPhyRegsPtr->USBPHY_CTRL_CLR, UsbPhyCtrlReg.AsUint32); > + MicroSecondDelay (10); > + > + // Power UP the PHY > + MmioWrite32 ((UINTN)&UsbPhyRegsPtr->USBPHY_PWD, 0); > + > + // Apply PHY configuration: > + // - Enable low/full speed devices. > + UsbPhyCtrlReg.AsUint32 = 0; > +#if defined(CPU_IMX6DQ) > + UsbPhyCtrlReg.ENAUTOSET_USBCLKS = 1; > + UsbPhyCtrlReg.ENAUTOCLR_USBCLKGATE = 1; > + UsbPhyCtrlReg.ENAUTO_PWRON_PLL = 1; > +#endif > + UsbPhyCtrlReg.ENAUTOCLR_PHY_PWD = 1; > + UsbPhyCtrlReg.ENAUTOCLR_CLKGATE = 1; > + UsbPhyCtrlReg.ENUTMILEVEL2 = 1; > + UsbPhyCtrlReg.ENUTMILEVEL3 = 1; > + MmioWrite32 ((UINTN)&UsbPhyRegsPtr->USBPHY_CTRL_SET, UsbPhyCtrlReg.AsUint32); > +#if defined(CPU_IMX6DQ) > + MmioWrite32 ((UINTN)&UsbPhyRegsPtr->USBPHY_IP_SET, IMX_USBPHY_IP_FIX); > +#endif > + > + return EFI_SUCCESS; > +} > diff --git a/Silicon/NXP/iMX6Pkg/Library/iMX6UsbPhyLib/iMX6UsbPhyLib.inf b/Silicon/NXP/iMX6Pkg/Library/iMX6UsbPhyLib/iMX6UsbPhyLib.inf > new file mode 100644 > index 000000000000..30f9f1862747 > --- /dev/null > +++ b/Silicon/NXP/iMX6Pkg/Library/iMX6UsbPhyLib/iMX6UsbPhyLib.inf > @@ -0,0 +1,43 @@ > +## @file > +# > +# Copyright (c) 2018 Microsoft Corporation. All rights reserved. > +# > +# This program and the accompanying materials > +# are licensed and made available under the terms and conditions of the BSD License > +# which accompanies this distribution. The full text of the license may be found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +# > +## > + > +[Defines] > + INF_VERSION = 0x00010005 I probably commented on some other .inf somewhere, but in case I didn't - try to bring all of these up to 0x0001001A. > + BASE_NAME = iMX6UsbPhyLib > + FILE_GUID = 463989D1-27DC-4AE7-92AE-C7E28C1C605D > + MODULE_TYPE = BASE > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = iMX6UsbPhyLib > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + EmbeddedPkg/EmbeddedPkg.dec > + ArmPkg/ArmPkg.dec > + ArmPlatformPkg/ArmPlatformPkg.dec > + Silicon/NXP/iMXPlatformPkg/iMXPlatformPkg.dec > + Silicon/NXP/iMX6Pkg/iMX6Pkg.dec Please sort these packages alphabetically. / Leif > + > +[LibraryClasses] > + BaseMemoryLib > + DebugLib > + IoLib > + TimerLib > + iMXIoMuxLib > + > +[Sources.common] > + iMX6UsbPhy.c > + > +[FixedPcd] > + giMXPlatformTokenSpaceGuid.PcdGpioBankMemoryRange > -- > 2.16.2.gvfs.1.33.gf5370f1 >