From nobody Thu Dec 26 01:53:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507275879211927.3674874779824; Fri, 6 Oct 2017 00:44:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0656A20945BDC; Fri, 6 Oct 2017 00:41:11 -0700 (PDT) Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (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 3EFEE21EA15DB for ; Fri, 6 Oct 2017 00:41:09 -0700 (PDT) Received: by mail-lf0-x232.google.com with SMTP id l23so12551355lfk.10 for ; Fri, 06 Oct 2017 00:44:32 -0700 (PDT) Received: from enkidu.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id v29sm194155ljv.27.2017.10.06.00.44.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 00:44:29 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4010:c07::232; helo=mail-lf0-x232.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JkCiPxhTsjaPh1tNi+OH/+o92hdEQVBobi4eTJvTh4o=; b=USvTJ9Gos3T0m6CiyoP/Fb6KMKJvALwUxSww2Kd2ZXaIfNKSV2nPCMel+5kLtMuMGH lj8t+Mw+rFbXCxG4oDiuMdnheDd7yB37VtjAE54ys8PHKmJtEXcUM7YdfwinqVYwohJ7 J9LZGg0sBmccUeyecPGsLZDrNSBui+D5Nk2bGym03WybqtXrhnzCzvJlUAz+hXi2A6TC MXCPk/y3wMjMWFLJbCq4Lsr9G3V3z1N+enmsQMtih1kVA2TMW0exsMzA8tupDjxM4v/Q rRvQomGYq8PS67La1TFHqz/dlqhAq2yvu+VjvNlmQccVVKRRWXo8nSFVYit4JV7QcGEF TFWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JkCiPxhTsjaPh1tNi+OH/+o92hdEQVBobi4eTJvTh4o=; b=nAq1qt6Zsnb+gwyN38LEG8FH2io9LnlK+VVJCR2dMJrfqKrmxzVKlN7f9ARo0prIB1 Yfl2OCQmeTV9x8JGsrpbCWX8ZGZa3m/azpIuJNSHEqwCRvAjOCuvnNrWrI612QGAovHJ 0r/f5W1MfarxMirfJ5y0Yu6s+iUQamXr9t8wzjpmxentUiRiJvfLDsR3Yj/Fgk622D+J 4cfAQ7w5SGInBTn+ARRounc2UGfLHbiqADpMz/xL6VqTN2RfeXUfNC6c+9Z/04o/3FKH FAraFj4q2JdD9B6QkiUUWexovUI/MQcCDLM4z5YANCnGxzPoz9m/OlMtk0a4xmAmD4up jvLw== X-Gm-Message-State: AMCzsaUmBXsGvooz0gADF9wowNl9BNbUtoC+H2VkIAgdjashIltWZFOr Gjzsl9ZXOIj7skZrw1Tlr9LkFd8Wni0= X-Google-Smtp-Source: AOwi7QBmM8rERTgRfIikWBqDu72XFhS3Q4Ac76CWyRz3oattF/rWVK0SccoyoawagXk20DAE3wiGXw== X-Received: by 10.46.66.22 with SMTP id p22mr496883lja.18.1507275870727; Fri, 06 Oct 2017 00:44:30 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Date: Fri, 6 Oct 2017 09:51:16 +0200 Message-Id: <1507276278-3608-4-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1507276278-3608-1-git-send-email-mw@semihalf.com> References: <1507276278-3608-1-git-send-email-mw@semihalf.com> Subject: [edk2] [platforms: PATCH 3/5] Marvell/Library: UtmiLib: Move devices description to MvHwDescLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jinghua@marvell.com, ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, nadavh@marvell.com, neta@marvell.com, kostap@marvell.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch introduces UTMI description, using the new structures and template in MvHwDescLib. This change enables more flexible addition of multiple CP with UTMI PHY's and also significantly reduces amount of used PCD's for that purpose. Update PortingGuide documentation accordingly. This patch replaces string-based description of Utmi on Armada 70x0 DB with new, reduced format. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/Marvell/Armada/Armada70x0.dsc | 7 +- Platform/Marvell/Include/Library/MvHwDescLib.h | 47 ++++++ Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.c | 149 ++++++++++-------= --- Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.h | 1 - Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.inf | 11 +- Platform/Marvell/Marvell.dec | 7 +- Silicon/Marvell/Documentation/PortingGuide.txt | 30 ++-- 7 files changed, 142 insertions(+), 110 deletions(-) diff --git a/Platform/Marvell/Armada/Armada70x0.dsc b/Platform/Marvell/Arma= da/Armada70x0.dsc index d9d126d..04bdf7c 100644 --- a/Platform/Marvell/Armada/Armada70x0.dsc +++ b/Platform/Marvell/Armada/Armada70x0.dsc @@ -111,11 +111,8 @@ gMarvellTokenSpaceGuid.PcdChip0ComPhySpeeds|{ 0x1, 0x6, 0xA, 0x6, 0x6, 0= x6 } =20 #UtmiPhy - gMarvellTokenSpaceGuid.PcdUtmiPhyCount|2 - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUsbCfg|L"0xF2440420;0xF2440420" - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiCfg|L"0xF2440440;0xF2440444" - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiUnit|L"0xF2580000;0xF2581000" - gMarvellTokenSpaceGuid.PcdUtmiPhyUtmiPort|L"0x0;0x1" + gMarvellTokenSpaceGuid.PcdUtmiControllers|{ 0x1, 0x1 } + gMarvellTokenSpaceGuid.PcdUtmiPortType|{ 0x0, 0x1 } =20 #MDIO gMarvellTokenSpaceGuid.PcdMdioBaseAddress|0xF212A200 diff --git a/Platform/Marvell/Include/Library/MvHwDescLib.h b/Platform/Marv= ell/Include/Library/MvHwDescLib.h index e029b50..6ad1bc2 100644 --- a/Platform/Marvell/Include/Library/MvHwDescLib.h +++ b/Platform/Marvell/Include/Library/MvHwDescLib.h @@ -117,6 +117,19 @@ typedef struct { } MVHW_RTC_DESC; =20 // +// UTMI PHY's description template definition +// + +typedef struct { + UINT8 UtmiDevCount; + UINT32 UtmiPhyId[MVHW_MAX_XHCI_DEVS]; + UINTN UtmiBaseAddresses[MVHW_MAX_XHCI_DEVS]; + UINTN UtmiConfigAddresses[MVHW_MAX_XHCI_DEVS]; + UINTN UtmiUsbConfigAddresses[MVHW_MAX_XHCI_DEVS]; + UINTN UtmiMuxBitCount[MVHW_MAX_XHCI_DEVS]; +} MVHW_UTMI_DESC; + +// // Platform description of CommonPhy devices // #define MVHW_CP0_COMPHY_BASE 0xF2441000 @@ -217,4 +230,38 @@ MVHW_RTC_DESC mA7k8kRtcDescTemplate =3D {\ { SIZE_4KB, SIZE_4KB }\ } =20 +// +// Platform description of UTMI PHY's +// +#define MVHW_CP0_UTMI0_BASE 0xF2580000 +#define MVHW_CP0_UTMI0_CFG_BASE 0xF2440440 +#define MVHW_CP0_UTMI0_USB_CFG_BASE 0xF2440420 +#define MVHW_CP0_UTMI0_ID 0x0 +#define MVHW_CP0_UTMI1_BASE 0xF2581000 +#define MVHW_CP0_UTMI1_CFG_BASE 0xF2440444 +#define MVHW_CP0_UTMI1_USB_CFG_BASE 0xF2440420 +#define MVHW_CP0_UTMI1_ID 0x1 +#define MVHW_CP1_UTMI0_BASE 0xF4580000 +#define MVHW_CP1_UTMI0_CFG_BASE 0xF4440440 +#define MVHW_CP1_UTMI0_USB_CFG_BASE 0xF4440420 +#define MVHW_CP1_UTMI0_ID 0x0 +#define MVHW_CP1_UTMI1_BASE 0xF4581000 +#define MVHW_CP1_UTMI1_CFG_BASE 0xF4440444 +#define MVHW_CP1_UTMI1_USB_CFG_BASE 0xF4440420 +#define MVHW_CP1_UTMI1_ID 0x1 + +#define DECLARE_A7K8K_UTMI_TEMPLATE \ +STATIC \ +MVHW_UTMI_DESC mA7k8kUtmiDescTemplate =3D {\ + 4,\ + { MVHW_CP0_UTMI0_ID, MVHW_CP0_UTMI1_ID,\ + MVHW_CP1_UTMI0_ID, MVHW_CP1_UTMI1_ID },\ + { MVHW_CP0_UTMI0_BASE, MVHW_CP0_UTMI1_BASE,\ + MVHW_CP1_UTMI0_BASE, MVHW_CP1_UTMI1_BASE },\ + { MVHW_CP0_UTMI0_CFG_BASE, MVHW_CP0_UTMI1_CFG_BASE,\ + MVHW_CP1_UTMI0_CFG_BASE, MVHW_CP1_UTMI1_CFG_BASE },\ + { MVHW_CP0_UTMI0_USB_CFG_BASE, MVHW_CP0_UTMI1_USB_CFG_BASE,\ + MVHW_CP1_UTMI0_USB_CFG_BASE, MVHW_CP1_UTMI1_USB_CFG_BASE }\ +} + #endif /* __MVHWDESCLIB_H__ */ diff --git a/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.c b/Platform/Ma= rvell/Library/UtmiPhyLib/UtmiPhyLib.c index 95b5698..b07c038 100644 --- a/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.c +++ b/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.c @@ -33,12 +33,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DA= MAGE. **************************************************************************= *****/ =20 #include "UtmiPhyLib.h" +#include + +DECLARE_A7K8K_UTMI_TEMPLATE; =20 typedef struct { EFI_PHYSICAL_ADDRESS UtmiBaseAddr; EFI_PHYSICAL_ADDRESS UsbCfgAddr; EFI_PHYSICAL_ADDRESS UtmiCfgAddr; UINT32 UtmiPhyPort; + UINT32 PhyId; } UTMI_PHY_DATA; =20 STATIC @@ -236,48 +240,52 @@ UtmiPhyPowerUp ( STATIC VOID Cp110UtmiPhyInit ( - IN UINT32 UtmiPhyCount, IN UTMI_PHY_DATA *UtmiData ) { - UINT32 i; + EFI_STATUS Status; =20 - for (i =3D 0; i < UtmiPhyCount; i++) { - UtmiPhyPowerDown(i, UtmiData[i].UtmiBaseAddr, - UtmiData[i].UsbCfgAddr, UtmiData[i].UtmiCfgAddr, - UtmiData[i].UtmiPhyPort); - } + UtmiPhyPowerDown ( + UtmiData->PhyId, + UtmiData->UtmiBaseAddr, + UtmiData->UsbCfgAddr, + UtmiData->UtmiCfgAddr, + UtmiData->UtmiPhyPort + ); =20 /* Power down PLL */ DEBUG((DEBUG_INFO, "UtmiPhy: stage: PHY power down PLL\n")); - RegSet (UtmiData[0].UsbCfgAddr, 0x0 << UTMI_USB_CFG_PLL_OFFSET, - UTMI_USB_CFG_PLL_MASK); - - for (i =3D 0; i < UtmiPhyCount; i++) { - UtmiPhyConfig(i, UtmiData[i].UtmiBaseAddr, - UtmiData[i].UsbCfgAddr, UtmiData[i].UtmiCfgAddr, - UtmiData[i].UtmiPhyPort); + MmioAnd32 (UtmiData->UsbCfgAddr, ~UTMI_USB_CFG_PLL_MASK); + + UtmiPhyConfig ( + UtmiData->PhyId, + UtmiData->UtmiBaseAddr, + UtmiData->UsbCfgAddr, + UtmiData->UtmiCfgAddr, + UtmiData->UtmiPhyPort + ); + + Status =3D UtmiPhyPowerUp ( + UtmiData->PhyId, + UtmiData->UtmiBaseAddr, + UtmiData->UsbCfgAddr, + UtmiData->UtmiCfgAddr, + UtmiData->UtmiPhyPort + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "UtmiPhy: Failed to initialize UTMI PHY %d\n", Ut= miData->PhyId)); + return; } =20 - for (i =3D 0; i < UtmiPhyCount; i++) { - if (EFI_ERROR(UtmiPhyPowerUp(i, UtmiData[i].UtmiBaseAddr, - UtmiData[i].UsbCfgAddr, UtmiData[i].UtmiCfgAddr, - UtmiData[i].UtmiPhyPort))) { - DEBUG((DEBUG_ERROR, "UtmiPhy: Failed to initialize UTMI PHY %d\n", i= )); - continue; - } - DEBUG((DEBUG_ERROR, "UTMI PHY %d initialized to ", i)); - - if (UtmiData[i].UtmiPhyPort =3D=3D UTMI_PHY_TO_USB_DEVICE0) - DEBUG((DEBUG_ERROR, "USB Device\n")); - else - DEBUG((DEBUG_ERROR, "USB Host%d\n", UtmiData[i].UtmiPhyPort)); - } + DEBUG ((DEBUG_ERROR, "UTMI PHY %d initialized to ", UtmiData->PhyId)); + if (UtmiData->UtmiPhyPort =3D=3D UTMI_PHY_TO_USB_DEVICE0) + DEBUG((DEBUG_ERROR, "USB Device\n")); + else + DEBUG((DEBUG_ERROR, "USB Host%d\n", UtmiData->UtmiPhyPort)); =20 /* Power up PLL */ DEBUG((DEBUG_INFO, "UtmiPhy: stage: PHY power up PLL\n")); - RegSet (UtmiData[0].UsbCfgAddr, 0x1 << UTMI_USB_CFG_PLL_OFFSET, - UTMI_USB_CFG_PLL_MASK); + MmioOr32 (UtmiData->UsbCfgAddr, UTMI_USB_CFG_PLL_MASK); } =20 EFI_STATUS @@ -285,69 +293,66 @@ UtmiPhyInit ( VOID ) { - EFI_STATUS Status; - UTMI_PHY_DATA UtmiData[PcdGet32 (PcdUtmiPhyCount)]; - EFI_PHYSICAL_ADDRESS RegUtmiUnit[PcdGet32 (PcdUtmiPhyCount)]; - EFI_PHYSICAL_ADDRESS RegUsbCfg[PcdGet32 (PcdUtmiPhyCount)]; - EFI_PHYSICAL_ADDRESS RegUtmiCfg[PcdGet32 (PcdUtmiPhyCount)]; - UINTN UtmiPort[PcdGet32 (PcdUtmiPhyCount)]; - UINTN i, Count; - - Count =3D PcdGet32 (PcdUtmiPhyCount); - if (Count =3D=3D 0) { + UTMI_PHY_DATA UtmiData; + UINT8 *UtmiDeviceTable, *XhciDeviceTable, *UtmiPortType, Index; + MVHW_UTMI_DESC *Desc =3D &mA7k8kUtmiDescTemplate; + + /* Obtain table with enabled Utmi PHY's*/ + UtmiDeviceTable =3D (UINT8 *)PcdGetPtr (PcdUtmiControllers); + if (UtmiDeviceTable =3D=3D NULL) { /* No UTMI PHY on platform */ return EFI_SUCCESS; } =20 - DEBUG((DEBUG_INFO, "UtmiPhy: Initialize USB UTMI PHYs\n")); - /* Parse UtmiPhy PCDs */ - Status =3D ParsePcdString ((CHAR16 *) PcdGetPtr (PcdUtmiPhyRegUtmiUnit), - Count, RegUtmiUnit, NULL); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "UtmiPhy: Wrong PcdUtmiPhyRegUtmiUnit format\n")); + if (PcdGetSize (PcdUtmiControllers) > MVHW_MAX_XHCI_DEVS) { + DEBUG ((DEBUG_ERROR, "UTMI: Wrong PcdUtmiControllers format\n")); return EFI_INVALID_PARAMETER; } =20 - Status =3D ParsePcdString ((CHAR16 *) PcdGetPtr (PcdUtmiPhyRegUsbCfg), - Count, RegUsbCfg, NULL); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "UtmiPhy: Wrong PcdUtmiPhyRegUsbCfg format\n")); + /* Make sure XHCI controllers table is present */ + XhciDeviceTable =3D (UINT8 *)PcdGetPtr (PcdPciEXhci); + if (XhciDeviceTable =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "UTMI: Missing PcdPciEXhci\n")); return EFI_INVALID_PARAMETER; } =20 - Status =3D ParsePcdString ((CHAR16 *) PcdGetPtr (PcdUtmiPhyRegUtmiCfg), - Count, RegUtmiCfg, NULL); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "UtmiPhy: Wrong PcdUtmiPhyRegUtmiCfg format\n")); + /* Obtain port type table */ + UtmiPortType =3D (UINT8 *)PcdGetPtr (PcdUtmiPortType); + if (UtmiPortType =3D=3D NULL || PcdGetSize (PcdUtmiPortType) !=3D PcdGet= Size (PcdUtmiControllers)) { + DEBUG ((DEBUG_ERROR, "UTMI: Wrong PcdUtmiPortType format\n")); return EFI_INVALID_PARAMETER; } =20 - Status =3D ParsePcdString ((CHAR16 *) PcdGetPtr (PcdUtmiPhyUtmiPort), - Count, UtmiPort, NULL); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "UtmiPhy: Wrong PcdUtmiPhyUtmiPort format\n")); - return EFI_INVALID_PARAMETER; - } + /* Initialize enabled chips */ + for (Index =3D 0; Index < PcdGetSize (PcdUtmiControllers); Index++) { + if (!MVHW_DEV_ENABLED (Utmi, Index)) { + continue; + } + + /* UTMI PHY without enabled XHCI controller is useless */ + if (!MVHW_DEV_ENABLED (Xhci, Index)) { + DEBUG ((DEBUG_ERROR, "UTMI: Disabled Xhci controller %d\n", Index)); + return EFI_INVALID_PARAMETER; + } =20 - for (i =3D 0 ; i < Count ; i++) { /* Get base address of UTMI phy */ - UtmiData[i].UtmiBaseAddr =3D RegUtmiUnit[i]; + UtmiData.UtmiBaseAddr =3D Desc->UtmiBaseAddresses[Index]; =20 /* Get usb config address */ - UtmiData[i].UsbCfgAddr =3D RegUsbCfg[i]; + UtmiData.UsbCfgAddr =3D Desc->UtmiUsbConfigAddresses[Index]; =20 /* Get UTMI config address */ - UtmiData[i].UtmiCfgAddr =3D RegUtmiCfg[i]; + UtmiData.UtmiCfgAddr =3D Desc->UtmiConfigAddresses[Index]; =20 - /* - * Get the usb port number, which will be used to check if - * the utmi connected to host or device - */ - UtmiData[i].UtmiPhyPort =3D UtmiPort[i]; - } + /* Get UTMI PHY ID */ + UtmiData.PhyId =3D Desc->UtmiPhyId[Index]; =20 - /* Currently only Cp110 is supported */ - Cp110UtmiPhyInit (Count, UtmiData); + /* Get the usb port type */ + UtmiData.UtmiPhyPort =3D UtmiPortType[Index]; + + /* Currently only Cp110 is supported */ + Cp110UtmiPhyInit (&UtmiData); + } =20 return EFI_SUCCESS; } diff --git a/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.h b/Platform/Ma= rvell/Library/UtmiPhyLib/UtmiPhyLib.h index f9b4933..0d7d72e 100644 --- a/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.h +++ b/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.h @@ -42,7 +42,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMA= GE. #include #include #include -#include =20 #define UTMI_USB_CFG_DEVICE_EN_OFFSET 0 #define UTMI_USB_CFG_DEVICE_EN_MASK (0x1 << UTMI_USB_CFG_DEV= ICE_EN_OFFSET) diff --git a/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.inf b/Platform/= Marvell/Library/UtmiPhyLib/UtmiPhyLib.inf index f1e57f4..6e33cdd 100644 --- a/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.inf +++ b/Platform/Marvell/Library/UtmiPhyLib/UtmiPhyLib.inf @@ -50,15 +50,12 @@ DebugLib IoLib MemoryAllocationLib - ParsePcdLib PcdLib =20 [Sources.common] UtmiPhyLib.c =20 -[FixedPcd] - gMarvellTokenSpaceGuid.PcdUtmiPhyCount - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUsbCfg - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiCfg - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiUnit - gMarvellTokenSpaceGuid.PcdUtmiPhyUtmiPort +[Pcd] + gMarvellTokenSpaceGuid.PcdUtmiControllers + gMarvellTokenSpaceGuid.PcdUtmiPortType + gMarvellTokenSpaceGuid.PcdPciEXhci diff --git a/Platform/Marvell/Marvell.dec b/Platform/Marvell/Marvell.dec index 25a4258..00d99fa 100644 --- a/Platform/Marvell/Marvell.dec +++ b/Platform/Marvell/Marvell.dec @@ -156,11 +156,8 @@ gMarvellTokenSpaceGuid.PcdChip3ComPhyInvFlags|{ 0x0 }|VOID*|0x30000177 =20 #UtmiPhy - gMarvellTokenSpaceGuid.PcdUtmiPhyCount|0|UINT32|0x30000205 - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUsbCfg|{ 0x0 }|VOID*|0x30000206 - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiCfg|{ 0x0 }|VOID*|0x30000207 - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiUnit|{ 0x0 }|VOID*|0x30000208 - gMarvellTokenSpaceGuid.PcdUtmiPhyUtmiPort|{ 0x0 }|VOID*|0x30000209 + gMarvellTokenSpaceGuid.PcdUtmiControllers|{ 0x0 }|VOID*|0x30000206 + gMarvellTokenSpaceGuid.PcdUtmiPortType|{ 0x0 }|VOID*|0x30000207 =20 #MDIO gMarvellTokenSpaceGuid.PcdMdioBaseAddress|0|UINT64|0x3000043 diff --git a/Silicon/Marvell/Documentation/PortingGuide.txt b/Silicon/Marve= ll/Documentation/PortingGuide.txt index 1a30c46..8a9f603 100644 --- a/Silicon/Marvell/Documentation/PortingGuide.txt +++ b/Silicon/Marvell/Documentation/PortingGuide.txt @@ -278,33 +278,23 @@ UTMI PHY configuration =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D In order to configure UTMI, following PCDs are available: =20 - - gMarvellTokenSpaceGuid.PcdUtmiPhyCount - (Indicates how many UTMI PHYs are available on platform) - -Next four PCDs are in unicode string format containing settings for all de= vices -separated with semicolon. - - - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiUnit - (Indicates base address of the UTMI unit) - - - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUsbCfg - (Indicates address of USB Configuration register) + - gMarvellTokenSpaceGuid.PcdUtmiControllers + (Array with used controllers + Set to 0x1 for enabled, 0x0 for disabled) =20 - - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiCfg - (Indicates address of external UTMI configuration) + - gMarvellTokenSpaceGuid.PcdUtmiPortType + (Indicates type of the connected USB port: =20 - - gMarvellTokenSpaceGuid.PcdUtmiPhyUtmiPort - (Indicates type of the connected USB port) + UTMI_PHY_TO_USB_HOST0 0 + UTMI_PHY_TO_USB_HOST1 1 + UTMI_PHY_TO_USB_DEVICE0 2 ) =20 Example ------- =20 # UtmiPhy - gMarvellTokenSpaceGuid.PcdUtmiPhyCount|2 - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiUnit|L"0xF2580000;0xF2581000" - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUsbCfg|L"0xF2440420;0xF2440420" - gMarvellTokenSpaceGuid.PcdUtmiPhyRegUtmiCfg|L"0xF2440440;0xF2440444" - gMarvellTokenSpaceGuid.PcdUtmiPhyUtmiPort|L"0x0;0x1" + gMarvellTokenSpaceGuid.PcdUtmiControllers|{ 0x1, 0x1 } + gMarvellTokenSpaceGuid.PcdUtmiPortType|{ 0x0, 0x1 } =20 =20 SPI driver configuration --=20 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel