From nobody Tue Feb 10 01:14:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+56399+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56399+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1585223624; cv=none; d=zohomail.com; s=zohoarc; b=DezwiZhbM7DBiVxhgHfHV/dg91NEvSDu8TUijchmLST/raVNQq+A4fBX6Ki/PMpZJHTcyIDOk7rgQw+BDlINUBYsnjpkQmAmyUu+IjYH0R3duR7p2e19XjJY15quXoHiHPGbJ5AprifWVPaWf/Qm8xY6GqKZle2DVsWN58F4/pY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585223624; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=fN2p547DVYohGo9Z3T2T+HeBP8nzLxK6cI+72sfszeY=; b=ifdt0kqUlkjw7Kny/Bj48Aa+pRvwxn2haRv7ZlVo/TwLuFEiqNYHU7aCvg7pjIG6A+C2wTNDhzUcsKnLMbdqeTVAYtT7awDHTsa/z3ccmMv3tOdzzMVJuTjADeTQAcfdkLvB1SFdRnWhY6mlHleq6hmOLryWaW8Av8r54ibbyWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56399+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1585223624919537.7015483814396; Thu, 26 Mar 2020 04:53:44 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id xsw0YY1788612xkCYYf3wUvP; Thu, 26 Mar 2020 04:53:44 -0700 X-Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mx.groups.io with SMTP id smtpd.web11.35102.1585223623543478808 for ; Thu, 26 Mar 2020 04:53:44 -0700 X-Received: by mail-ed1-f46.google.com with SMTP id cw6so5741729edb.9 for ; Thu, 26 Mar 2020 04:53:43 -0700 (PDT) X-Gm-Message-State: ZMGVJPALPavSCbZo8ORTLe5gx1787277AA= X-Google-Smtp-Source: ADFU+vsyR4JNzhVI19Zggv+NA/xU3oSJ1Csynz9r18Wcda1zAuIcuRvKdIp/SEHqnXZFcD5tfFSM+Q== X-Received: by 2002:a17:906:af6e:: with SMTP id os14mr7638467ejb.34.1585223621298; Thu, 26 Mar 2020 04:53:41 -0700 (PDT) X-Received: from localhost.localdomain ([84.203.78.33]) by smtp.gmail.com with ESMTPSA id bs8sm240534ejb.92.2020.03.26.04.53.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2020 04:53:40 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com, awarkentin@vmware.com Subject: [edk2-devel] [edk2-platforms][PATCH 5/6] Platform/RPi/AcpiTables: Move GPU devices into a separate ASL file Date: Thu, 26 Mar 2020 11:53:21 +0000 Message-Id: <20200326115322.2880-6-pete@akeo.ie> In-Reply-To: <20200326115322.2880-1-pete@akeo.ie> References: <20200326115322.2880-1-pete@akeo.ie> MIME-Version: 1.0 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,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585223624; bh=43BLnVM+JYawTZo1cnjwchM1hyStkBYOqY9nZL3Yh6M=; h=Cc:Date:From:Reply-To:Subject:To; b=MBJqg++SDi/y3OSgjMkF0b3G6xqsrKjzBeGgz7JyfuhUYw+KS5IYg58IRP5L+w/Wx6i Qem4aQaKIHDXagbE5gtIfOUVCMgMuvw0Yd3kmfz3CziTSK7KDazD544DEXuKKxODKRpj0 Q3aRHo2E3QgoHQ4kmmh2z6qVUXIUHeh34wo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Andrei Warkentin In order to describe the DMA constraints of legacy devices behind the Raspberry Pi GPU/VideoCore, we move them into their own separate ASL file. This is a straight copy of the existing content from Dsdt.asl, with no alteration, so that the changes applied in the next patch are made more obvious. Signed-off-by: Pete Batard --- Platform/RaspberryPi/AcpiTables/Dsdt.asl | 382 +------------------ Platform/RaspberryPi/AcpiTables/GpuDevs.asl | 393 ++++++++++++++++++++ 2 files changed, 394 insertions(+), 381 deletions(-) diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/RaspberryP= i/AcpiTables/Dsdt.asl index 1ca55ff12e35..6b0fb7161718 100644 --- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl +++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl @@ -29,7 +29,6 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "RPIFDN", "RPI", = 2) { Scope (\_SB_) { - include ("Sdhc.asl") include ("Pep.asl") #if (RPI_MODEL =3D=3D 4) include ("Xhci.asl") @@ -75,222 +74,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "RPIFDN", "RPI"= , 2) } } =20 - // DWC OTG Controller - Device (USB0) - { - Name (_HID, "BCM2848") - Name (_CID, Package() { "DWC_OTG", "DWC2_OTG"}) - Name (_UID, 0x0) - Name (_CCA, 0x0) - Method (_STA) - { - Return (0xf) - } - Name (RBUF, ResourceTemplate () - { - MEMORY32FIXED (ReadWrite, 0, BCM2836_USB_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_USB_INTERRUPT } - }) - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_USB_OFFSET) - Return (^RBUF) - } - } - - // Video Core 4 GPU - Device (GPU0) - { - Name (_HID, "BCM2850") - Name (_CID, "VC4") - Name (_UID, 0x0) - Name (_CCA, 0x0) - Method (_STA) - { - Return(0xf) - } - Name (RBUF, ResourceTemplate () - { - // Memory and interrupt for the GPU - MEMORY32FIXED (ReadWrite, 0, BCM2836_V3D_BUS_LENGTH, RM01) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_V3D_BUS_INTERRUPT } - - // HVS - Hardware Video Scalar - MEMORY32FIXED (ReadWrite, 0, BCM2836_HVS_LENGTH, RM02) - // The HVS interrupt is reserved by the VPU - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_HVS_INTERRUPT } - - // PixelValve0 - DSI0 or DPI - // MEMORY32FIXED (ReadWrite, BCM2836_PV0_BASE_ADDRESS, BCM2836_PV0= _LENGTH, RM03) - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_PV0_INTERRUPT } - - // PixelValve1 - DS1 or SMI - // MEMORY32FIXED (ReadWrite, BCM2836_PV1_BASE_ADDRESS, BCM2836_PV1= _LENGTH, RM04) - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_PV1_INTERRUPT } - - // PixelValve2 - HDMI output - connected to HVS display FIFO 1 - MEMORY32FIXED (ReadWrite, 0, BCM2836_PV2_LENGTH, RM05) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_PV2_INTERRUPT } - - // HDMI registers - MEMORY32FIXED (ReadWrite, 0, BCM2836_HDMI0_LENGTH, RM06) - MEMORY32FIXED (ReadWrite, 0, BCM2836_HDMI1_LENGTH, RM07) - // hdmi_int[0] - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_HDMI0_INTERRUPT } - // hdmi_int[1] - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_HDMI1_INTERRUPT } - - // HDMI DDC connection - I2CSerialBus (0x50,, 100000,, "\\_SB.I2C2",,,,) // EDID - I2CSerialBus (0x30,, 100000,, "\\_SB.I2C2",,,,) // E-DDC Segment = Pointer - }) - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RM01, RB01, BCM2836_V3D_BUS_OFFSET) - MEMORY32SETBASE (RBUF, RM02, RB02, BCM2836_HVS_OFFSET) - MEMORY32SETBASE (RBUF, RM05, RB05, BCM2836_PV2_OFFSET) - MEMORY32SETBASE (RBUF, RM06, RB06, BCM2836_HDMI0_OFFSET) - MEMORY32SETBASE (RBUF, RM07, RB07, BCM2836_HDMI1_OFFSET) - Return (^RBUF) - } - - // GPU Power Management Component Data - // Reference : https://github.com/Microsoft/graphics-driver-samples/= wiki/Install-Driver-in-a-Windows-VM - Method (PMCD, 0, Serialized) - { - Name (RBUF, Package () - { - 1, // Version - 1, // Number of graphics power components - Package () // Power components package - { - Package () // GPU component package - { - 0, // Component Index - 0, // DXGK_POWER_COMPONENT_MAPPING.ComponentTyp= e (0 =3D DXGK_POWER_COMPONENT_ENGINE) - 0, // DXGK_POWER_COMPONENT_MAPPING.NodeIndex - - Buffer () // DXGK_POWER_RUNTIME_COMPONENT.ComponentGuid - { // 9B2D1E26-1575-4747-8FC0-B9EB4BAA2D2B - 0x26, 0x1E, 0x2D, 0x9B, 0x75, 0x15, 0x47, 0x47, - 0x8f, 0xc0, 0xb9, 0xeb, 0x4b, 0xaa, 0x2d, 0x2b - }, - - "VC4_Engine_00",// DXGK_POWER_RUNTIME_COMPONENT.ComponentName - 2, // DXGK_POWER_RUNTIME_COMPONENT.StateCount - - Package () // DXGK_POWER_RUNTIME_COMPONENT.States[] pac= kage - { - Package () // F0 - { - 0, // DXGK_POWER_RUNTIME_STATE.TransitionLatency - 0, // DXGK_POWER_RUNTIME_STATE.ResidencyRequirem= ent - 1210000, // DXGK_POWER_RUNTIME_STATE.NominalPower (mic= rowatt) - }, - - Package () // F1 - Placeholder - { - 10000, // DXGK_POWER_RUNTIME_STATE.TransitionLatency - 10000, // DXGK_POWER_RUNTIME_STATE.ResidencyRequirem= ent - 4, // DXGK_POWER_RUNTIME_STATE.NominalPower - }, - } - } - } - }) - Return (RBUF) - } - } - - // PiQ Mailbox Driver - Device (RPIQ) - { - Name (_HID, "BCM2849") - Name (_CID, "RPIQ") - Name (_UID, 0) - Name (_CCA, 0x0) - Method (_STA) - { - Return (0xf) - } - Name (RBUF, ResourceTemplate () - { - MEMORY32FIXED (ReadWrite, 0, BCM2836_MBOX_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_MBOX_INTERRUPT } - }) - - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_MBOX_OFFSET) - Return (^RBUF) - } - } - - // VCHIQ Driver - Device (VCIQ) - { - Name (_HID, "BCM2835") - Name (_CID, "VCIQ") - Name (_UID, 0) - Name (_CCA, 0x0) - Name (_DEP, Package() { \_SB.RPIQ }) - Method (_STA) - { - Return (0xf) - } - Name (RBUF, ResourceTemplate () - { - MEMORY32FIXED (ReadWrite, 0, BCM2836_VCHIQ_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_VCHIQ_INTERRUPT } - }) - - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_VCHIQ_OFFSET) - Return (^RBUF) - } - } - - // VC Shared Memory Driver - Device (VCSM) - { - Name (_HID, "BCM2856") - Name (_CID, "VCSM") - Name (_UID, 0) - Name (_CCA, 0x0) - Name (_DEP, Package() { \_SB.VCIQ }) - Method (_STA) - { - Return (0xf) - } - } - - // Description: GPIO - Device (GPI0) - { - Name (_HID, "BCM2845") - Name (_CID, "BCMGPIO") - Name (_UID, 0x0) - Name (_CCA, 0x0) - Method (_STA) - { - Return(0xf) - } - Name (RBUF, ResourceTemplate () - { - MEMORY32FIXED (ReadWrite, 0, GPIO_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) - { - BCM2386_GPIO_INTERRUPT0, BCM2386_GPIO_INTERRUPT1, - BCM2386_GPIO_INTERRUPT2, BCM2386_GPIO_INTERRUPT3 - } - }) - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RMEM, RBAS, GPIO_OFFSET) - Return (^RBUF) - } - } + include ("GpuDevs.asl") =20 #if (RPI_MODEL =3D=3D 4) Device (ETH0) @@ -323,169 +107,5 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "RPIFDN", "RP= I", 2) } #endif =20 - // Description: I2C - Device (I2C1) - { - Name (_HID, "BCM2841") - Name (_CID, "BCMI2C") - Name (_UID, 0x1) - Name (_CCA, 0x0) - Method (_STA) - { - Return(0xf) - } - Name (RBUF, ResourceTemplate () - { - MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C1_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_= I2C1_INTERRUPT } - PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, Resourc= eConsumer, , ) { 2, 3 } - }) - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_I2C1_OFFSET) - Return (^RBUF) - } - } - - // I2C2 is the HDMI DDC connection - Device (I2C2) - { - Name (_HID, "BCM2841") - Name (_CID, "BCMI2C") - Name (_UID, 0x2) - Name (_CCA, 0x0) - Method (_STA) - { - Return (0xf) - } - Name (RBUF, ResourceTemplate() - { - MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C2_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_= I2C2_INTERRUPT } - }) - - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_I2C2_OFFSET) - Return (^RBUF) - } - } - - // SPI - Device (SPI0) - { - Name (_HID, "BCM2838") - Name (_CID, "BCMSPI0") - Name (_UID, 0x0) - Name (_CCA, 0x0) - Method (_STA) - { - Return (0xf) - } - Name (RBUF, ResourceTemplate () - { - MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI0_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_= SPI0_INTERRUPT } - PinFunction (Exclusive, PullDown, BCM_ALT0, "\\_SB.GPI0", 0, Resou= rceConsumer, , ) { 9, 10, 11 } // MISO, MOSI, SCLK - PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, Resourc= eConsumer, , ) { 8 } // CE0 - PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, Resourc= eConsumer, , ) { 7 } // CE1 - }) - - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_SPI0_OFFSET) - Return (^RBUF) - } - } - - Device (SPI1) - { - Name (_HID, "BCM2839") - Name (_CID, "BCMAUXSPI") - Name (_UID, 0x1) - Name (_CCA, 0x0) - Name (_DEP, Package() { \_SB.RPIQ }) - Method (_STA) - { - Return (0xf) - } - Name (RBUF, ResourceTemplate () - { - MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI1_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { BCM2836= _SPI1_INTERRUPT } - PinFunction (Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, Resou= rceConsumer, , ) { 19, 20, 21 } // MISO, MOSI, SCLK - PinFunction (Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, Resou= rceConsumer, , ) { 16 } // CE2 - }) - - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_SPI1_OFFSET) - Return (^RBUF) - } - } - - // SPI2 has no pins on GPIO header - // Device (SPI2) - // { - // Name (_HID, "BCM2839") - // Name (_CID, "BCMAUXSPI") - // Name (_UID, 0x2) - // Name (_CCA, 0x0) - // Name (_DEP, Package() { \_SB.RPIQ }) - // Method (_STA) - // { - // Return (0xf) // Disabled - // } - // Method (_CRS, 0x0, Serialized) - // { - // Name (RBUF, ResourceTemplate () - // { - // MEMORY32FIXED (ReadWrite, BCM2836_SPI2_BASE_ADDRESS, BCM2836_= SPI2_LENGTH, RMEM) - // Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { BC= M2836_SPI2_INTERRUPT } - // }) - // Return (RBUF) - // } - // } - - // PWM Driver - Device (PWM0) - { - Name (_HID, "BCM2844") - Name (_CID, "BCM2844") - Name (_UID, 0) - Name (_CCA, 0x0) - Method (_STA) - { - Return (0xf) - } - Name (RBUF, ResourceTemplate () - { - // DMA channel 11 control - MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_DMA_LENGTH, RM01) - // PWM control - MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_CTRL_LENGTH, RM02) - // PWM control bus - MEMORY32FIXED (ReadWrite, BCM2836_PWM_BUS_BASE_ADDRESS, BCM2836_PW= M_BUS_LENGTH, ) - // PWM control uncached - MEMORY32FIXED (ReadWrite, BCM2836_PWM_CTRL_UNCACHED_BASE_ADDRESS, = BCM2836_PWM_CTRL_UNCACHED_LENGTH, ) - // PWM clock control - MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_CLK_LENGTH, RM03) - // Interrupt DMA channel 11 - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_DMA_INTERRUPT } - // DMA channel 11, DREQ 5 for PWM - FixedDMA (5, 11, Width32Bit, ) - }) - - Method (_CRS, 0x0, Serialized) - { - MEMORY32SETBASE (RBUF, RM01, RB01, BCM2836_PWM_DMA_OFFSET) - MEMORY32SETBASE (RBUF, RM02, RB02, BCM2836_PWM_CTRL_OFFSET) - MEMORY32SETBASE (RBUF, RM03, RB03, BCM2836_PWM_CLK_OFFSET) - Return (^RBUF) - } - } - - include ("Uart.asl") - include ("Rhpx.asl") } } diff --git a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl b/Platform/Raspber= ryPi/AcpiTables/GpuDevs.asl new file mode 100644 index 000000000000..99f03333abcf --- /dev/null +++ b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl @@ -0,0 +1,393 @@ +/** @file + * + * [DSDT] Devices behind the GPU. + * + * Copyright (c) 2018-2020, Andrey Warkentin + * Copyright (c) Microsoft Corporation. All rights reserved. + * + * SPDX-License-Identifier: BSD-2-Clause-Patent + * + **/ + +// DWC OTG Controller +Device (USB0) +{ + Name (_HID, "BCM2848") + Name (_CID, Package() { "DWC_OTG", "DWC2_OTG" }) + Name (_UID, 0x0) + Name (_CCA, 0x0) + Method (_STA) + { + Return (0xf) + } + Name (RBUF, ResourceTemplate () + { + MEMORY32FIXED (ReadWrite, 0, BCM2836_USB_LENGTH, RMEM) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_U= SB_INTERRUPT } + }) + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_USB_OFFSET) + Return (^RBUF) + } +} + +// Video Core 4 GPU +Device (GPU0) +{ + Name (_HID, "BCM2850") + Name (_CID, "VC4") + Name (_UID, 0x0) + Name (_CCA, 0x0) + Method (_STA) + { + Return (0xf) + } + Name (RBUF, ResourceTemplate () + { + // Memory and interrupt for the GPU + MEMORY32FIXED (ReadWrite, 0, BCM2836_V3D_BUS_LENGTH, RM01) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_V= 3D_BUS_INTERRUPT } + + // HVS - Hardware Video Scalar + MEMORY32FIXED (ReadWrite, 0, BCM2836_HVS_LENGTH, RM02) + // The HVS interrupt is reserved by the VPU + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM283= 6_HVS_INTERRUPT } + + // PixelValve0 - DSI0 or DPI + // MEMORY32FIXED (ReadWrite, BCM2836_PV0_BASE_ADDRESS, BCM2836_PV0_LEN= GTH, RM03) + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM283= 6_PV0_INTERRUPT } + + // PixelValve1 - DS1 or SMI + // MEMORY32FIXED (ReadWrite, BCM2836_PV1_BASE_ADDRESS, BCM2836_PV1_LEN= GTH, RM04) + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM283= 6_PV1_INTERRUPT } + + // PixelValve2 - HDMI output - connected to HVS display FIFO 1 + MEMORY32FIXED (ReadWrite, 0, BCM2836_PV2_LENGTH, RM05) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_P= V2_INTERRUPT } + + // HDMI registers + MEMORY32FIXED (ReadWrite, 0, BCM2836_HDMI0_LENGTH, RM06) + MEMORY32FIXED (ReadWrite, 0, BCM2836_HDMI1_LENGTH, RM07) + // hdmi_int[0] + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM283= 6_HDMI0_INTERRUPT } + // hdmi_int[1] + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM283= 6_HDMI1_INTERRUPT } + + // HDMI DDC connection + I2CSerialBus (0x50,, 100000,, "\\_SB.I2C2",,,,) // EDID + I2CSerialBus (0x30,, 100000,, "\\_SB.I2C2",,,,) // E-DDC Segment Poin= ter + }) + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RM01, RB01, BCM2836_V3D_BUS_OFFSET) + MEMORY32SETBASE (RBUF, RM02, RB02, BCM2836_HVS_OFFSET) + MEMORY32SETBASE (RBUF, RM05, RB05, BCM2836_PV2_OFFSET) + MEMORY32SETBASE (RBUF, RM06, RB06, BCM2836_HDMI0_OFFSET) + MEMORY32SETBASE (RBUF, RM07, RB07, BCM2836_HDMI1_OFFSET) + Return (^RBUF) + } + + // GPU Power Management Component Data + // Reference : https://github.com/Microsoft/graphics-driver-samples/wiki= /Install-Driver-in-a-Windows-VM + Method (PMCD, 0, Serialized) + { + Name (RBUF, Package () + { + 1, // Version + 1, // Number of graphics power components + Package () // Power components package + { + Package () // GPU component package + { + 0, // Component Index + 0, // DXGK_POWER_COMPONENT_MAPPING.ComponentType (0= =3D DXGK_POWER_COMPONENT_ENGINE) + 0, // DXGK_POWER_COMPONENT_MAPPING.NodeIndex + + Buffer () // DXGK_POWER_RUNTIME_COMPONENT.ComponentGuid + { // 9B2D1E26-1575-4747-8FC0-B9EB4BAA2D2B + 0x26, 0x1E, 0x2D, 0x9B, 0x75, 0x15, 0x47, 0x47, + 0x8f, 0xc0, 0xb9, 0xeb, 0x4b, 0xaa, 0x2d, 0x2b + }, + + "VC4_Engine_00",// DXGK_POWER_RUNTIME_COMPONENT.ComponentName + 2, // DXGK_POWER_RUNTIME_COMPONENT.StateCount + + Package () // DXGK_POWER_RUNTIME_COMPONENT.States[] package + { + Package () // F0 + { + 0, // DXGK_POWER_RUNTIME_STATE.TransitionLatency + 0, // DXGK_POWER_RUNTIME_STATE.ResidencyRequirement + 1210000, // DXGK_POWER_RUNTIME_STATE.NominalPower (microwa= tt) + }, + + Package () // F1 - Placeholder + { + 10000, // DXGK_POWER_RUNTIME_STATE.TransitionLatency + 10000, // DXGK_POWER_RUNTIME_STATE.ResidencyRequirement + 4, // DXGK_POWER_RUNTIME_STATE.NominalPower + }, + } + } + } + }) + Return (RBUF) + } +} + +// PiQ Mailbox Driver +Device (RPIQ) +{ + Name (_HID, "BCM2849") + Name (_CID, "RPIQ") + Name (_UID, 0) + Name (_CCA, 0x0) + Method (_STA) + { + Return (0xf) + } + Name (RBUF, ResourceTemplate () + { + MEMORY32FIXED (ReadWrite, 0, BCM2836_MBOX_LENGTH, RMEM) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_M= BOX_INTERRUPT } + }) + + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_MBOX_OFFSET) + Return (^RBUF) + } +} + +// VCHIQ Driver +Device (VCIQ) +{ + Name (_HID, "BCM2835") + Name (_CID, "VCIQ") + Name (_UID, 0) + Name (_CCA, 0x0) + Name (_DEP, Package() { \_SB.RPIQ }) + Method (_STA) + { + Return (0xf) + } + Name (RBUF, ResourceTemplate () + { + MEMORY32FIXED (ReadWrite, 0, BCM2836_VCHIQ_LENGTH, RMEM) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_V= CHIQ_INTERRUPT } + }) + + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_VCHIQ_OFFSET) + Return (^RBUF) + } +} + +// VC Shared Memory Driver +Device (VCSM) +{ + Name (_HID, "BCM2856") + Name (_CID, "VCSM") + Name (_UID, 0) + Name (_CCA, 0x0) + Name (_DEP, Package() { \_SB.VCIQ }) + Method (_STA) + { + Return (0xf) + } +} + +// Description: GPIO +Device (GPI0) +{ + Name (_HID, "BCM2845") + Name (_CID, "BCMGPIO") + Name (_UID, 0x0) + Name (_CCA, 0x0) + Method (_STA) + { + Return(0xf) + } + Name (RBUF, ResourceTemplate () + { + MEMORY32FIXED (ReadWrite, 0, GPIO_LENGTH, RMEM) + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) + { + BCM2386_GPIO_INTERRUPT0, BCM2386_GPIO_INTERRUPT1, + BCM2386_GPIO_INTERRUPT2, BCM2386_GPIO_INTERRUPT3 + } + }) + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RMEM, RBAS, GPIO_OFFSET) + Return (^RBUF) + } +} + +// Description: I2C +Device (I2C1) +{ + Name (_HID, "BCM2841") + Name (_CID, "BCMI2C") + Name (_UID, 0x1) + Name (_CCA, 0x0) + Method (_STA) + { + Return(0xf) + } + Name (RBUF, ResourceTemplate () + { + MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C1_LENGTH, RMEM) + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_I2C1= _INTERRUPT } + PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, ResourceCon= sumer, , ) { 2, 3 } + }) + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_I2C1_OFFSET) + Return (^RBUF) + } +} + +// I2C2 is the HDMI DDC connection +Device (I2C2) +{ + Name (_HID, "BCM2841") + Name (_CID, "BCMI2C") + Name (_UID, 0x2) + Name (_CCA, 0x0) + Method (_STA) + { + Return (0xf) + } + Name (RBUF, ResourceTemplate() + { + MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C2_LENGTH, RMEM) + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_I2C2= _INTERRUPT } + }) + + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_I2C2_OFFSET) + Return (^RBUF) + } +} + +// SPI +Device (SPI0) +{ + Name (_HID, "BCM2838") + Name (_CID, "BCMSPI0") + Name (_UID, 0x0) + Name (_CCA, 0x0) + Method (_STA) + { + Return (0xf) + } + Name (RBUF, ResourceTemplate () + { + MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI0_LENGTH, RMEM) + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_SPI0= _INTERRUPT } + PinFunction (Exclusive, PullDown, BCM_ALT0, "\\_SB.GPI0", 0, ResourceC= onsumer, , ) { 9, 10, 11 } // MISO, MOSI, SCLK + PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, ResourceCon= sumer, , ) { 8 } // CE0 + PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, ResourceCon= sumer, , ) { 7 } // CE1 + }) + + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_SPI0_OFFSET) + Return (^RBUF) + } +} + +Device (SPI1) +{ + Name (_HID, "BCM2839") + Name (_CID, "BCMAUXSPI") + Name (_UID, 0x1) + Name (_CCA, 0x0) + Name (_DEP, Package() { \_SB.RPIQ }) + Method (_STA) + { + Return (0xf) + } + Name (RBUF, ResourceTemplate () + { + MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI1_LENGTH, RMEM) + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { BCM2836_SPI= 1_INTERRUPT } + PinFunction (Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, ResourceC= onsumer, , ) { 19, 20, 21 } // MISO, MOSI, SCLK + PinFunction (Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, ResourceC= onsumer, , ) { 16 } // CE2 + }) + + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_SPI1_OFFSET) + Return (^RBUF) + } +} + +// SPI2 has no pins on GPIO header +// Device (SPI2) +// { +// Name (_HID, "BCM2839") +// Name (_CID, "BCMAUXSPI") +// Name (_UID, 0x2) +// Name (_CCA, 0x0) +// Name (_DEP, Package() { \_SB.RPIQ }) +// Method (_STA) +// { +// Return (0xf) // Disabled +// } +// Method (_CRS, 0x0, Serialized) +// { +// Name (RBUF, ResourceTemplate () +// { +// MEMORY32FIXED (ReadWrite, BCM2836_SPI2_BASE_ADDRESS, BCM2836_SPI2= _LENGTH, RMEM) +// Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { BCM283= 6_SPI2_INTERRUPT } +// }) +// Return (RBUF) +// } +// } + +// PWM Driver +Device (PWM0) +{ + Name (_HID, "BCM2844") + Name (_CID, "BCM2844") + Name (_UID, 0) + Name (_CCA, 0x0) + Method (_STA) + { + Return (0xf) + } + Name (RBUF, ResourceTemplate () + { + // DMA channel 11 control + MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_DMA_LENGTH, RM01) + // PWM control + MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_CTRL_LENGTH, RM02) + // PWM control bus + MEMORY32FIXED (ReadWrite, BCM2836_PWM_BUS_BASE_ADDRESS, BCM2836_PWM_BU= S_LENGTH, ) + // PWM control uncached + MEMORY32FIXED (ReadWrite, BCM2836_PWM_CTRL_UNCACHED_BASE_ADDRESS, BCM2= 836_PWM_CTRL_UNCACHED_LENGTH, ) + // PWM clock control + MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_CLK_LENGTH, RM03) + // Interrupt DMA channel 11 + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_D= MA_INTERRUPT } + // DMA channel 11, DREQ 5 for PWM + FixedDMA (5, 11, Width32Bit, ) + }) + + Method (_CRS, 0x0, Serialized) + { + MEMORY32SETBASE (RBUF, RM01, RB01, BCM2836_PWM_DMA_OFFSET) + MEMORY32SETBASE (RBUF, RM02, RB02, BCM2836_PWM_CTRL_OFFSET) + MEMORY32SETBASE (RBUF, RM03, RB03, BCM2836_PWM_CLK_OFFSET) + Return (^RBUF) + } +} + +include ("Uart.asl") +include ("Rhpx.asl") +include ("Sdhc.asl") --=20 2.21.0.windows.1 -=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 (#56399): https://edk2.groups.io/g/devel/message/56399 Mute This Topic: https://groups.io/mt/72561828/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-