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 v4 0/6] Platform/RasberryPi: Thermal zone
Date: Tue, 1 Sep 2020 15:23:36 +0300 [thread overview]
Message-ID: <c1e95179-3eb5-1f2b-bfb5-6257593a992c@arm.com> (raw)
In-Reply-To: <20200831172549.24079-1-jeremy.linton@arm.com>
On 8/31/20 7:25 PM, 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 on either
> GPIO18 (commercial fan shim board) or GPIO19 by the
> user from the BDS.
>
> it should now be possible when booted in ACPI mode to:
>
> # sensors
> acpitz-acpi-0
> Adapter: ACPI interface
> temp1: +57.6C (crit = +90.0C)
>
> and the fan state, if enabled may be read with:
>
> /sys/bus/acpi/devices/PNP0C06:00/PNP0C0B:00/physical_node/thermal_cooling/cur_state
>
> while the kernel will automatically cycle the fan if the SoC
> temp exceeds 60C.
>
> Included as a byproduct of this set is a generic method
> for updating values in ACPI DSDT/SSDT tables as they
> are installed.
>
> v3->v4:
> Allow the user to set the fan trip point
> Extend ACPI device names to 4 characters
>
> v2->v3:
> Make DSDT/SSDT PCD->Nameop update code generic
> Move the fan SSDT code back into the AcpiTable directory
>
> v1->v2:
> Add choice of GPIO pins to the BDS menu
> Correct whitespace/etc issues from v1 review
> Add an additional cleanup patch for contextual whitespace issues
>
> 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 (6):
> Platform/RaspberryPi4: Add a basic thermal zone
> Platform/RaspberryPi: Monitor ACPI Table installs
> Platform/RaspberryPi: Add entry for user fan control
> Platform/RaspberryPi4: Create ACPI fan object
> Platform/RaspberryPi4: Allow the user to set Temp
> Platform/RaspberryPi: Trivial whitespace cleanup
>
Series pushed as 50639477fc0f..e08fccd8bed5
Note that I incorporated the changes suggested by Pete, as well as the
Mmio Or/And tweak I mentioned in response to patch #6. I also applied
some touch ups to patch #2, to make the coding style more idiomatic for
EDK2, and to use CONST structures where possible.
Thanks all. This is a really nice feature to have, especially as it can
serve as an example for other platforms as well.
> Platform/RaspberryPi/AcpiTables/AcpiTables.inf | 1 +
> Platform/RaspberryPi/AcpiTables/Dsdt.asl | 31 +++
> Platform/RaspberryPi/AcpiTables/SsdtThermal.asl | 77 ++++++++
> Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 214 +++++++++++++++++++--
> .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf | 3 +
> .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni | 9 +
> .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr | 34 ++++
> Platform/RaspberryPi/Include/ConfigVars.h | 8 +
> Platform/RaspberryPi/RPi3/RPi3.dsc | 6 +
> Platform/RaspberryPi/RPi4/RPi4.dsc | 9 +
> Platform/RaspberryPi/RaspberryPi.dec | 2 +
> .../Bcm27xx/Include/IndustryStandard/Bcm2711.h | 2 +
> 12 files changed, 382 insertions(+), 14 deletions(-)
> create mode 100644 Platform/RaspberryPi/AcpiTables/SsdtThermal.asl
>
prev parent reply other threads:[~2020-09-01 12:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 17:25 [PATCH v4 0/6] Platform/RasberryPi: Thermal zone Jeremy Linton
2020-08-31 17:25 ` [PATCH v4 1/6] Platform/RaspberryPi4: Add a basic thermal zone Jeremy Linton
2020-08-31 17:25 ` [PATCH v4 2/6] Platform/RaspberryPi: Monitor ACPI Table installs Jeremy Linton
2020-08-31 17:32 ` Andrei Warkentin
2020-08-31 17:25 ` [PATCH v4 3/6] Platform/RaspberryPi: Add entry for user fan control Jeremy Linton
2020-08-31 17:25 ` [PATCH v4 4/6] Platform/RaspberryPi4: Create ACPI fan object Jeremy Linton
2020-08-31 17:25 ` [PATCH v4 5/6] Platform/RaspberryPi4: Allow the user to set Temp Jeremy Linton
2020-08-31 18:57 ` Pete Batard
2020-08-31 19:05 ` Ard Biesheuvel
2020-08-31 17:25 ` [PATCH v4 6/6] Platform/RaspberryPi: Trivial whitespace cleanup Jeremy Linton
2020-09-01 11:39 ` Ard Biesheuvel
2020-09-01 11:46 ` Pete Batard
2020-09-01 12:23 ` Ard Biesheuvel [this message]
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=c1e95179-3eb5-1f2b-bfb5-6257593a992c@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