From nobody Mon Feb 9 06:00:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39931+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39931+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1556841039; cv=none; d=zoho.com; s=zohoarc; b=NDPsIqImJsHJq2pdm7dmfn9SKIfpHGvyrp+2PIHnixhM8F9hqf7VHtsU2nfSNeDIprU9OME5LTaABaEwHgNoeeeixyds7+QwNuTX3or8MAW/yY1gZ7Ya1vGEn0qfLFE/M2WOCP/zjlP90dwnBu4EEGt2CGbhqrNCjTcnLAV350Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556841039; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=HDBf122MwfEVyHOAjHDiKc56hsoeUVRQNkHiPPfnhns=; b=k3S2ar2IjIA6GTmuKDQ9VLVaPtYSr90IdFLysW0NZyltmE7j5K0NTfDiSqiM7wlxKWk2fru9m+z55ZiBcR7s0YQcMt8fkeAV6s+NzhtynRQ4Y0bu8BXeMujDCxJcd35MK39l0WcWVineMyTrlIcLIJ0vW4q7/BB9BrMVxBJIP/Y= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39931+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556841039872688.4079796131383; Thu, 2 May 2019 16:50:39 -0700 (PDT) Return-Path: X-Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by groups.io with SMTP; Thu, 02 May 2019 16:50:39 -0700 X-Received: by mail-lj1-f193.google.com with SMTP id z26so3800885ljj.2 for ; Thu, 02 May 2019 16:50:38 -0700 (PDT) X-Gm-Message-State: APjAAAXG3tMBRnK7gLxg2k0N2VQMVl7OfLatHg59lWP8HpEdl2cgk7r5 gdIi5rnnBgCPhhnyo90CUpDxJfUG5uoe+g== X-Google-Smtp-Source: APXvYqw6KEziYTxNTPMx5CJcUDTOBj1v03/JwHJyDhynA1su682d93JNdiiv1a7T8sdxOuL22EkRjw== X-Received: by 2002:a2e:984d:: with SMTP id e13mr2502993ljj.61.1556841036773; Thu, 02 May 2019 16:50:36 -0700 (PDT) X-Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id o17sm74078lji.23.2019.05.02.16.50.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 May 2019 16:50:36 -0700 (PDT) From: "Marcin Wojtas" To: devel@edk2.groups.io Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com, kostap@marvell.com, Jici.Gao@arm.com Subject: [edk2-devel] [edk2-platforms: PATCH 3/4] Marvell/Drivers: MvPhyDxe: Introduce 88E1112 initialization Date: Fri, 3 May 2019 01:50:15 +0200 Message-Id: <1556841016-10342-4-git-send-email-mw@semihalf.com> In-Reply-To: <1556841016-10342-1-git-send-email-mw@semihalf.com> References: <1556841016-10342-1-git-send-email-mw@semihalf.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mw@semihalf.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556841039; bh=1Mwrts9H4imys2Q+HYah0dcNXCHcJnR1HAYUtZwB2eA=; h=Cc:Date:From:Reply-To:Subject:To; b=LsVYNTKZGI3h90czVb+CPM4cJ0De2v052L1UCxIY+wJS1QhdRFJuY/jh7bShw6hnKZS Nmx6/I+MkpQ0drfUd90DvIde7rOPYRIR1aA7JAlpbT20yOqxU5wOeBp/IXrtAVX0329jz ywH1EVuE5a+5UcyNFkfpFixEdSsAv7sfvZg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This patch adds 88E1112 PHY support and updates PortingGuide accordingly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.h | 17 ++++++++++- Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 31 ++++++++++++++++++++ Silicon/Marvell/Documentation/PortingGuide.txt | 7 +++-- 3 files changed, 51 insertions(+), 4 deletions(-) diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.h b/Silicon/Marv= ell/Drivers/Net/MvPhyDxe/MvPhyDxe.h index 66974bb..cd5a475 100644 --- a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.h +++ b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.h @@ -75,7 +75,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMA= GE. #define MIIM_88E1111_HWCFG_FIBER_COPPER_RES 0x2000 =20 typedef enum { - MV_PHY_DEVICE_1512 + MV_PHY_DEVICE_1512, + MV_PHY_DEVICE_1112 } MV_PHY_DEVICE_ID; =20 typedef @@ -97,4 +98,18 @@ MvPhyInit1512 ( IN OUT PHY_DEVICE *PhyDev ); =20 +/** + Initialize Marvell 88E1112 PHY. + + @param[in] MvPhyProtocol Marvell PHY protocol instance. + @param[in out] *PhyDevice PHY device structure. + +**/ +STATIC +EFI_STATUS +MvPhyInit1112 ( + IN CONST MARVELL_PHY_PROTOCOL *MvPhyProtocol, + IN OUT PHY_DEVICE *PhyDevice + ); + #endif diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c b/Silicon/Marv= ell/Drivers/Net/MvPhyDxe/MvPhyDxe.c index 780e8bd..08a8ed0 100644 --- a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c +++ b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c @@ -66,6 +66,7 @@ STATIC UINT8 * CONST PhySmiAddresses =3D PcdGetPtr (PcdPh= ySmiAddresses); =20 STATIC MV_PHY_DEVICE MvPhyDevices[] =3D { { MV_PHY_DEVICE_1512, MvPhyInit1512 }, + { MV_PHY_DEVICE_1112, MvPhyInit1112 }, { 0, NULL } }; =20 @@ -382,6 +383,36 @@ MvPhyInit1512 ( return EFI_SUCCESS; } =20 +/** + Initialize Marvell 88E1112 PHY. + + @param[in] MvPhyProtocol Marvell PHY protocol instance. + @param[in out] *PhyDevice PHY device structure. + +**/ +STATIC +EFI_STATUS +MvPhyInit1112 ( + IN CONST MARVELL_PHY_PROTOCOL *MvPhyProtocol, + IN OUT PHY_DEVICE *PhyDevice + ) +{ + EFI_STATUS Status; + + MvPhyM88e1111sConfig (PhyDevice); + + if (PcdGetBool (PcdPhyStartupAutoneg)) { + Status =3D MvPhyConfigureAutonegotiation (PhyDevice); + if (EFI_ERROR (Status)) { + return Status; + } + + MvPhyParseStatus (PhyDevice); + } + + return EFI_SUCCESS; +} + EFI_STATUS MvPhyInit ( IN CONST MARVELL_PHY_PROTOCOL *Snp, diff --git a/Silicon/Marvell/Documentation/PortingGuide.txt b/Silicon/Marve= ll/Documentation/PortingGuide.txt index 2603980..9dee5c8 100644 --- a/Silicon/Marvell/Documentation/PortingGuide.txt +++ b/Silicon/Marvell/Documentation/PortingGuide.txt @@ -146,7 +146,7 @@ Example PHY Driver configuration =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D MvPhyDxe provides basic initialization and status routines for Marvell PHY= s. -Currently only 1518 series PHYs are supported. Following PCDs are required: +Currently only 1512 and 1112 series PHYs are supported. Following PCDs are= required: =20 - gMarvellTokenSpaceGuid.PcdPhyStartupAutoneg (boolean - if true, driver waits for autonegotiation on startup) @@ -162,6 +162,7 @@ MV_PHY_DEVICE_ID: =20 typedef enum { 0 MV_PHY_DEVICE_1512, + 1 MV_PHY_DEVICE_1112, } MV_PHY_DEVICE_ID; =20 It should be extended when adding support for other PHY models. @@ -170,9 +171,9 @@ Disable autonegotiation: =20 gMarvellTokenSpaceGuid.PcdPhyStartupAutoneg|FALSE =20 -assuming, that PHY models are 1512: +assuming, that PHY models are 1512 and 1112 for two consecutive ports: =20 - gMarvellTokenSpaceGuid.PcdPhyDeviceIds|{ 0x0, 0x0 } + gMarvellTokenSpaceGuid.PcdPhyDeviceIds|{ 0x0, 0x1 } =20 =20 MDIO configuration --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39931): https://edk2.groups.io/g/devel/message/39931 Mute This Topic: https://groups.io/mt/31476856/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-