[S] Change in coreboot[main]: chromeec/ec_acpi: Define ACPI devices for USB-C ports using UCSI
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/84404?usp=email ) Change subject: chromeec/ec_acpi: Define ACPI devices for USB-C ports using UCSI ...................................................................... chromeec/ec_acpi: Define ACPI devices for USB-C ports using UCSI Add support to define ACPI devices for USB-C ports using UCSI. When defining the typec configuration do not set mux/retimer information. cros_ec_ucsi does not support setting USB muxes. BUG=b:349822718 TEST=emerge-brox coreboot chromeos-bootimage. Boot to OS on brox, confirmed that there are ACPI devices for each USB-C port and cros_ec_ucsi correctly matched the ACPI devices ("ls -l /sys/class/typec" with an update to add an ACPI match table to the cros_ec_ucsi driver). Change-Id: Ie7c281fe2a7fab705d3c238dcc4be68c93afd652 Signed-off-by: Jameson Thies <jthies@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84404 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> --- M src/ec/google/chromeec/ec_acpi.c 1 file changed, 19 insertions(+), 8 deletions(-) Approvals: Subrata Banik: Looks good to me, approved build bot (Jenkins): Verified diff --git a/src/ec/google/chromeec/ec_acpi.c b/src/ec/google/chromeec/ec_acpi.c index 1c97dcc..65a425b 100644 --- a/src/ec/google/chromeec/ec_acpi.c +++ b/src/ec/google/chromeec/ec_acpi.c @@ -18,6 +18,12 @@ #define GOOGLE_CHROMEEC_USBC_DEVICE_HID "GOOG0014" #define GOOGLE_CHROMEEC_USBC_DEVICE_NAME "USBC" +/* + * Boards using UCSI need the USB-C ports to match with cros_ec_ucsi, not + * cros-ec-typec. + */ +#define GOOGLE_CHROMEEC_USBC_UCSI_DEVICE_HID "GOOG0021" + const char *google_chromeec_acpi_name(const struct device *dev) { /* @@ -157,11 +163,6 @@ struct acpi_pld pld = {0}; uint32_t pcap_mask = 0; - /* UCSI implementations do not require an ACPI device with mux info since the - linux kernel doesn't set the muxes. */ - if (google_chromeec_get_ucsi_enabled()) - return; - rv = google_chromeec_get_num_pd_ports(&num_ports); if (rv || num_ports == 0) return; @@ -173,9 +174,19 @@ acpigen_write_scope(acpi_device_path(dev)); acpigen_write_device(GOOGLE_CHROMEEC_USBC_DEVICE_NAME); - acpigen_write_name_string("_HID", GOOGLE_CHROMEEC_USBC_DEVICE_HID); - acpigen_write_name_string("_DDN", "ChromeOS EC Embedded Controller " - "USB Type-C Control"); + + bool ucsi_platform = google_chromeec_get_ucsi_enabled(); + if (ucsi_platform) { + acpigen_write_name_string("_HID", + GOOGLE_CHROMEEC_USBC_UCSI_DEVICE_HID); + acpigen_write_name_string("_DDN", "ChromeOS EC UCSI USB Type-C " + "Control"); + } else { + acpigen_write_name_string("_HID", + GOOGLE_CHROMEEC_USBC_DEVICE_HID); + acpigen_write_name_string("_DDN", "ChromeOS EC Embedded " + "Controller USB Type-C Control"); + } for (i = 0; i < num_ports; ++i) { rv = google_chromeec_get_pd_port_caps(i, &port_caps); -- To view, visit https://review.coreboot.org/c/coreboot/+/84404?usp=email To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: coreboot Gerrit-Branch: main Gerrit-Change-Id: Ie7c281fe2a7fab705d3c238dcc4be68c93afd652 Gerrit-Change-Number: 84404 Gerrit-PatchSet: 7 Gerrit-Owner: Jameson Thies <jthies@google.com> Gerrit-Reviewer: Caveh Jalali <caveh@chromium.org> Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de> Gerrit-Reviewer: Forest Mittelberg <bmbm@google.com> Gerrit-Reviewer: Paul Menzel <paulepanter@mailbox.org> Gerrit-Reviewer: Subrata Banik <subratabanik@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Abhishek Pandit-Subedi <abhishekpandit@google.com>
participants (1)
-
Felix Held (Code Review)