summaryrefslogtreecommitdiff
path: root/src/ec/google/wilco/acpi/ucsi.asl
diff options
context:
space:
mode:
authorCoolStar <coolstarorganization@gmail.com>2023-03-26 03:52:54 -0700
committerMartin L Roth <gaumless@gmail.com>2023-08-21 23:17:59 +0000
commit4a587b8e96e758b22cfb7e60e2a85c03aae98e3a (patch)
tree8da29e786740d2f090d51f35a7006772511e2390 /src/ec/google/wilco/acpi/ucsi.asl
parent23c718c93a25cf97a1d1c88c7d75d11780565d0e (diff)
ec/google/wilco: Correct scope of UCSI ACPI device
Set the USCI device scope to _SB and set HID to USBC000 so Windows driver attaches. This matches the ACPI used by the non-Chromebook version of the Dell Latittude 7410 (which uses the same EC). TEST=build/boot Win11 on google/drallion Change-Id: If482fa4a4856c7bc085795bc72b35ebefe2f15c4 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77281 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/google/wilco/acpi/ucsi.asl')
-rw-r--r--src/ec/google/wilco/acpi/ucsi.asl260
1 files changed, 136 insertions, 124 deletions
diff --git a/src/ec/google/wilco/acpi/ucsi.asl b/src/ec/google/wilco/acpi/ucsi.asl
index 97e153b23a..a3f9750130 100644
--- a/src/ec/google/wilco/acpi/ucsi.asl
+++ b/src/ec/google/wilco/acpi/ucsi.asl
@@ -1,143 +1,155 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-Device (UCSI)
+Scope (\_SB)
{
- Name (_HID, "GOOG000E")
- Name (_CID, EisaId ("PNP0CA0"))
- Name (_DDN, "Wilco EC UCSI")
- Name (_UID, 1)
- Name (_STA, 0xb)
+ Device (UCSI)
+ {
+ Name (_HID, EisaId("USBC000"))
+ Name (_CID, Package { "GOOG000E", EisaId ("PNP0CA0") })
+ Name (_DDN, "Wilco EC UCSI")
+ Name (_UID, 1)
+ Name (_STA, 0xf)
- /* Value written to EC control register to start UCSI command */
- Name (UCMD, 0xE0)
+ /* Value written to EC control register to start UCSI command */
+ Name (UCMD, 0xE0)
- /* Shared memory fields are defined in the SSDT */
- External (VER0, FieldUnitObj)
- External (VER1, FieldUnitObj)
- External (CCI0, FieldUnitObj)
- External (CCI1, FieldUnitObj)
- External (CCI2, FieldUnitObj)
- External (CCI3, FieldUnitObj)
- External (CTL0, FieldUnitObj)
- External (CTL1, FieldUnitObj)
- External (CTL2, FieldUnitObj)
- External (CTL3, FieldUnitObj)
- External (CTL4, FieldUnitObj)
- External (CTL5, FieldUnitObj)
- External (CTL6, FieldUnitObj)
- External (CTL7, FieldUnitObj)
- External (MGI0, FieldUnitObj)
- External (MGI1, FieldUnitObj)
- External (MGI2, FieldUnitObj)
- External (MGI3, FieldUnitObj)
- External (MGI4, FieldUnitObj)
- External (MGI5, FieldUnitObj)
- External (MGI6, FieldUnitObj)
- External (MGI7, FieldUnitObj)
- External (MGI8, FieldUnitObj)
- External (MGI9, FieldUnitObj)
- External (MGIA, FieldUnitObj)
- External (MGIB, FieldUnitObj)
- External (MGIC, FieldUnitObj)
- External (MGID, FieldUnitObj)
- External (MGIE, FieldUnitObj)
- External (MGIF, FieldUnitObj)
- External (MGO0, FieldUnitObj)
- External (MGO1, FieldUnitObj)
- External (MGO2, FieldUnitObj)
- External (MGO3, FieldUnitObj)
- External (MGO4, FieldUnitObj)
- External (MGO5, FieldUnitObj)
- External (MGO6, FieldUnitObj)
- External (MGO7, FieldUnitObj)
- External (MGO8, FieldUnitObj)
- External (MGO9, FieldUnitObj)
- External (MGOA, FieldUnitObj)
- External (MGOB, FieldUnitObj)
- External (MGOC, FieldUnitObj)
- External (MGOD, FieldUnitObj)
- External (MGOE, FieldUnitObj)
- External (MGOF, FieldUnitObj)
+ /* Shared memory fields are defined in the SSDT */
+ External (VER0, FieldUnitObj)
+ External (VER1, FieldUnitObj)
+ External (CCI0, FieldUnitObj)
+ External (CCI1, FieldUnitObj)
+ External (CCI2, FieldUnitObj)
+ External (CCI3, FieldUnitObj)
+ External (CTL0, FieldUnitObj)
+ External (CTL1, FieldUnitObj)
+ External (CTL2, FieldUnitObj)
+ External (CTL3, FieldUnitObj)
+ External (CTL4, FieldUnitObj)
+ External (CTL5, FieldUnitObj)
+ External (CTL6, FieldUnitObj)
+ External (CTL7, FieldUnitObj)
+ External (MGI0, FieldUnitObj)
+ External (MGI1, FieldUnitObj)
+ External (MGI2, FieldUnitObj)
+ External (MGI3, FieldUnitObj)
+ External (MGI4, FieldUnitObj)
+ External (MGI5, FieldUnitObj)
+ External (MGI6, FieldUnitObj)
+ External (MGI7, FieldUnitObj)
+ External (MGI8, FieldUnitObj)
+ External (MGI9, FieldUnitObj)
+ External (MGIA, FieldUnitObj)
+ External (MGIB, FieldUnitObj)
+ External (MGIC, FieldUnitObj)
+ External (MGID, FieldUnitObj)
+ External (MGIE, FieldUnitObj)
+ External (MGIF, FieldUnitObj)
+ External (MGO0, FieldUnitObj)
+ External (MGO1, FieldUnitObj)
+ External (MGO2, FieldUnitObj)
+ External (MGO3, FieldUnitObj)
+ External (MGO4, FieldUnitObj)
+ External (MGO5, FieldUnitObj)
+ External (MGO6, FieldUnitObj)
+ External (MGO7, FieldUnitObj)
+ External (MGO8, FieldUnitObj)
+ External (MGO9, FieldUnitObj)
+ External (MGOA, FieldUnitObj)
+ External (MGOB, FieldUnitObj)
+ External (MGOC, FieldUnitObj)
+ External (MGOD, FieldUnitObj)
+ External (MGOE, FieldUnitObj)
+ External (MGOF, FieldUnitObj)
- Method (INIT)
- {
- /* Read UCSI version from EC into shared memory */
- ^VER0 = R (^^UVR0)
- ^VER1 = R (^^UVR1)
- }
+ Method (INIT)
+ {
+ /* Read UCSI version from EC into shared memory */
+ ^VER0 = R (^^UVR0)
+ ^VER1 = R (^^UVR1)
+ }
- Method (_DSM, 4, Serialized)
- {
- If (Arg0 != ToUUID ("6f8398c2-7ca4-11e4-ad36-631042b5008f")) {
- Return (Buffer (1) { 0 })
+ Method (R, 1, Serialized, 2){
+ Local0 = \_SB.PCI0.LPCB.EC0.R(Arg0)
+ Return (Local0)
}
- Switch (ToInteger (Arg2))
+ Method (W, 2, Serialized, 2){
+ \_SB.PCI0.LPCB.EC0.W(Arg0, Arg1)
+ }
+
+ Method (_DSM, 4, Serialized)
{
- Case (0)
- {
- Return (Buffer (1) { 0x07 })
+ If (Arg0 != ToUUID ("6f8398c2-7ca4-11e4-ad36-631042b5008f")) {
+ Return (Buffer (1) { 0 })
}
- Case (1)
+
+ Switch (ToInteger (Arg2))
{
- /* Write Message Out */
- W (^^UMO0, ^MGO0)
- W (^^UMO1, ^MGO1)
- W (^^UMO2, ^MGO2)
- W (^^UMO3, ^MGO3)
- W (^^UMO4, ^MGO4)
- W (^^UMO5, ^MGO5)
- W (^^UMO6, ^MGO6)
- W (^^UMO7, ^MGO7)
- W (^^UMO8, ^MGO8)
- W (^^UMO9, ^MGO9)
- W (^^UMOA, ^MGOA)
- W (^^UMOB, ^MGOB)
- W (^^UMOC, ^MGOC)
- W (^^UMOD, ^MGOD)
- W (^^UMOE, ^MGOE)
- W (^^UMOF, ^MGOF)
+ Case (0)
+ {
+ Return (Buffer (1) { 0x07 })
+ }
+ Case (1)
+ {
+ /* Write Message Out */
+ W (^^UMO0, ^MGO0)
+ W (^^UMO1, ^MGO1)
+ W (^^UMO2, ^MGO2)
+ W (^^UMO3, ^MGO3)
+ W (^^UMO4, ^MGO4)
+ W (^^UMO5, ^MGO5)
+ W (^^UMO6, ^MGO6)
+ W (^^UMO7, ^MGO7)
+ W (^^UMO8, ^MGO8)
+ W (^^UMO9, ^MGO9)
+ W (^^UMOA, ^MGOA)
+ W (^^UMOB, ^MGOB)
+ W (^^UMOC, ^MGOC)
+ W (^^UMOD, ^MGOD)
+ W (^^UMOE, ^MGOE)
+ W (^^UMOF, ^MGOF)
- /* Write Control */
- W (^^UCL0, ^CTL0)
- W (^^UCL1, ^CTL1)
- W (^^UCL2, ^CTL2)
- W (^^UCL3, ^CTL3)
- W (^^UCL4, ^CTL4)
- W (^^UCL5, ^CTL5)
- W (^^UCL6, ^CTL6)
- W (^^UCL7, ^CTL7)
+ /* Write Control */
+ W (^^UCL0, ^CTL0)
+ W (^^UCL1, ^CTL1)
+ W (^^UCL2, ^CTL2)
+ W (^^UCL3, ^CTL3)
+ W (^^UCL4, ^CTL4)
+ W (^^UCL5, ^CTL5)
+ W (^^UCL6, ^CTL6)
+ W (^^UCL7, ^CTL7)
- /* Start EC Command */
- W (^^UCTL, ^UCMD)
- }
- 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)
+ /* Start EC Command */
+ W (^^UCTL, ^UCMD)
+ }
+ 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)
+ /* Read Status */
+ ^CCI0 = R (^^UCI0)
+ ^CCI1 = R (^^UCI1)
+ ^CCI2 = R (^^UCI2)
+ ^CCI3 = R (^^UCI3)
+ }
}
+ Return (Buffer (1) { 0 })
}
- Return (Buffer (1) { 0 })
}
}