public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Platform/RasberryPi: Thermal zone
@ 2020-08-28 22:02 Jeremy Linton
  2020-08-28 22:02 ` [PATCH v3 1/5] Platform/RaspberryPi4: Add a basic thermal zone Jeremy Linton
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Jeremy Linton @ 2020-08-28 22:02 UTC (permalink / raw)
  To: devel
  Cc: Jeremy Linton, Leif Lindholm, Pete Batard, Andrei Warkentin,
	Ard Biesheuvel, Samer El-Haj-Mahmoud

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.

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 (5):
  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/RaspberryPi: Trivial whitespace cleanup

 Platform/RaspberryPi/AcpiTables/AcpiTables.inf     |   1 +
 Platform/RaspberryPi/AcpiTables/Dsdt.asl           |  31 ++++
 Platform/RaspberryPi/AcpiTables/SsdtThermal.asl    |  76 ++++++++
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 205 +++++++++++++++++++--
 .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf    |   2 +
 .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni |   6 +
 .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr |  18 ++
 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 +
 12 files changed, 345 insertions(+), 14 deletions(-)
 create mode 100644 Platform/RaspberryPi/AcpiTables/SsdtThermal.asl

-- 
2.13.7


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-08-31 15:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28 22:02 [PATCH v3 0/5] Platform/RasberryPi: Thermal zone Jeremy Linton
2020-08-28 22:02 ` [PATCH v3 1/5] Platform/RaspberryPi4: Add a basic thermal zone Jeremy Linton
2020-08-31 13:15   ` Pete Batard
2020-08-31 15:13     ` Jeremy Linton
2020-08-31 15:33       ` Ard Biesheuvel
2020-08-31 15:49         ` Jeremy Linton
2020-08-28 22:02 ` [PATCH v3 2/5] Platform/RaspberryPi: Monitor ACPI Table installs Jeremy Linton
2020-08-31 13:17   ` Pete Batard
2020-08-28 22:02 ` [PATCH v3 3/5] Platform/RaspberryPi: Add entry for user fan control Jeremy Linton
2020-08-31 13:17   ` Pete Batard
2020-08-28 22:02 ` [PATCH v3 4/5] Platform/RaspberryPi4: Create ACPI fan object Jeremy Linton
2020-08-31 13:17   ` Pete Batard
2020-08-28 22:02 ` [PATCH v3 5/5] Platform/RaspberryPi: Trivial whitespace cleanup Jeremy Linton
2020-08-31 13:17   ` Pete Batard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox