[PATCH v2 06/10] usb: tcpm: skip state machine for pd-disable ports

Peng Fan (OSS) peng.fan at oss.nxp.com
Sun Jun 21 04:06:42 CEST 2026


From: Peng Fan <peng.fan at nxp.com>

Check the pd-disable property in the connector node during
tcpm_post_probe(). When set, skip tcpm_port_init() and
tcpm_poll_event() so the TCPCI driver is probed (I2C accessible,
ops available) but the PD state machine does not run.

This is needed for dual-role data ports where running the state
machine during probe would disrupt an already-established USB
connection.

Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
 drivers/usb/tcpm/tcpm.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c
index 1ce46118fea..32c67b8886e 100644
--- a/drivers/usb/tcpm/tcpm.c
+++ b/drivers/usb/tcpm/tcpm.c
@@ -2306,8 +2306,15 @@ static void tcpm_poll_event(struct udevice *dev)
 
 int tcpm_post_probe(struct udevice *dev)
 {
-	int ret = tcpm_port_init(dev);
+	const struct dm_tcpm_ops *drvops = dev_get_driver_ops(dev);
+	ofnode connector;
+	int ret;
+
+	ret = drvops->get_connector_node(dev, &connector);
+	if (!ret && ofnode_read_bool(connector, "pd-disable"))
+		return 0;
 
+	ret = tcpm_port_init(dev);
 	if (ret < 0) {
 		dev_err(dev, "failed to tcpm port init\n");
 		return ret;

-- 
2.51.0



More information about the U-Boot mailing list