diff options
author | CoolStar <coolstarorganization@gmail.com> | 2023-03-26 04:33:37 -0700 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2023-08-21 23:19:18 +0000 |
commit | 9c80cb81aa15cc1b0a4640540d53b166c8a487dd (patch) | |
tree | 49e58a8ea2b69ed89728fb3492b7af50138ba549 /src/ec | |
parent | 4a587b8e96e758b22cfb7e60e2a85c03aae98e3a (diff) |
ec/google/wilco/acpi: Read message when notifying UCSI
Allows the EC to be properly notified of type-c events like charger
wattage too low (eg),
TEST=build/boot Win11, Linux 6.x on google/drallion
Change-Id: I7a4130cf6f8c24e3f91e327adf1f3e563322c0af
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77282
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: CoolStar <coolstarorganization@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec')
-rw-r--r-- | src/ec/google/wilco/acpi/event.asl | 3 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/ucsi.asl | 49 |
2 files changed, 30 insertions, 22 deletions
diff --git a/src/ec/google/wilco/acpi/event.asl b/src/ec/google/wilco/acpi/event.asl index e611ab0e22..02f6c1c076 100644 --- a/src/ec/google/wilco/acpi/event.asl +++ b/src/ec/google/wilco/acpi/event.asl @@ -141,6 +141,9 @@ Method (_Q79, 0, Serialized) { If (ISSX == 0) { Printf ("EC _Q79 UCSI Event") + + \_SB.UCSI.RMSG() + Notify (\_SB.UCSI, 0x80) ^UCEP = 0 } Else { diff --git a/src/ec/google/wilco/acpi/ucsi.asl b/src/ec/google/wilco/acpi/ucsi.asl index a3f9750130..043e1e7abc 100644 --- a/src/ec/google/wilco/acpi/ucsi.asl +++ b/src/ec/google/wilco/acpi/ucsi.asl @@ -125,31 +125,36 @@ Scope (\_SB) Case (2) { /* Read Message In */ - ^MGI0 = R (^^UMI0) - ^MGI1 = R (^^UMI1) - ^MGI2 = R (^^UMI2) - ^MGI3 = R (^^UMI3) - ^MGI4 = R (^^UMI4) - ^MGI5 = R (^^UMI5) - ^MGI6 = R (^^UMI6) - ^MGI7 = R (^^UMI7) - ^MGI8 = R (^^UMI8) - ^MGI9 = R (^^UMI9) - ^MGIA = R (^^UMIA) - ^MGIB = R (^^UMIB) - ^MGIC = R (^^UMIC) - ^MGID = R (^^UMID) - ^MGIE = R (^^UMIE) - ^MGIF = R (^^UMIF) - - /* Read Status */ - ^CCI0 = R (^^UCI0) - ^CCI1 = R (^^UCI1) - ^CCI2 = R (^^UCI2) - ^CCI3 = R (^^UCI3) + RMSG() } } Return (Buffer (1) { 0 }) } + + Method (RMSG, 0, Serialized){ + /* Read Message In */ + ^MGI0 = R (^^UMI0) + ^MGI1 = R (^^UMI1) + ^MGI2 = R (^^UMI2) + ^MGI3 = R (^^UMI3) + ^MGI4 = R (^^UMI4) + ^MGI5 = R (^^UMI5) + ^MGI6 = R (^^UMI6) + ^MGI7 = R (^^UMI7) + ^MGI8 = R (^^UMI8) + ^MGI9 = R (^^UMI9) + ^MGIA = R (^^UMIA) + ^MGIB = R (^^UMIB) + ^MGIC = R (^^UMIC) + ^MGID = R (^^UMID) + ^MGIE = R (^^UMIE) + ^MGIF = R (^^UMIF) + + /* Read Status */ + ^CCI0 = R (^^UCI0) + ^CCI1 = R (^^UCI1) + ^CCI2 = R (^^UCI2) + ^CCI3 = R (^^UCI3) + } } } |