ec/google/wilco: Add UCSI support
commitc145e54f695480ac02f752a6d01e98cb37248a07
authorDuncan Laurie <dlaurie@google.com>
Thu, 18 Apr 2019 23:37:50 +0000 (18 16:37 -0700)
committerDuncan Laurie <dlaurie@chromium.org>
Fri, 7 Jun 2019 20:51:16 +0000 (7 20:51 +0000)
treec60ba05b1ee70085fc6f8c9f5278e6f5d48c3d78
parentc1c60601eeba69b1a897fec59e00f2dcc65f90dd
ec/google/wilco: Add UCSI support

This change adds support for the UCSI specification in order to
provide information about the Type-C port and an interface to
perform power and data role swap.

This change is split across the DSDT and SSDT, with the shared
memory and operation region declared in the SSDT after being
allocated in CBMEM.

The OS will fill in the registers in the system memory region and
then call the _DSM method wtih a read or write argument.  The DSM
method will copy the required registers to/from the system memory
and the EC and perform the write or read action.

Responses from the EC will generate a new SCI with event code 0x79
which will notify this UCSI ACPI device and the OS driver will take
action to read status from the EC.

BUG=b:131083691

Change-Id: I438a2bdfaf6720acd8354e0339dcef2844b63a4e
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32357
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
src/ec/google/wilco/acpi/ec.asl
src/ec/google/wilco/acpi/ec_ram.asl
src/ec/google/wilco/acpi/event.asl
src/ec/google/wilco/acpi/ucsi.asl [new file with mode: 0644]
src/ec/google/wilco/chip.c