From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.10756.1603374354896194429 for ; Thu, 22 Oct 2020 06:45:55 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) 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 7D26C101E; Thu, 22 Oct 2020 06:45:54 -0700 (PDT) Received: from [192.168.1.81] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8D2003F66E; Thu, 22 Oct 2020 06:45:53 -0700 (PDT) Subject: Re: [PATCH] Platform/RaspberryPi4: Correct thermal offset To: Jeremy Linton , devel@edk2.groups.io Cc: leif@nuviainc.com, pete@akeo.ie, awarkentin@vmware.com References: <20200909231100.213015-1-jeremy.linton@arm.com> From: "Ard Biesheuvel" Message-ID: Date: Thu, 22 Oct 2020 15:45:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200909231100.213015-1-jeremy.linton@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 9/10/20 1:11 AM, Jeremy Linton wrote: > The current mainline DT indicates that the thermal offset > on the rpi is 410040 rather than the 419949 being used. > This means our temp calculation is offset nearly 10C higher > when running in ACPI mode vs DT. > > Signed-off-by: Jeremy Linton > --- > Platform/RaspberryPi/AcpiTables/Dsdt.asl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/AcpiTables/Dsdt.asl > index 2b9e8211cf..d116f965e1 100644 > --- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl > +++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl > @@ -269,7 +269,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "RPIFDN", "RPI", 2) > Field (TEMS, DWordAcc, NoLock, Preserve) { > TMPS, 32 > } > - return (((419949 - ((TMPS & 0x3ff) * 487)) / 100) + 2732); > + return (((410040 - ((TMPS & 0x3ff) * 487)) / 100) + 2732); > } > Method (_SCP, 3) { } // receive cooling policy from OS > > Reviewed-by: Ard Biesheuvel Pushed as dc6a619f933f..78c884bbe7d3