From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.81]) by mx.groups.io with SMTP id smtpd.web10.1953.1591642375361237334 for ; Mon, 08 Jun 2020 11:52:56 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=R0EPIWDT; spf=pass (domain: oss.nxp.com, ip: 40.107.20.81, mailfrom: wasim.khan@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BItl+MaJPcfCsNzh3IdDz3K5EhGzfeXe03s6Feiit6O8sJJv4FvgvtKKGfWQwgUFe8ZL8A12o+qn+YYrirzQpXwE6NO0/JoEz3nS4zSSAEVe3Z9OUYpUqrQNl0BGw8CU89SK1uZrISfRSANJx2D7SOHnKH5GNQk/0JxLcFUWe5vKGAHXRlGBCBh8jWOMFQsTizK2KfVFmnY8TBpAL6xLfaWJbqpK82UaqB3VV7f+7TGcT9/ONa/KLDlpkaOMpkDYJKlKKhtHLqCe9f5m73+KzYfLaCyK4vBAsPNd5qjHQuuYKnaJsSZLoBcjQ5J53TaZtqCoPUQqt/Q+oW1ncwfZ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ciNg0OSJuSAp8IJnCqCa4Ap9P+3duW0DkKKHY6WFTqI=; b=Uxwa0icVVTI5a9Qd5SOoypiJI45dclyIZq1CvZcEV84XB7wrJS+dxOcXqUw2L/PMUMXBWPMV17Roby4kojBwOLW9DX4l8cljcZc3L9c9sDAUjS+4BiSiWzlkG7pt2vsLprDPYmAKT6hZk3bxgbAhNn4QKcVC896jqtd6AuMGARxGO5UE4oFj61yOfMG6+2WpBMR24WZPorPv1eLFCOswOIAs+kmIrR8WE6+7tX8VJwgaK5uiC4RsMDRmRWgQL6V0By+FoZ5MKiNgHmgqla/iKNQw39mMGH6z9rvb63Fmdb3Vvb82No5I4bjOe+a4cdwXpPM3T2dyNphyD0Ps94S9Mw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ciNg0OSJuSAp8IJnCqCa4Ap9P+3duW0DkKKHY6WFTqI=; b=R0EPIWDTFEWT41zFTFp1mISxYmlvS8o+v8Lwp4/3TtVP1/5rxbTFBFk7heGdjkqHUZeU0EV0AiS2htNH2iTNu0BBHRTIU52lTesIViMCe+L+Rkjd0BHZuQtvI100HXhetZq//p4/StT8/rIvyCULqVW8cR0VTl8TsnKWGK8uMjw= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=oss.nxp.com; Received: from VE1PR04MB6702.eurprd04.prod.outlook.com (2603:10a6:803:123::13) by VE1PR04MB6606.eurprd04.prod.outlook.com (2603:10a6:803:127::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Mon, 8 Jun 2020 18:52:53 +0000 Received: from VE1PR04MB6702.eurprd04.prod.outlook.com ([fe80::81c4:97a6:7592:f225]) by VE1PR04MB6702.eurprd04.prod.outlook.com ([fe80::81c4:97a6:7592:f225%7]) with mapi id 15.20.3066.023; Mon, 8 Jun 2020 18:52:53 +0000 From: Wasim Khan To: devel@edk2.groups.io, meenakshi.aggarwal@nxp.com, V.Sethi@nxp.com, ard.biesheuvel@arm.com, leif@nuviainc.com CC: Wasim Khan Subject: [PATCH edk2-platforms v5 0/3] Add SerDes Support Date: Tue, 9 Jun 2020 00:22:32 +0530 Message-ID: <1591642355-26470-1-git-send-email-wasim.khan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 X-ClientProxiedBy: PN1PR01CA0078.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::18) To VE1PR04MB6702.eurprd04.prod.outlook.com (2603:10a6:803:123::13) Return-Path: wasim.khan@oss.nxp.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wasimk-VirtualBox.nxp.com (157.37.163.9) by PN1PR01CA0078.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Mon, 8 Jun 2020 18:52:49 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [157.37.163.9] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5110c743-58a9-426a-f28e-08d80bdd2614 X-MS-TrafficTypeDiagnostic: VE1PR04MB6606: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 042857DBB5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zR4kpmdlNaLq8sTswNNlb4Zt7BHCl4J/ZGfr6UWeduS9FjfUzg8AAvpMDRGZZD7tdDwbmSieyf388qNuoFxTwEekHLZZKkyv5obA8DkC9SP3paMbqXGYQmUy87aqJLxaPSuk6E6EIwr7xeogbpW1bVoWCZbR4g54jlzG/w1AIkYEW60I3IIltQigPvfieJ91ZRJ/T5ar1KQhvnorEgjdc2Vjij2GttoP64Tu25R1gspLkR2SGO8TRURit1RjbFMgwpalFGFLUd8PNDpA6Odjk3N+BtGYlYq2eBTxdzIxOFsiTeQVp3avLNzQezFWxAr7NyaNjmHXHD+UZUXe+i7RKxdt2CB2LJM1yLuEKnCl1Lz8MNFZpn4pv1Omx9x4+SYppx6J0FXI41cwtHgC1GgF7A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6702.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(376002)(366004)(39860400002)(346002)(396003)(26005)(66946007)(966005)(8936002)(66476007)(4326008)(6486002)(5660300002)(66556008)(956004)(52116002)(2616005)(86362001)(19627235002)(6512007)(8676002)(316002)(478600001)(2906002)(83380400001)(6506007)(6666004)(186003)(16526019)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: xEBAG0qHTbSRqqBYgfv3s8tCdTx7DPewvbFwO/k9Qq7QguP6o6UneXGNq3Ow4viMG40lxtKw5BdYUjkG/O+jDPOtZ+60A5IVVqdpBPdg+oDfyawCcwlvv/9Te8lxUyyV5k34cykBxfeqxIH9L2RIudsQiOl8pBuqtXcyv2maOU6/mgnU+x07vOHfpU+cVMThRY4jtxHWQ2Bb+k0ThVjBriHi5fcnZEA1ZT+L3PIIQszWOFdZXc6V5AMdo+0ls05ri/U+HZ9gjmPtM4OMorKfQG4d1mbhaAvIui1/ik6vcTrOzCOXzNQO5P1cUyRjHQCQ5wfTkDGzLISDL13tyXvu//nLqLAD+WqJMlFPX+xXGTGc/Z23vavsjafyLrBcx8pPOthVcWFOwFJAoKZHIEmLYaXkPt95Giu7+qJg9M+kLlCedjK/k9r9QQ7aoo0d7ie0UojJx/ZlS6RICJxgRu9MNXuTrVt/9mHQ0cHcM6wrHW8= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5110c743-58a9-426a-f28e-08d80bdd2614 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2020 18:52:53.0278 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3bqY2Qj7nl1d3Ev8XVJj2h7TO+DVs4iTwj8Wa7F6jKd+zn1z+8+yq+cc1jQ9JVBsm1Cz8FcaoY75DYkqbff2jw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6606 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Wasim Khan NXP SoCs supports different Serdes protocols using reset configuration word (RCW).=20 Based on Serdes protocol value in reset configuration word (RCW) different IP blocks gets enabled in HW. This patch series implements SerDesHelperLib and provide SoC specific serdes configuration for LS1043A, which can be used by different IPs (Ex: PCIe) to know the enabled interfaces and perform the required initialization. V1 Series can be referred here: https://edk2.groups.io/g/devel/message/60542 V2 Series can be referred here: https://edk2.groups.io/g/devel/message/60836 V3 Series can be referred here: https://edk2.groups.io/g/devel/message/60901 Changes in V4: - Included SocSerDes.h , which got missed in V3 Changes in V5: - Corrected enum value and CheckPatch fix Wasim Khan (3): Silicon/NXP/Library: Implement SerDesHelperLib Silicon/NXP: LS1043A: Add SerDes Support Silicon/NXP: PciHostBridgeLib: Initialize only enabled PCIe controllers Silicon/NXP/NxpQoriqLs.dec | 1 + Silicon/NXP/LS1043A/LS1043A.dsc.inc | 2 + Silicon/NXP/LS1043A/Library/SocLib/SocLib.inf | 6 + Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 1 + Silicon/NXP/Library/SerDesHelperLib/SerDesHelperLib.inf | 28 ++++ Silicon/NXP/Include/Library/SerDes.h | 28 ++++ Silicon/NXP/Include/Library/SerDesHelperLib.h | 64 ++++++++ Silicon/NXP/LS1043A/Include/SocSerDes.h | 33 ++++ Silicon/NXP/LS1043A/Library/SocLib/SerDes.c | 119 ++++++++++= ++++ Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c | 35 ++++- Silicon/NXP/Library/SerDesHelperLib/SerDesHelperLib.c | 164 ++++++++++= ++++++++++ 11 files changed, 480 insertions(+), 1 deletion(-) create mode 100644 Silicon/NXP/Library/SerDesHelperLib/SerDesHelperLib.inf create mode 100644 Silicon/NXP/Include/Library/SerDes.h create mode 100644 Silicon/NXP/Include/Library/SerDesHelperLib.h create mode 100644 Silicon/NXP/LS1043A/Include/SocSerDes.h create mode 100644 Silicon/NXP/LS1043A/Library/SocLib/SerDes.c create mode 100644 Silicon/NXP/Library/SerDesHelperLib/SerDesHelperLib.c --=20 2.7.4