From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.86]) by mx.groups.io with SMTP id smtpd.web12.22295.1644379802969103773 for ; Tue, 08 Feb 2022 20:10:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@adlinktech.com header.s=selector2 header.b=VbA/modR; spf=pass (domain: adlinktech.com, ip: 40.107.237.86, mailfrom: antonyabee.prakashxv@adlinktech.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HH3iTDn9SodZkikDRyx8VscVZVBOD/sAsRRlnhVYE6kDv/vTCMPTgWVpUEz/NmT/SA5HHNASPdsyeammH+QuDrGVb0GH0L56hD+hGilE2isCQbb2bV0PeA3SQI0PxHkUE2xLtEiu7sQq3nIWdNKEH0T/ojmZnInkBgiy04WqmkzGgH0iSJTZM9bCTyd/YHcBHuShYJM+AOakRjfE9DC95iy3QjbrAIvFw6XeJFth+ERSQV4IAJq6DmuKuj/ZON+K9M2YXuskyUDUoxKky05EK3R6yatKh1Es5WPSl8Ii2BYhIOeIw1BupIbDAo//T6uGQZx5h8lezo9h4iBu2VthXw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EAdhmFOvycfdqMotE3Zhq0OtVlBRSS1w6RuEBLBYnO4=; b=hLQftJHbH+SVwWfcB5Caj0f2I6HGE6e768uB49/kOQraTEF6KBHwhOS0D3V0CvyfCMwY7IGR6nmA+S2viBH5XnaJLZ5Yk0PP1LeNQtLAkJzGZkKx5S+kSyvYQDkzmFQVnUtIDLI+1n4z+gCNNmi5sY3/ClnuWuXUR/MqpndvNlIZGmmSmjb4EBfc9seHd6eHPBNE78G5j/BzLN4izsV/EOe+90Ygk9L/3bUiiUopamvRGxeJIm1Oc/63m8fqcQg3W7VlOqW/uWrjZdX/awgVPVHS8fvJvD+TyJPEuzBCL/cweqgrh66oLsAgusE0Naf5GUiXfFf8oiTztMBrDLhrVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adlinktech.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EAdhmFOvycfdqMotE3Zhq0OtVlBRSS1w6RuEBLBYnO4=; b=VbA/modRZoIqUHh6HpFcEzSu5RMn9zAVWWaRLIjrSWBi/l0CgD/A0ADh/mpna6AmGLIZb1n4a9l4r89Hy7hS1OwuMFficKD3LwBHRbdtcKrGkdJC2kkqm/P+nToGa7OdnzPiu2H7QiZjCgaASABxXPAPzFGKIsnnd0Xsp9zxOlQ= Received: from PH0PR05MB8750.namprd05.prod.outlook.com (2603:10b6:510:b5::6) by BN6PR05MB3124.namprd05.prod.outlook.com (2603:10b6:404:bb::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Wed, 9 Feb 2022 04:09:59 +0000 Received: from PH0PR05MB8750.namprd05.prod.outlook.com ([fe80::481b:b966:b6e0:db51]) by PH0PR05MB8750.namprd05.prod.outlook.com ([fe80::481b:b966:b6e0:db51%9]) with mapi id 15.20.4975.011; Wed, 9 Feb 2022 04:09:59 +0000 From: "Antony Abee" To: "devel@edk2.groups.io" Subject: XhciDxe driver not driving USB controller connected in Pcie switch Thread-Topic: XhciDxe driver not driving USB controller connected in Pcie switch Thread-Index: AQHYHWq/vB03m/fHRUCi+JccZE3T8Q== Date: Wed, 9 Feb 2022 04:09:59 +0000 Message-ID: Accept-Language: en-IN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 9cd91973-9c3d-2a99-4224-95a65f853800 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=adlinktech.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 903d229e-f8d0-444f-a942-08d9eb8209d8 x-ms-traffictypediagnostic: BN6PR05MB3124:EE_ x-ms-exchange-atpmessageproperties: SA|SL x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ti+7a3XlZk9AVAW3HvET26krNbjmhZBcvS2NdBe7Ku/JeZ8ONctIJrKyMqbZB/ntUC5X4XnkTGa9stEnn9b1O1Xq/XLznGx5qIn7Gb4hq8g2P+xAHQvDlknXS4Kw87EpWqpOKNtBg5ljKNpPSeHbVZvzX+A+I72PirbB+brjAFa/FR7943jXjgPFmEaXPH9eYwqLCYo0i/dlQ3mD7ODrKPy7492u0goCXkJ0QODKR5y+baBHOmIGMzMUvabfCYUX+Nou91gptxsLSCcvdkMJPigigcvftrQzvYhZfUl/uI4UqbkyT/EcNqAZJ+ctYDH+zRLtIExyzsU6jgccivWhy8rSBmygzildBpF1DeKIiSXFl0C4Yk82e+xQ+zwQPls0VcWuTHFOoLJVVE1HxQLlBn2HNViU6NBB7VJc4td8exZePcVNDs1mu4z4S3/yNZ2A/+k6FCt3/+xC4yfMiEAVJmlz19mNMFnsFyRfIEjYHIR8j3nVOWa0Wnbp6vAZYY/KU+dE/auqn0LQN7oIK7OViC8+GMxHpeJiuPYN7n+9ObQ43CiYAhtMAYLBwVA1q3P9XEk0O96f19zix+NJvEKw1/71Wb9d9QKbYK4vGWPvWOxSAHH9KWjVxuijHzGDD5hwkk/JqUjVX/c3SfSOs1wg24sVzVgsNlq4VuKAJe2fh1yNpYEchDonH3q1jBtsVzw2+SRZAWdQl1Eu3MpqV6lNiv1Q4KzvC/N4cCGUklFIXhx8bd3KqU5+3LF3qxqr3XemmMtA3O9mGJfqp+Dt6yTJdVnkbtMQiefOA7y8jZ33vEGT7oWZeRyiafCwQlWuNq0vWRx37cEcAialsQZYyN4SXQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR05MB8750.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(316002)(6916009)(71200400001)(66946007)(33656002)(122000001)(966005)(19627405001)(6506007)(64756008)(38070700005)(26005)(186003)(508600001)(66556008)(8676002)(76116006)(2906002)(66446008)(86362001)(83380400001)(55016003)(9686003)(38100700002)(8936002)(52536014)(5660300002)(166002)(66476007)(91956017)(19627235002)(7696005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?SNjCKOeTL5Sp3/Dqx/yr6teVuoSpsz4S0i+cuqi9kVwwRkYKZ7F3lDKVQI?= =?iso-8859-1?Q?gzB47mTsYwWySqw/XWBj+OvSX/K89jcdmLuc8THoABZQdwkF/SI2zNkgYK?= =?iso-8859-1?Q?Af2R6CTpjZIoHCv9clpxtNg2bp7h4dTAmjYj2LYGG4CV3VUKVqBhgYTUcl?= =?iso-8859-1?Q?H/tDKLWqJflB/Xf2LOdWCc0L62Q0E6cKSJuEDlKpHq512g1YwcZoUYjSmp?= =?iso-8859-1?Q?qOKLzYgb+ozJd7U9BWCFUtqIemlHgVP6LH6X9HzXDbt/l7dkrJZXJQl8U+?= =?iso-8859-1?Q?Wu3+zi+pjK/wxFU/3ahk70R6zS6IwqzencVSoJypcO0dN0SJn2IxW3IZis?= =?iso-8859-1?Q?vqedPMhAXlMUK3FcNOARAWp0B0CnrJuOpGtQdnH8zdOzd3hAzScCIR+LGb?= =?iso-8859-1?Q?y8pnInTqFdJJqEk2IU7MyCkZ27fNvj6LgJeXln2gjJ1JyJnk6UEHM/LjXw?= =?iso-8859-1?Q?DYW8G9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FoqwtkX3Mdh?= =?iso-8859-1?Q?BQLw1NNiyZGp8rOoSOAwGYz2Pclk6bJAHIFw9LMRkG654ONkrR8PhI1Rrd?= =?iso-8859-1?Q?HKQlMpZL7lkfsQ3/Y8Uz4cgA0DqDC2CNKxAl6Y6aU/QqVfzdmzxWFr7Oaa?= =?iso-8859-1?Q?Y27+j1n2dGs1l0Pi6x+dSQ63nRhrx0pfejAK2x88YJ17fS3jIKEgGho4P+?= =?iso-8859-1?Q?O8zFbA7ik0yF7bBWn575B2tcmlZaOBIxvqOutDkdvA2boTae6AzNEHWb/C?= =?iso-8859-1?Q?s871qHdltPplnmIXIX9GAKhx9Vahg6SUZoMWLjdLZal94UWdMDjErhogPH?= =?iso-8859-1?Q?GW0Ai+EtXITslnKjk3cp8avy92de7TnaXIjXfkXktUEbpRk9MVifsv4CjP?= =?iso-8859-1?Q?OnLurx3QfQbLKDtb6K/92yIbY420kt2bBik7Zut2NQWd5I?= MIME-Version: 1.0 X-OriginatorOrg: adlinktech.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR05MB8750.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 903d229e-f8d0-444f-a942-08d9eb8209d8 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2022 04:09:59.2012 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 6c7b546b-78e1-414f-8297-48bb0f8ca053 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GSjLYKoVPxKdxMr6dmLfkvwrbAVTl+FdUnoXNno8abMS+AwlB/PgCwE/cJBB/ODKlYTisA9QRUvwMLPzNoteeu5mIgV2NPWRZZe1Dmmvn0fnbJtcn2Jwqw2O1xoFECZT X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3124 Content-Language: en-IN Content-Type: multipart/alternative; boundary="_000_PH0PR05MB87506061EF49EC4093D7BCAEF82E9PH0PR05MB8750namp_" --_000_PH0PR05MB87506061EF49EC4093D7BCAEF82E9PH0PR05MB8750namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, We are using a custom board based on Ampere SOC. We have two Renesas USB co= ntroller uPD720201 in our setup. 1. Renesas USB controller on custom module based on Ampere SOC. - Connected to Pcie Root complex port directly. 2. Renesas USB controller on custom carrier board. - Connected to Pericom Pcie Switch (PI7C9X2G) and the switch in-turn connected to another Pcie Root complex port. We are using the below driver for downloading the USB controller firmware. https://github.com/Linaro/OpenPlatformPkg/tree/4edacd6541c22eac97098c9f6818= 6438e775fb0c/Drivers/Xhci/RenesasFirmwarePD720202 This driver will just download the firmware for the controller. It will not= drive the device. This driver will be called in preference, and XhciDxe will be invoked after RenesasPD720202DriverSupported returns EFI_UNSUPPORTED. Firmware downloading successfully and device is driven successfully with Xh= ciDxe for the device connected directly in Pcie Root complex port. Issues with USB controller connected in Pcie switch: RenesasFirmwarePD720202 driver: For USB controller connected in Pcie switch, firmware is not downloading as= the device handle is not passed to Supported() function during ExitBootSer= vice (ConnectController()) of edk2. NOTE: Device is detected during pci bus enumeration. Also verified device d= etection in uefi shell using "pci" command. We did a workaround implementation which will do pci bus scan to detect the= USB controller connected in Pcie switch and download the firmware. Device = detected and firmware downloaded successfully. But still the USB devices (mass storage/keyboard) are not detecting in Setu= p page and Uefi Shell. We feel the XhciDxe driver did not drive this device as only the parent dev= ices handle passed to this driver. NOTE: USB ports are active, devices detected and working well in OS side. We feel the Xhci driver in OS, drives the USB controller device when the co= ntroller has firmware. How to pass the device handle for the USB controller connected in Pcie swit= ch during ExitBootService ? We understand if RenesasFirmwarePD720202 driver and XhciDxe get the device = handle for the USB controller that is connected in Pcie switch, the above m= entioned issues will get resolved. Please advise if our understanding is wr= ong here. Please provide your inputs. Thanks, Antony --_000_PH0PR05MB87506061EF49EC4093D7BCAEF82E9PH0PR05MB8750namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,=0A=
=0A=
We are using a custom board based on Ampere SOC. We have two Renesas USB co=
ntroller uPD720201 in our setup.=0A=
=0A=
1. Renesas USB controller on custom module based on Ampere SOC.=0A=
       - Connected to Pcie Root complex port directly.=
=0A=
=0A=
2. Renesas USB controller on custom carrier board.=0A=
       - Connected to Pericom Pcie Switch (PI7C9X2G) an=
d the switch in-turn=0A=
         connected to another Pcie Root complex po=
rt.=0A=
=0A=
We are using the below driver for downloading the USB controller firmware.<=
/span>=0A=
https://github.com/Linaro/OpenPlatformPkg/tree/4edacd654=
1c22eac97098c9f68186438e775fb0c/Drivers/Xhci/RenesasFirmwarePD720202=0A=
=0A=
This driver will just download the firmware for the controller. It will not=
 drive the device.=0A=
This driver will be called in preference, and XhciDxe will be invoked=0A=
after RenesasPD720202DriverSupported returns EFI_UNSUPPORTED.=0A=
=0A=
Firmware downloading successfully and device is driven successfully with Xh=
ciDxe for the device connected directly in Pcie Root complex port.=0A=
=0A=
Issues with USB controller connected in Pcie switch:=0A=
=0A=
RenesasFirmwarePD720202 driver:=0A=
For USB controller connected in Pcie switch, firmware is not downloading as=
 the device handle is not passed to Supported() function during ExitBootSer=
vice (ConnectController()) of edk2.=0A=
=0A=
NOTE: Device is detected during pci bus enumeration. Also verified device d=
etection in uefi shell using "pci" command.=0A=
=0A=
We did a workaround implementation which will do pci bus scan to detect the=
 USB controller connected in Pcie switch and download the firmware. Device =
detected and firmware downloaded successfully.=0A=
But still the USB devices (mass storage/keyboard) are not detecting in Setu=
p page and Uefi Shell.=0A=
=0A=
We feel the XhciDxe driver did not drive this device as only the parent dev=
ices handle passed to this driver.=0A=
=0A=
NOTE: USB ports are active, devices detected and working well in OS side.=
=0A=
We feel the Xhci driver in OS, drives the USB controller device when the co=
ntroller has firmware.=0A=
=0A=
=0A=
How to pass the device handle for the USB controller connected in Pcie swit=
ch during ExitBootService ?=0A=
=0A=
We understand if RenesasFirmwarePD720202 driver and XhciDxe get the device =
handle for the USB controller that is connected in Pcie switch, the above m=
entioned issues will get resolved. Please advise if our understanding is wr=
ong here.=0A=
=0A=
Please provide your inputs.=0A=
=0A=
Thanks,=0A=
Antony

--_000_PH0PR05MB87506061EF49EC4093D7BCAEF82E9PH0PR05MB8750namp_--