* [PATCH v1 0/2] Load cros_ec_ucsi from OF and ACPI nodes @ 2026-04-03 22:33 Jameson Thies 2026-04-03 22:33 ` [PATCH v1 1/2] dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding Jameson Thies 2026-04-03 22:33 ` [PATCH v1 2/2] usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions Jameson Thies 0 siblings, 2 replies; 5+ messages in thread From: Jameson Thies @ 2026-04-03 22:33 UTC (permalink / raw) To: robh, krzk+dt, conor+dt, abhishekpandit, bleung, heikki.krogerus, akuchynski Cc: gregkh, devicetree, chrome-platform, linux-usb, linux-kernel, Jameson Thies Hey everyone, I sent these patches up as part of a larger series in late 2025 which hasn't mergerd. The initial series modified dt-bindings, mfd and usb subsystems, but had not been reviewed by mfd maintainers. Additionally, it had not been acked by maintainers all land through one development tree. For context, here is the previous series https://lore.kernel.org/all/20251013203331.398517-1-jthies@google.com/ I've split the series up, this is just the usb and dt-bindings update. It builds independent from the mfd change. Given the time since this was previously under review (~oct 2025), I've cleared the exising review tags. Please take a look and let me know if you have any questions. Jameson Thies (2): dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions .../bindings/chrome/google,cros-ec-typec.yaml | 19 +++++++++++--- drivers/usb/typec/ucsi/cros_ec_ucsi.c | 26 +++++++++++++++++-- 2 files changed, 39 insertions(+), 6 deletions(-) base-commit: 81ebd43cc0d6d106ce7b6ccbf7b5e40ca7f5503d -- 2.53.0.1213.gd9a14994de-goog ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding 2026-04-03 22:33 [PATCH v1 0/2] Load cros_ec_ucsi from OF and ACPI nodes Jameson Thies @ 2026-04-03 22:33 ` Jameson Thies 2026-04-03 22:45 ` Benson Leung 2026-04-03 22:33 ` [PATCH v1 2/2] usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions Jameson Thies 1 sibling, 1 reply; 5+ messages in thread From: Jameson Thies @ 2026-04-03 22:33 UTC (permalink / raw) To: robh, krzk+dt, conor+dt, abhishekpandit, bleung, heikki.krogerus, akuchynski Cc: gregkh, devicetree, chrome-platform, linux-usb, linux-kernel, Jameson Thies 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 <jthies@google.com> --- .../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 port driver. maintainers: - Benson Leung <bleung@chromium.org> - - Prashant Malani <pmalani@chromium.org> + - Abhishek Pandit-Subedi <abhishekpandit@chromium.org> + - Andrei Kuchynski <akuchynski@chromium.org> + - Łukasz Bartosik <ukaszb@chromium.org> + - Jameson Thies <jthies@google.com> 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. properties: compatible: - const: google,cros-ec-typec + enum: + - google,cros-ec-typec + - google,cros-ec-ucsi '#address-cells': const: 1 -- 2.53.0.1213.gd9a14994de-goog ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding 2026-04-03 22:33 ` [PATCH v1 1/2] dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding Jameson Thies @ 2026-04-03 22:45 ` Benson Leung 0 siblings, 0 replies; 5+ messages in thread From: Benson Leung @ 2026-04-03 22:45 UTC (permalink / raw) To: Jameson Thies Cc: robh, krzk+dt, conor+dt, abhishekpandit, bleung, heikki.krogerus, akuchynski, gregkh, devicetree, chrome-platform, linux-usb, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2790 bytes --] On Fri, Apr 03, 2026 at 10:33:26PM +0000, Jameson Thies wrote: > 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 <jthies@google.com> Reviewed-by: Benson Leung <bleung@chromium.org> > --- > .../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 port driver. > > maintainers: > - Benson Leung <bleung@chromium.org> > - - Prashant Malani <pmalani@chromium.org> > + - Abhishek Pandit-Subedi <abhishekpandit@chromium.org> > + - Andrei Kuchynski <akuchynski@chromium.org> > + - Łukasz Bartosik <ukaszb@chromium.org> > + - Jameson Thies <jthies@google.com> > > 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. > > properties: > compatible: > - const: google,cros-ec-typec > + enum: > + - google,cros-ec-typec > + - google,cros-ec-ucsi > > '#address-cells': > const: 1 > -- > 2.53.0.1213.gd9a14994de-goog > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions 2026-04-03 22:33 [PATCH v1 0/2] Load cros_ec_ucsi from OF and ACPI nodes Jameson Thies 2026-04-03 22:33 ` [PATCH v1 1/2] dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding Jameson Thies @ 2026-04-03 22:33 ` Jameson Thies 2026-04-03 22:47 ` Benson Leung 1 sibling, 1 reply; 5+ messages in thread From: Jameson Thies @ 2026-04-03 22:33 UTC (permalink / raw) To: robh, krzk+dt, conor+dt, abhishekpandit, bleung, heikki.krogerus, akuchynski Cc: gregkh, devicetree, chrome-platform, linux-usb, linux-kernel, Jameson Thies 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 <jthies@google.com> --- 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. */ +#include <linux/acpi.h> #include <linux/container_of.h> #include <linux/dev_printk.h> #include <linux/jiffies.h> #include <linux/mod_devicetable.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_usbpd_notify.h> #include <linux/platform_data/cros_ec_proto.h> @@ -257,7 +259,6 @@ static void cros_ucsi_destroy(struct cros_ucsi_data *udata) static int cros_ucsi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct cros_ec_dev *ec_data = dev_get_drvdata(dev->parent); struct cros_ucsi_data *udata; int ret; @@ -265,9 +266,16 @@ static int cros_ucsi_probe(struct platform_device *pdev) if (!udata) return -ENOMEM; + /* 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 ChromeOS EC device. + * Platforms without a FW node for cros_ec_ucsi may add it as a subdevice of cros_ec_dev. + */ udata->dev = dev; + if (is_acpi_device_node(dev->fwnode) || is_of_node(dev->fwnode)) + udata->ec = dev_get_drvdata(dev->parent); + else + udata->ec = ((struct cros_ec_dev *)dev_get_drvdata(dev->parent))->ec_dev; - udata->ec = ec_data->ec_dev; if (!udata->ec) return dev_err_probe(dev, -ENODEV, "couldn't find parent EC device\n"); @@ -348,10 +356,24 @@ static const struct platform_device_id cros_ucsi_id[] = { }; MODULE_DEVICE_TABLE(platform, cros_ucsi_id); +static const struct acpi_device_id cros_ec_ucsi_acpi_device_ids[] = { + { "GOOG0021", 0 }, + { } +}; +MODULE_DEVICE_TABLE(acpi, cros_ec_ucsi_acpi_device_ids); + +static const struct of_device_id cros_ucsi_of_match[] = { + { .compatible = "google,cros-ec-ucsi", }, + {} +}; +MODULE_DEVICE_TABLE(of, cros_ucsi_of_match); + static struct platform_driver cros_ucsi_driver = { .driver = { .name = KBUILD_MODNAME, .pm = &cros_ucsi_pm_ops, + .acpi_match_table = cros_ec_ucsi_acpi_device_ids, + .of_match_table = cros_ucsi_of_match, }, .id_table = cros_ucsi_id, .probe = cros_ucsi_probe, -- 2.53.0.1213.gd9a14994de-goog ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions 2026-04-03 22:33 ` [PATCH v1 2/2] usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions Jameson Thies @ 2026-04-03 22:47 ` Benson Leung 0 siblings, 0 replies; 5+ messages in thread From: Benson Leung @ 2026-04-03 22:47 UTC (permalink / raw) To: Jameson Thies Cc: robh, krzk+dt, conor+dt, abhishekpandit, bleung, heikki.krogerus, akuchynski, gregkh, devicetree, chrome-platform, linux-usb, linux-kernel [-- Attachment #1: Type: text/plain, Size: 3053 bytes --] On Fri, Apr 03, 2026 at 10:33:27PM +0000, Jameson Thies wrote: > 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 <jthies@google.com> Reviewed-by: Benson Leung <bleung@chromium.org> > --- > 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. > */ > > +#include <linux/acpi.h> > #include <linux/container_of.h> > #include <linux/dev_printk.h> > #include <linux/jiffies.h> > #include <linux/mod_devicetable.h> > #include <linux/module.h> > +#include <linux/of.h> > #include <linux/platform_data/cros_ec_commands.h> > #include <linux/platform_data/cros_usbpd_notify.h> > #include <linux/platform_data/cros_ec_proto.h> > @@ -257,7 +259,6 @@ static void cros_ucsi_destroy(struct cros_ucsi_data *udata) > static int cros_ucsi_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > - struct cros_ec_dev *ec_data = dev_get_drvdata(dev->parent); > struct cros_ucsi_data *udata; > int ret; > > @@ -265,9 +266,16 @@ static int cros_ucsi_probe(struct platform_device *pdev) > if (!udata) > return -ENOMEM; > > + /* 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 ChromeOS EC device. > + * Platforms without a FW node for cros_ec_ucsi may add it as a subdevice of cros_ec_dev. > + */ > udata->dev = dev; > + if (is_acpi_device_node(dev->fwnode) || is_of_node(dev->fwnode)) > + udata->ec = dev_get_drvdata(dev->parent); > + else > + udata->ec = ((struct cros_ec_dev *)dev_get_drvdata(dev->parent))->ec_dev; > > - udata->ec = ec_data->ec_dev; > if (!udata->ec) > return dev_err_probe(dev, -ENODEV, "couldn't find parent EC device\n"); > > @@ -348,10 +356,24 @@ static const struct platform_device_id cros_ucsi_id[] = { > }; > MODULE_DEVICE_TABLE(platform, cros_ucsi_id); > > +static const struct acpi_device_id cros_ec_ucsi_acpi_device_ids[] = { > + { "GOOG0021", 0 }, > + { } > +}; > +MODULE_DEVICE_TABLE(acpi, cros_ec_ucsi_acpi_device_ids); > + > +static const struct of_device_id cros_ucsi_of_match[] = { > + { .compatible = "google,cros-ec-ucsi", }, > + {} > +}; > +MODULE_DEVICE_TABLE(of, cros_ucsi_of_match); > + > static struct platform_driver cros_ucsi_driver = { > .driver = { > .name = KBUILD_MODNAME, > .pm = &cros_ucsi_pm_ops, > + .acpi_match_table = cros_ec_ucsi_acpi_device_ids, > + .of_match_table = cros_ucsi_of_match, > }, > .id_table = cros_ucsi_id, > .probe = cros_ucsi_probe, > -- > 2.53.0.1213.gd9a14994de-goog > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-04-03 22:47 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-04-03 22:33 [PATCH v1 0/2] Load cros_ec_ucsi from OF and ACPI nodes Jameson Thies 2026-04-03 22:33 ` [PATCH v1 1/2] dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding Jameson Thies 2026-04-03 22:45 ` Benson Leung 2026-04-03 22:33 ` [PATCH v1 2/2] usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions Jameson Thies 2026-04-03 22:47 ` Benson Leung
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox