diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2020-04-13 18:03:29 -0600 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2020-04-17 18:51:04 +0000 |
commit | a95907b0666c764aaddeaffc7a414c49bbb47d7b (patch) | |
tree | d064348a185edfde679147f1b39e31e4ad846e90 /src/ec/google/chromeec | |
parent | b2634c1f988668bea665c5fa401d820f86d5dd6b (diff) | |
download | coreboot-a95907b0666c764aaddeaffc7a414c49bbb47d7b.tar.xz |
ec/google/chromeec: Update the USBC ACPI device hierarchy
Type C connector class driver in kernel (v5.4) expects the Type C ACPI
device under ChromeEC ACPI device scope. Currently the Type C ACPI
device is populated under ChromeEC device's parent. This leads to
incorrect casting of Type C's parent device and hence a crash. Move the
Type C device under ChromeEC ACPI device.
BUG=b:153518804
TEST=Build and boot the mainboard. Ensure that the USBC ACPI device is
populated under ChromeEC ACPI device.
Scope (\_SB.PCI0.LPCB.EC0.CREC)
{
Device (USBC)
{
Name (_HID, "GOOG0014") // _HID: Hardware ID
...
}
}
Change-Id: I628489bc420d7a3db4ad3cb93d085d568c6de507
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/ec/google/chromeec')
-rw-r--r-- | src/ec/google/chromeec/ec_acpi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ec/google/chromeec/ec_acpi.c b/src/ec/google/chromeec/ec_acpi.c index 47d60d5b75..6bc9693881 100644 --- a/src/ec/google/chromeec/ec_acpi.c +++ b/src/ec/google/chromeec/ec_acpi.c @@ -16,8 +16,9 @@ #include "ec.h" #include "ec_commands.h" -#define GOOGLE_CHROMEEC_USBC_DEVICE_HID "GOOG0014" -#define GOOGLE_CHROMEEC_USBC_DEVICE_NAME "USBC" +#define GOOGLE_CHROMEEC_USBC_DEVICE_PARENT "CREC" +#define GOOGLE_CHROMEEC_USBC_DEVICE_HID "GOOG0014" +#define GOOGLE_CHROMEEC_USBC_DEVICE_NAME "USBC" const char *google_chromeec_acpi_name(const struct device *dev) { @@ -219,8 +220,8 @@ void google_chromeec_fill_ssdt_generator(struct device *dev) if (google_chromeec_get_num_pd_ports(&num_ports)) return; - /* Reference the existing device's scope */ - acpigen_write_scope(acpi_device_path(dev)); + /* Add TypeC device under the existing device + ".CREC" scope */ + acpigen_write_scope(acpi_device_path_join(dev, GOOGLE_CHROMEEC_USBC_DEVICE_PARENT)); fill_ssdt_typec_device(num_ports); acpigen_pop_len(); /* Scope */ } |