From: "Ard Biesheuvel" <ard.biesheuvel@arm.com>
To: Jeremy Linton <jeremy.linton@arm.com>, devel@edk2.groups.io
Cc: Leif Lindholm <leif@nuviainc.com>, Pete Batard <pete@akeo.ie>,
Andrei Warkentin <awarkentin@vmware.com>,
Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [PATCH 0/3] Platform/RasberryPi: Thermal zone
Date: Mon, 17 Aug 2020 16:31:27 +0200 [thread overview]
Message-ID: <7dcba3be-778e-b3d5-20f5-ae0b205dd826@arm.com> (raw)
In-Reply-To: <20200813230056.40526-1-jeremy.linton@arm.com>
On 8/14/20 1:00 AM, Jeremy Linton wrote:
> This set creates a basic thermal zone, which reads the
> SOC temp via a direct register read in AML. It also
> adds an active cooling policy using a GPIO pin for fan
> control that can optionally be enabled/disabled by the
> user from the BDS.
>
> With the fan enabled it should be possible to see the
> soc temp like:
>
> # sensors
> acpitz-acpi-0
> Adapter: ACPI interface
> temp1: +57.6C (crit = +90.0C)
>
> and the fan state may be read/cycled with:
>
> /sys/bus/acpi/devices/PNP0C06:00/PNP0C0B:00/physical_node/thermal_cooling/cur_state
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Pete Batard <pete@akeo.ie>
> Cc: Andrei Warkentin <awarkentin@vmware.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
>
> Jeremy Linton (3):
> Platform/RaspberryPi4: Add a basic thermal zone
> Platform/RaspberryPi4: Create ACPI fan object
> Platform/RaspberryPi: Add entry for user fan control
>
I like this code a lot. It is very helpful to have working sample AML
code that implements a thermal zone. Could you elaborate on the
additional components that are needed for this? Is this a standard cape
(or whatever rpi calls it)? I assume the fan just switches between 0 and
max rpm depending on the actual temp wrt the trip point?
> Platform/RaspberryPi/AcpiTables/Dsdt.asl | 31 ++++++++
> Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 55 ++++++++++++++
> .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf | 3 +
> .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni | 5 ++
> .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr | 17 +++++
> .../RaspberryPi/Drivers/ConfigDxe/SsdtThermal.asl | 83 ++++++++++++++++++++++
> Platform/RaspberryPi/Include/ConfigVars.h | 4 ++
> Platform/RaspberryPi/RPi3/RPi3.dsc | 5 ++
> Platform/RaspberryPi/RPi4/RPi4.dsc | 8 +++
> Platform/RaspberryPi/RaspberryPi.dec | 1 +
> .../Bcm27xx/Include/IndustryStandard/Bcm2711.h | 2 +
> 11 files changed, 214 insertions(+)
> create mode 100644 Platform/RaspberryPi/Drivers/ConfigDxe/SsdtThermal.asl
>
next prev parent reply other threads:[~2020-08-17 14:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 23:00 [PATCH 0/3] Platform/RasberryPi: Thermal zone Jeremy Linton
2020-08-13 23:00 ` [PATCH 1/3] Platform/RaspberryPi4: Add a basic thermal zone Jeremy Linton
2020-08-17 11:10 ` Pete Batard
2020-08-13 23:00 ` [PATCH 2/3] Platform/RaspberryPi4: Create ACPI fan object Jeremy Linton
2020-08-17 11:10 ` [edk2-devel] " Pete Batard
2020-08-13 23:00 ` [PATCH 3/3] Platform/RaspberryPi: Add entry for user fan control Jeremy Linton
2020-08-17 11:10 ` Pete Batard
2020-08-17 18:10 ` Jeremy Linton
2020-08-17 14:31 ` Ard Biesheuvel [this message]
2020-08-17 19:03 ` [edk2-devel] [PATCH 0/3] Platform/RasberryPi: Thermal zone Jeremy Linton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7dcba3be-778e-b3d5-20f5-ae0b205dd826@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox