From nobody Tue Feb 10 06:43:04 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+64257+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+64257+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1597359702; cv=none; d=zohomail.com; s=zohoarc; b=bazsmlpx13ty5xaVpE1Zdb0aH6n+B+aFRbumv4eW3bK5KN78qkEBmqJX87KGmwRPJvKMnrzQhne+x1Nh3mrDoGTMeXSRDmcCHQZRE6mUA23VNMgtubheL3bqoVVi2ZjsWjAq59YSkjjUVfjDIDMwmlei/s3rS6jWFTEDy04c7AU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597359702; 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=XZi1Hqy+nICTj77lvZPERE7b6MC7VQXWBetxKvnXhmA=; b=BSRr8biwGr8BUlt5PUfk/x7vS/eI1fLEZY9mykOz5M/S+mpxk7620LxOo0G4FSiC/ulWuH/Sysp3A2niS1iEmOi0ElNFQVfxOUKqqTccLtt+xQTAdnmemxhXvwaVbGpwzS68N4j+QyKUcNlKsV4GnqGTDqRUFSwJn+hP1JqkUlY= 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+64257+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1597359702800351.9061854281929; Thu, 13 Aug 2020 16:01:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VW7SYY1788612xX9mvaB8HYc; Thu, 13 Aug 2020 16:01:42 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.7131.1597359701329256416 for ; Thu, 13 Aug 2020 16:01:41 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BDA7331B; Thu, 13 Aug 2020 16:01:40 -0700 (PDT) X-Received: from u200856.usa.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 636F03F22E; Thu, 13 Aug 2020 16:01:40 -0700 (PDT) From: "Jeremy Linton" To: devel@edk2.groups.io Cc: Jeremy Linton , Leif Lindholm , Pete Batard , Andrei Warkentin , Ard Biesheuvel , Samer El-Haj-Mahmoud Subject: [edk2-devel] [PATCH 1/3] Platform/RaspberryPi4: Add a basic thermal zone Date: Thu, 13 Aug 2020 18:00:54 -0500 Message-Id: <20200813230056.40526-2-jeremy.linton@arm.com> In-Reply-To: <20200813230056.40526-1-jeremy.linton@arm.com> References: <20200813230056.40526-1-jeremy.linton@arm.com> 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,jeremy.linton@arm.com X-Gm-Message-State: HuTdZMESMkWZZbfrkdPcpVD0x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1597359702; bh=1J+3QZ3M/iFFVWbOR0usOE4scuvHHflOZCf8ybGM9R4=; h=Cc:Date:From:Reply-To:Subject:To; b=YG47EyF6F0yVBQS1zpHOZfz2APIuBMQ1Te5CXajTsFtLUSCo2ZUxleuXP1Cq7t/3ZlF xTPPbVE7i4ZVhnReIY7nsGMcx9YaSIZW5/ojNgCQaDHKr38ddUqetG2kjDFDHkk0zXSoV cTgPkFiNJxi1jCiOlj+cYgbD84aK7MF1e2c= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Rather than exporting the temp sensor or mailbox in ACPI land we can wrap them in AML and use the default ACPI drivers provided by the OS. This enables the use of "sensors" in linux to report the SOC temp. This commit also adds a basic passive cooling ACPI thermalzone with trip points for passive cooling (throttling) handled by the vc firmware, hibernate and critical shutdown. The vc apparently kicks in at ~80C, so the hibernate and critical set points are set at +5 and +10 of that. In the future CPPC should be able to monitor the thermal throttling. Cc: Leif Lindholm Cc: Pete Batard Cc: Andrei Warkentin Cc: Ard Biesheuvel Cc: Samer El-Haj-Mahmoud Signed-off-by: Jeremy Linton --- Platform/RaspberryPi/AcpiTables/Dsdt.asl | 31 ++++++++++++++++++++++++++++= +++ 1 file changed, 31 insertions(+) diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/RaspberryP= i/AcpiTables/Dsdt.asl index 353af2d876..a5c9567cdf 100644 --- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl +++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl @@ -252,6 +252,37 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "RPIFDN", "RPI= ", 2) } }) } + + // Define a simple thermal zone. The idea here is we compute the SOC t= emp + // via a register we can read, and give it to the OS. This enables bas= ic + // reports from the "sensors" utility, and the OS can then poll and ta= ke + // actions if that temp exceeds any of the given thresholds. + Device(EC0) + { + Name(_HID, EISAID("PNP0C06")) + Name (_CCA, 0x0) + + // all temps in are tenths of K (aka 2732 is the min temps in linux = (aka 0C)) + ThermalZone(TZ0) { + Method(_TMP, 0, Serialized) { + OperationRegion (TEMS, SystemMemory, 0xfd5d2200, 0x8) + Field (TEMS, DWordAcc, NoLock, Preserve) { + TMPS, 32 + } + return (((419949 - ((TMPS & 0x3ff) * 487)) / 100) + 2732); + } + Method(_SCP, 3) { } // receive cooling policy from OS + + Method(_CRT) { return(3632) } // (90K) Critical temp point (imm= ediate power-off) + Method(_HOT) { return(3582) } // (85K) HOT state where OS shoul= d hibernate + Method(_PSV) { return(3532) } // (80K) Passive cooling (CPU thr= ottling) trip point + + // SSDT inserts _AC0/_AL0 @60C here, if a FAN is configured + + Name(_TZP, 10) //The OSPM must poll this device = every 1 seconds + Name(_PSL, Package(){ \_SB_.CPU0, \_SB_.CPU1, \_SB_.CPU2, \_SB_.CP= U3}) + } + } #endif =20 } --=20 2.13.7 -=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 (#64257): https://edk2.groups.io/g/devel/message/64257 Mute This Topic: https://groups.io/mt/76178274/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-