From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 87B81941837 for ; Fri, 13 Oct 2023 12:29:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=KMQJvw99Vo5LSZrioIj/YS3TXKFYuwv+leMvv5dbwFA=; c=relaxed/simple; d=groups.io; h=From:Date:Subject:MIME-Version:Message-Id:References:In-Reply-To:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1697200140; v=1; b=n4Ta1UXZYEJT+JapQ+EFd4A4QRpyQMRV+QKpTkqOSUGkSie7Nqwa1QxX2Ln6df1LJ/Sn4Jhs tjSse1pJKGewWK1xMy4pJS+bU5L07LbRsK+jHz/B9Orq3Sap2A6f9qx1JqF5Aic9T80RrferHdY r7d4kDPuhsRLJ1DCIvUgNmq0= X-Received: by 127.0.0.2 with SMTP id E8f1YY7687511xcWclwmYH5Z; Fri, 13 Oct 2023 05:29:00 -0700 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web11.37083.1697200139266424089 for ; Fri, 13 Oct 2023 05:28:59 -0700 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 24B26260B30; Fri, 13 Oct 2023 14:28:57 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl X-Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id mjM7QUV0KSSx; Fri, 13 Oct 2023 14:28:55 +0200 (CEST) X-Received: from [172.17.0.1] (83.11.27.172.ipv4.supernova.orange.pl [83.11.27.172]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 082EE260BB4; Fri, 13 Oct 2023 14:28:52 +0200 (CEST) From: "Marcin Juszkiewicz" Date: Fri, 13 Oct 2023 14:28:52 +0200 Subject: [edk2-devel] [PATCH edk2-platforms WIP 4/5] SbsaQemu: add EHCI to SSDT MIME-Version: 1.0 Message-Id: <20231013-ehci-xhci-fix-v1-4-f56f28e70e36@linaro.org> References: <20231013-ehci-xhci-fix-v1-0-f56f28e70e36@linaro.org> In-Reply-To: <20231013-ehci-xhci-fix-v1-0-f56f28e70e36@linaro.org> To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Jeremy Linton Precedence: Bulk List-Subscribe: List-Help: 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,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: vsaFqYUKcbO59lmUuCS5Pz3Wx7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=n4Ta1UXZ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io I want to add EHCI/XHCI switching so platforms older than 0.3 would not complain about missing XHCI. --- Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 1 + Silicon/Qemu/SbsaQemu/AcpiTables/Ehci.asl | 132 ++++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu= /SbsaQemu/AcpiTables/AcpiTables.inf index cd89ab346aa7..b58a2137ec03 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf @@ -22,6 +22,7 @@ [Sources] Mcfg.aslc Spcr.aslc Xhci.asl + Ehci.asl =20 [Packages] ArmPlatformPkg/ArmPlatformPkg.dec diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Ehci.asl b/Silicon/Qemu/SbsaQ= emu/AcpiTables/Ehci.asl new file mode 100644 index 000000000000..186f28363d95 --- /dev/null +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Ehci.asl @@ -0,0 +1,132 @@ +/** @file +* [DSDT] XHCI Usb Host controller +* +* Copyright (c) 2023, Linaro Ltd. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include + +DefinitionBlock (__FILE__, "SSDT", 1, "LINARO", "SBSAEHCI", 1) +{ + Scope (\_SB_) + { + // USB EHCI Host Controller + Device (USB2) { + Name (_HID, "PNP0D20") // _HID: Hardware ID + Name (_UID, 0x00) // _UID: Unique ID + Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute + Method (_STA) { + Return (0xF) + } + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, + FixedPcdGet32 (PcdPlatformUsbBase), + FixedPcdGet32 (PcdPlatformUsbSize)) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 43 } + }) + Return (RBUF) + } + + // Root Hub + Device (RHUB) { + Name (_ADR, 0x00000000) // Address of Root Hub should be 0 as per= ACPI 5.0 spec + Method (_STA) { + Return (0xF) + } + + // Ports connected to Root Hub + Device (HUB1) { + Name (_ADR, 0x00000001) + Name (_UPC, Package() { + 0x00, // Port is NOT connectable + 0xFF, // Don't care + 0x00000000, // Reserved 0 must be zero + 0x00000000 // Reserved 1 must be zero + }) + Method (_STA) { + Return (0xF) + } + + Device (PRT1) { + Name (_ADR, 0x00000001) + Name (_UPC, Package() { + 0xFF, // Port is connectable + 0x00, // Port connector is A + 0x00000000, + 0x00000000 + }) + Name (_PLD, Package() { + Buffer(0x10) { + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Method (_STA) { + Return (0xF) + } + } // USB0_RHUB_HUB1_PRT1 + Device (PRT2) { + Name (_ADR, 0x00000002) + Name (_UPC, Package() { + 0xFF, // Port is connectable + 0x00, // Port connector is A + 0x00000000, + 0x00000000 + }) + Name (_PLD, Package() { + Buffer(0x10) { + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Method (_STA) { + Return (0xF) + } + } // USB0_RHUB_HUB1_PRT2 + + Device (PRT3) { + Name (_ADR, 0x00000003) + Name (_UPC, Package() { + 0xFF, // Port is connectable + 0x00, // Port connector is A + 0x00000000, + 0x00000000 + }) + Name (_PLD, Package() { + Buffer (0x10) { + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Method (_STA) { + Return (0xF) + } + } // USB0_RHUB_HUB1_PRT3 + + Device (PRT4) { + Name (_ADR, 0x00000004) + Name (_UPC, Package() { + 0xFF, // Port is connectable + 0x00, // Port connector is A + 0x00000000, + 0x00000000 + }) + Name (_PLD, Package() { + Buffer (0x10){ + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Method (_STA) { + Return (0xF) + } + } // USB0_RHUB_HUB1_PRT4 + } // USB0_RHUB_HUB1 + } // USB0_RHUB + } // USB0 + } //\SB +} --=20 2.41.0 -=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 (#109590): https://edk2.groups.io/g/devel/message/109590 Mute This Topic: https://groups.io/mt/101938743/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-