ec/dasharo/ec: Add DTT power and battery participants
Add DTT Power and Battery participants. These are used by DTT drivers to more efficiently split power between SoC and dGPU and determine their power limits. Change-Id: I1e215366a79c0dd0f8a5d54c33fc718ba6b1302b Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86820 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Sumeet R.P. <sumeet4linux@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Alicja Michalska <ahplka19@gmail.com> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
This commit is contained in:
parent
f6dd8f534f
commit
581af94115
3 changed files with 60 additions and 1 deletions
55
src/ec/dasharo/ec/acpi/dtt.asl
Normal file
55
src/ec/dasharo/ec/acpi/dtt.asl
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <soc/dptf.h>
|
||||
|
||||
Device (TPWR)
|
||||
{
|
||||
Name (_HID, DPTF_TPWR_DEVICE)
|
||||
Name (_UID, "TPWR")
|
||||
Name (_STR, Unicode("Intel DTT Power Participant"))
|
||||
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
|
||||
Name (PTYP, 0x11) // Device is a platform power device
|
||||
|
||||
Method (PSRC, 0) // Power source
|
||||
{
|
||||
Return (^^AC.ACFG)
|
||||
}
|
||||
|
||||
Method (ARTG, 0) // Adapter rating
|
||||
{
|
||||
If (^^PCI0.LPCB.EC0.ECOK)
|
||||
{
|
||||
Return (^^PCI0.LPCB.EC0.APWR)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0)
|
||||
}
|
||||
}
|
||||
|
||||
Method (PBOK, 1) // Power Boss OK
|
||||
{
|
||||
// Notify EC to de-assert PROCHOT#
|
||||
// Required by DTT, but N/A on this hardware, PROCHOT#
|
||||
// is de-asserted by board logic upon AC plug-in
|
||||
}
|
||||
}
|
||||
|
||||
Device (TBAT)
|
||||
{
|
||||
Name (_HID, DPTF_BAT1_DEVICE)
|
||||
Name (_STR, Unicode("Intel DTT Battery Participant"))
|
||||
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Return (^^BAT0._STA)
|
||||
}
|
||||
|
||||
Name (PTYP, 0x0c) // Device is a platform battery device
|
||||
Name (CTYP, 0x02) // Hybrid Power Boost architecture
|
||||
}
|
||||
|
|
@ -4,9 +4,10 @@ Scope (\_SB) {
|
|||
#include "ac.asl"
|
||||
#include "battery.asl"
|
||||
#include "buttons.asl"
|
||||
#include "dasharo.asl"
|
||||
#include "dtt.asl"
|
||||
#include "hid.asl"
|
||||
#include "lid.asl"
|
||||
#include "dasharo.asl"
|
||||
}
|
||||
|
||||
Device (\_SB.PCI0.LPCB.EC0)
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ Field (ERAM, ByteAcc, Lock, Preserve)
|
|||
DUT2, 8, // Fan 2 duty
|
||||
RPM1, 16, // Fan 1 RPM
|
||||
RPM2, 16, // Fan 2 RPM
|
||||
Offset (0xD4),
|
||||
GPUD, 8, // GPU D-notify level
|
||||
APWR, 32, // AC adapter power
|
||||
Offset (0xD9),
|
||||
AIRP, 8, // Airplane mode LED
|
||||
WINF, 8, // Enable ACPI brightness controls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue