From nobody Sun Jun 14 17:20:24 2026 Received: from mail-dl1-f73.google.com (mail-dl1-f73.google.com [74.125.82.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FB9A318EE1 for ; Fri, 3 Apr 2026 22:34:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775255660; cv=none; b=aj7yMgtf99zMvLkoIBEkcNL3ZizaCiMnjVQuek1fkGUK4Z/vz0bGpibVBE6ol4tg9ia9XSHCGiTOrVoktLhPbLS7NuTFhiqHloIsiU9epgkQSW1xWworsKKAYCVDulAsa1Z3/f8SdVOj7QoWKeWCqWMlq2PVFxN3Bk79rjfiX2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775255660; c=relaxed/simple; bh=/mbVbHwfU1OPBxftQbuqd+p4EqiF4kncyA8GPaZAnDY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Wv1e+/CtQYnab1XKoMCc2Z5s7oo4+e4nnTi0sjmwYjiGUVvxadJKlNv0T0bkr1/P8uEyYPAiHXmjgZw7aXDz4MGJ02hyPSnm9Oo2eNA+NiAg1aoN0knzjNkK8M99Lw6whobFEozoCUmvgvKKQnOrAhwAryaTIjY6LsdIOrr0C2w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jthies.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=bcf4gW2Y; arc=none smtp.client-ip=74.125.82.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jthies.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="bcf4gW2Y" Received: by mail-dl1-f73.google.com with SMTP id a92af1059eb24-127133794b6so3488973c88.1 for ; Fri, 03 Apr 2026 15:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1775255657; x=1775860457; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=UrqOiGLmU/TqfB7pUyMSAKDJK17fNSdE4/EVerFbIPk=; b=bcf4gW2YzKjTFTFi3Js576rXSU2aZmnzntcXv59oJVJayLzLe2KorOzEztV8W1KmG+ 9YxTQ4/fENlJJpE22L2QGSwnbLMKebP122W4dJ2UnTUT3Y/NJrjlU7U8LvLlYOMQz0u3 6CBkW2DS3Xd6A7zI4P5xBmTVNgXb8w+MrhisZ/ZcmaAS5Perhh/hDP9RM9TlS5JOor3B UtJKmzDEnPpNBlHHy0JDJYXS12dQ7sAs6eMCjmqau+nxLdmSaz4AguUnZMjC4eZT/Pqt sdj2JIqGoN8Qbf0n1JPDq51xHqBZCyUL1smpAZMiCeB75Nd4HkOKLkI6oq5z6Q1pNZBs lFfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775255657; x=1775860457; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=UrqOiGLmU/TqfB7pUyMSAKDJK17fNSdE4/EVerFbIPk=; b=rDJrvgAFXsE57Xy2tR0hty2hZxpZ5D2vWn3WATOOs/byYkfpErEqw6YcPrfhVerABj lR7x41rvGs1Mw7/a6p9380Xx0kCKhK2lQquhQmob2bYA+imoIk8D3YeFnHlOSa8CFSbX Sp4ICsRifH7PuoH4EPfikExfgYkl+FdIrwcB/QIGcAlfep15bOayZRbe4dsmz2gFf7U7 3OqFO85813ogqScqu1W+1x+gXEC67BCKIEn//TlkkzhFkd5OByLq6aqg1n3tD1hHdzC5 xY1EwUbppBMEwZtEphAXUfXjBtLBYF0Mh0XdvWpgNMnXUVLn6Hrtjn1HS0LuqLrXlLaz ki6Q== X-Forwarded-Encrypted: i=1; AJvYcCXUeAWqgXO/37N0HQV9yGRig3cggOqrnf6ajXzBC8CclbXCyrpg+p1P5/L864jJpP78jBIbhd+ZEEw+5CY=@vger.kernel.org X-Gm-Message-State: AOJu0YwZgCnmc6XPWA2FJT7zBSvdu9kV9v5YOu02GBN4gJh4cKjoTRvv 1X1OKpAevQSD6UgnPF2l+55Zl2ofSPEhOjwkqDY5Zf9kZYzEewk9ltIbrAAQoJZ+TG1sdR1RumC kw4SetA== X-Received: from dlae26.prod.google.com ([2002:a05:701b:231a:b0:12a:6b88:b9c5]) (user=jthies job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:43a8:b0:11b:9b98:aa4b with SMTP id a92af1059eb24-12bfb6ec461mr2298676c88.6.1775255657105; Fri, 03 Apr 2026 15:34:17 -0700 (PDT) Date: Fri, 3 Apr 2026 22:33:26 +0000 In-Reply-To: <20260403223357.1896403-1-jthies@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260403223357.1896403-1-jthies@google.com> X-Mailer: git-send-email 2.53.0.1213.gd9a14994de-goog Message-ID: <20260403223357.1896403-2-jthies@google.com> Subject: [PATCH v1 1/2] dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding From: Jameson Thies To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, abhishekpandit@chromium.org, bleung@chromium.org, heikki.krogerus@linux.intel.com, akuchynski@chromium.org Cc: gregkh@linuxfoundation.org, devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jameson Thies Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Chrome OS devices with discrete power delivery controllers (PDCs) allow the host to read port status and control port behavior through a USB Type-C Connector System Software (UCSI) interface with the embedded controller (EC). This uses a separate interface driver than other Chrome OS devices with a Type-C port manager in the EC FW. Those use a host command interface supported by cros-ec-typec. Add a cros-ec-ucsi compatibility string to the existing cros-ec-typec binding. Additionally, update maintainer list to reflect cros-ec-ucsi and cros-ec-typec driver maintainers. Signed-off-by: Jameson Thies Reviewed-by: Benson Leung Reviewed-by: Rob Herring (Arm) --- .../bindings/chrome/google,cros-ec-typec.yaml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.= yaml b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml index 9f9816fbecbc..fd1a459879bd 100644 --- a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml +++ b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml @@ -8,17 +8,28 @@ title: Google Chrome OS EC(Embedded Controller) Type C po= rt driver. =20 maintainers: - Benson Leung - - Prashant Malani + - Abhishek Pandit-Subedi + - Andrei Kuchynski + - =C5=81ukasz Bartosik + - Jameson Thies =20 description: Chrome OS devices have an Embedded Controller(EC) which has access to Type C port state. This node is intended to allow the host to read and - control the Type C ports. The node for this device should be under a - cros-ec node like google,cros-ec-spi. + control the Type C ports. This binding is compatible with both the + cros-ec-typec and cros-ec-ucsi drivers. The cros-ec-typec driver + supports the host command interface used by the Chrome OS EC with a + built-in Type-C port manager and external Type-C Port Controller + (TCPC). The cros-ec-ucsi driver supports the USB Type-C Connector + System Software (UCSI) interface used by the Chrome OS EC when the + platform has a separate power delivery controller (PDC). The node for + this device should be under a cros-ec node like google,cros-ec-spi. =20 properties: compatible: - const: google,cros-ec-typec + enum: + - google,cros-ec-typec + - google,cros-ec-ucsi =20 '#address-cells': const: 1 --=20 2.53.0.1213.gd9a14994de-goog From nobody Sun Jun 14 17:20:24 2026 Received: from mail-dl1-f74.google.com (mail-dl1-f74.google.com [74.125.82.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01F8033D51F for ; Fri, 3 Apr 2026 22:34:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775255662; cv=none; b=pyEr5TYSOddCQoEgVlpRZUK1kjm/gr2UzLiDA6YXnb4mOudaBI/rinZSaGddpgIgtQ+ikkwB6tCihqmBg5BmuYTziRg0MbJtk8PP93DaRVXlALrFVsLgjG+BxtEnsQ4+dQ1IDF8qzyjFTWZMrq3SRu047QlUl+CrdbHCJQx0cKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775255662; c=relaxed/simple; bh=dvntkxxmMie+ddQCkiP2EwdOS56VxGjSqZlx8z6hx5s=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=lWoGaxEsh/maPz8dD8IJM2bXkfaStHiK8PyUBZTBxy+qXbzXxI958x4h1rBrqssXhhikX6m+bYWOxD1r3F64JZLnOs5E4legGEHdE6B4AdHO4CJrJSthAhmaa0ke4N/CR0QLCWD7nTmBXxM5IKQnouDTZ8HFe2bJqERYL5zyGZs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jthies.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=EOcd+dKf; arc=none smtp.client-ip=74.125.82.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jthies.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EOcd+dKf" Received: by mail-dl1-f74.google.com with SMTP id a92af1059eb24-12c01e42fe2so2099027c88.0 for ; Fri, 03 Apr 2026 15:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1775255660; x=1775860460; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Qc81YdAjdlIvoqkBdkIORHlgXU4Am8QfAVGQhkBrGE0=; b=EOcd+dKfc/Ck/LCQs418kigcpsV9uc630r/XG0nnkMwQELlSJmb+nOczkjuA92VqCi zOUvgrO/tlLQlIGws0yMtxqqItfHWe6dZWh/jeXCNt/ppPBlHKfRmUBJDbANdgpxVNYk YsG3N5CZVrVV/hjBoNsPEoV6R21OenaeJq841OGcWz/cfr+xr0AnBI/RVzqblO1DATV+ QecCxtlgX7W/a20qU2osIh8gRzwfXxQ7UjlalEZSVPVUBUQN7uO8b1V2R4sF3UFOpxv+ AOx8HRxiLbLTBn2+F4JKF8THRbXMUUXKSOEPPketDfsIitKZgvqTsIV+MGEWC7PtoQX5 kPbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775255660; x=1775860460; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Qc81YdAjdlIvoqkBdkIORHlgXU4Am8QfAVGQhkBrGE0=; b=NwGuDu9s2/i8uFYydnvsjaL6ekXdFtgClcRRcgaWXvMPL9F579gL2yCD/LJZoQB/AP 4qgea2t7krCmpnQO0XgV5u4Mv4L4dboV7fljNJqmyg9fucBSWZwOSTF7XK/1gFyJVjpE Cdg4NuHNEvVGFtS2IN315IhoBvYlYxZ9cAqMCWQWTxI4AeRLjkxCfvFZks53OMCh3q7i ZGy6pkjEFLbAPBxsm9rGXHSWlrGfbkRhBPCcxMyMx/ibZyG5vHDvmDZSkNt/9wrqlV12 0njJ2f3JJe745eXItILKjFx7JO9zcyK9+ZJFxSszSWNnFZ6e18xl7ILp2LphkHAzUS24 g/5Q== X-Forwarded-Encrypted: i=1; AJvYcCUZ7dBvVUdQ3Sv4jXRL30rpRJCoGPaKjWpKRyvQp3qeQ0L9JJpiUX5Xqb4PSb1M4NTiFGc4j5pwfNToekg=@vger.kernel.org X-Gm-Message-State: AOJu0YziTQgmXMOSkwkzte6fGFwzgoJUwoQ7EVgI/jggIlHoTC3dxEFK MYHuIa2aop1Lgih+4lqUiME+u9Yxy0R12IYXfEshc2V+B4mllCvY7Arw1dqlBmegq/3CFziWDbI HbsXggw== X-Received: from dycc2.prod.google.com ([2002:a05:693c:60c2:b0:2c4:d97b:c1a8]) (user=jthies job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:90e:b0:123:34e8:aec2 with SMTP id a92af1059eb24-12bfb6e8e9dmr2211753c88.1.1775255659929; Fri, 03 Apr 2026 15:34:19 -0700 (PDT) Date: Fri, 3 Apr 2026 22:33:27 +0000 In-Reply-To: <20260403223357.1896403-1-jthies@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260403223357.1896403-1-jthies@google.com> X-Mailer: git-send-email 2.53.0.1213.gd9a14994de-goog Message-ID: <20260403223357.1896403-3-jthies@google.com> Subject: [PATCH v1 2/2] usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions From: Jameson Thies To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, abhishekpandit@chromium.org, bleung@chromium.org, heikki.krogerus@linux.intel.com, akuchynski@chromium.org Cc: gregkh@linuxfoundation.org, devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jameson Thies Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for cros_ec_ucsi to load based on "google,cros-ec-ucsi" compatible devices and "GOOG0021" ACPI nodes. Signed-off-by: Jameson Thies Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus --- drivers/usb/typec/ucsi/cros_ec_ucsi.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/ucsi/cros_ec_ucsi.c b/drivers/usb/typec/ucsi= /cros_ec_ucsi.c index 6bca2dce211c..251aa7251ce6 100644 --- a/drivers/usb/typec/ucsi/cros_ec_ucsi.c +++ b/drivers/usb/typec/ucsi/cros_ec_ucsi.c @@ -5,11 +5,13 @@ * Copyright 2024 Google LLC. */ =20 +#include #include #include #include #include #include +#include #include #include #include @@ -257,7 +259,6 @@ static void cros_ucsi_destroy(struct cros_ucsi_data *ud= ata) static int cros_ucsi_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; - struct cros_ec_dev *ec_data =3D dev_get_drvdata(dev->parent); struct cros_ucsi_data *udata; int ret; =20 @@ -265,9 +266,16 @@ static int cros_ucsi_probe(struct platform_device *pde= v) if (!udata) return -ENOMEM; =20 + /* ACPI and OF FW nodes for cros_ec_ucsi are children of the ChromeOS EC.= If the + * cros_ec_ucsi device has an ACPI or OF FW node, its parent is the Chrom= eOS EC device. + * Platforms without a FW node for cros_ec_ucsi may add it as a subdevice= of cros_ec_dev. + */ udata->dev =3D dev; + if (is_acpi_device_node(dev->fwnode) || is_of_node(dev->fwnode)) + udata->ec =3D dev_get_drvdata(dev->parent); + else + udata->ec =3D ((struct cros_ec_dev *)dev_get_drvdata(dev->parent))->ec_d= ev; =20 - udata->ec =3D ec_data->ec_dev; if (!udata->ec) return dev_err_probe(dev, -ENODEV, "couldn't find parent EC device\n"); =20 @@ -348,10 +356,24 @@ static const struct platform_device_id cros_ucsi_id[]= =3D { }; MODULE_DEVICE_TABLE(platform, cros_ucsi_id); =20 +static const struct acpi_device_id cros_ec_ucsi_acpi_device_ids[] =3D { + { "GOOG0021", 0 }, + { } +}; +MODULE_DEVICE_TABLE(acpi, cros_ec_ucsi_acpi_device_ids); + +static const struct of_device_id cros_ucsi_of_match[] =3D { + { .compatible =3D "google,cros-ec-ucsi", }, + {} +}; +MODULE_DEVICE_TABLE(of, cros_ucsi_of_match); + static struct platform_driver cros_ucsi_driver =3D { .driver =3D { .name =3D KBUILD_MODNAME, .pm =3D &cros_ucsi_pm_ops, + .acpi_match_table =3D cros_ec_ucsi_acpi_device_ids, + .of_match_table =3D cros_ucsi_of_match, }, .id_table =3D cros_ucsi_id, .probe =3D cros_ucsi_probe, --=20 2.53.0.1213.gd9a14994de-goog