* [PATCH v2 0/2] usb: typec: altmodes/displayport: add port data role handling support
@ 2025-09-23 18:16 RD Babiera
2025-09-23 18:16 ` [PATCH v2 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
2025-09-23 18:16 ` [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
0 siblings, 2 replies; 6+ messages in thread
From: RD Babiera @ 2025-09-23 18:16 UTC (permalink / raw)
Cc: heikki.krogerus, gregkh, badhri, linux-usb, linux-kernel,
RD Babiera
This patchset adds support for Type-C PD altmodes drivers to query the port
data role using typec_altmode_get_data_role which requires a new symbol
typec_get_data_role. The UFP is not allowed to send the Enter Mode command,
so Alt Mode drivers can use this check to prevent driver registration
during the probe sequence.
The DisplayPort Alt Mode driver queries for the port data role during the
probe sequence and exits if the port is the UFP. If a data role swap were
initiated, the driver would be unregistered anyways so it is not necessary
to keep it alive.
Changes in v2:
* fixed typec_altmode_get_data_role documentation styling
RD Babiera (2):
usb: typec: class: add typec_get_data_role symbol
usb: typec: altmodes/displayport: do not enter mode if port is the UFP
drivers/usb/typec/altmodes/displayport.c | 4 +++-
drivers/usb/typec/class.c | 13 +++++++++++++
include/linux/usb/typec.h | 1 +
include/linux/usb/typec_altmode.h | 13 +++++++++++++
4 files changed, 30 insertions(+), 1 deletion(-)
base-commit: a4e143636d5def935dd461539b67b61287a8dfef
--
2.51.0.534.gc79095c0ca-goog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] usb: typec: class: add typec_get_data_role symbol
2025-09-23 18:16 [PATCH v2 0/2] usb: typec: altmodes/displayport: add port data role handling support RD Babiera
@ 2025-09-23 18:16 ` RD Babiera
2025-10-08 10:32 ` Heikki Krogerus
2025-09-23 18:16 ` [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
1 sibling, 1 reply; 6+ messages in thread
From: RD Babiera @ 2025-09-23 18:16 UTC (permalink / raw)
Cc: heikki.krogerus, gregkh, badhri, linux-usb, linux-kernel,
RD Babiera
Alt Mode drivers are responsible for sending Enter Mode through the TCPM,
but only a DFP is allowed to send Enter Mode. typec_get_data_role gets
the port's data role, which can then be used in altmode drivers via
typec_altmode_get_data_role to know if Enter Mode should be sent.
Signed-off-by: RD Babiera <rdbabiera@google.com>
---
Changes from v1:
* changed typec_altmode_get_data_role documentation format
---
drivers/usb/typec/class.c | 13 +++++++++++++
include/linux/usb/typec.h | 1 +
include/linux/usb/typec_altmode.h | 13 +++++++++++++
3 files changed, 27 insertions(+)
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
index 67a533e35150..9b2647cb199b 100644
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -2120,6 +2120,19 @@ void typec_set_data_role(struct typec_port *port, enum typec_data_role role)
}
EXPORT_SYMBOL_GPL(typec_set_data_role);
+/**
+ * typec_get_data_role - Get port data role
+ * @port: The USB Type-C Port to query
+ *
+ * This routine is used by the altmode drivers to determine if the port is the
+ * DFP before issuing Enter Mode
+ */
+enum typec_data_role typec_get_data_role(struct typec_port *port)
+{
+ return port->data_role;
+}
+EXPORT_SYMBOL_GPL(typec_get_data_role);
+
/**
* typec_set_pwr_role - Report power role change
* @port: The USB Type-C Port where the role was changed
diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h
index 252af3f77039..309251572e2e 100644
--- a/include/linux/usb/typec.h
+++ b/include/linux/usb/typec.h
@@ -337,6 +337,7 @@ struct typec_plug *typec_register_plug(struct typec_cable *cable,
void typec_unregister_plug(struct typec_plug *plug);
void typec_set_data_role(struct typec_port *port, enum typec_data_role role);
+enum typec_data_role typec_get_data_role(struct typec_port *port);
void typec_set_pwr_role(struct typec_port *port, enum typec_role role);
void typec_set_vconn_role(struct typec_port *port, enum typec_role role);
void typec_set_pwr_opmode(struct typec_port *port, enum typec_pwr_opmode mode);
diff --git a/include/linux/usb/typec_altmode.h b/include/linux/usb/typec_altmode.h
index b3c0866ea70f..f7db3bd4c90e 100644
--- a/include/linux/usb/typec_altmode.h
+++ b/include/linux/usb/typec_altmode.h
@@ -172,6 +172,19 @@ typec_altmode_get_svdm_version(struct typec_altmode *altmode)
return typec_get_negotiated_svdm_version(typec_altmode2port(altmode));
}
+/**
+ * typec_altmode_get_data_role - Get port data role
+ * @altmode: Handle to the alternate mode
+ *
+ * Alt Mode drivers should only issue Enter Mode through the port if they are
+ * the DFP.
+ */
+static inline enum typec_data_role
+typec_altmode_get_data_role(struct typec_altmode *altmode)
+{
+ return typec_get_data_role(typec_altmode2port(altmode));
+}
+
/**
* struct typec_altmode_driver - USB Type-C alternate mode device driver
* @id_table: Null terminated array of SVIDs
--
2.51.0.534.gc79095c0ca-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP
2025-09-23 18:16 [PATCH v2 0/2] usb: typec: altmodes/displayport: add port data role handling support RD Babiera
2025-09-23 18:16 ` [PATCH v2 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
@ 2025-09-23 18:16 ` RD Babiera
2025-10-08 10:33 ` Heikki Krogerus
2026-01-10 7:53 ` Andy Yan
1 sibling, 2 replies; 6+ messages in thread
From: RD Babiera @ 2025-09-23 18:16 UTC (permalink / raw)
Cc: heikki.krogerus, gregkh, badhri, linux-usb, linux-kernel,
RD Babiera
Nothing currently stops the DisplayPort Alt Mode driver from sending
Enter Mode if the port is the Data Device. Utilize
typec_altmode_get_data_role to prevent mode entry.
Signed-off-by: RD Babiera <rdbabiera@google.com>
---
drivers/usb/typec/altmodes/displayport.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index 1dcb77faf85d..8d111ad3b71b 100644
--- a/drivers/usb/typec/altmodes/displayport.c
+++ b/drivers/usb/typec/altmodes/displayport.c
@@ -758,7 +758,9 @@ int dp_altmode_probe(struct typec_altmode *alt)
struct fwnode_handle *fwnode;
struct dp_altmode *dp;
- /* FIXME: Port can only be DFP_U. */
+ /* Port can only be DFP_U. */
+ if (typec_altmode_get_data_role(alt) != TYPEC_HOST)
+ return -EPROTO;
/* Make sure we have compatible pin configurations */
if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
--
2.51.0.534.gc79095c0ca-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] usb: typec: class: add typec_get_data_role symbol
2025-09-23 18:16 ` [PATCH v2 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
@ 2025-10-08 10:32 ` Heikki Krogerus
0 siblings, 0 replies; 6+ messages in thread
From: Heikki Krogerus @ 2025-10-08 10:32 UTC (permalink / raw)
To: RD Babiera; +Cc: gregkh, badhri, linux-usb, linux-kernel
On Tue, Sep 23, 2025 at 06:16:07PM +0000, RD Babiera wrote:
> Alt Mode drivers are responsible for sending Enter Mode through the TCPM,
> but only a DFP is allowed to send Enter Mode. typec_get_data_role gets
> the port's data role, which can then be used in altmode drivers via
> typec_altmode_get_data_role to know if Enter Mode should be sent.
>
> Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> Changes from v1:
> * changed typec_altmode_get_data_role documentation format
> ---
> drivers/usb/typec/class.c | 13 +++++++++++++
> include/linux/usb/typec.h | 1 +
> include/linux/usb/typec_altmode.h | 13 +++++++++++++
> 3 files changed, 27 insertions(+)
>
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index 67a533e35150..9b2647cb199b 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -2120,6 +2120,19 @@ void typec_set_data_role(struct typec_port *port, enum typec_data_role role)
> }
> EXPORT_SYMBOL_GPL(typec_set_data_role);
>
> +/**
> + * typec_get_data_role - Get port data role
> + * @port: The USB Type-C Port to query
> + *
> + * This routine is used by the altmode drivers to determine if the port is the
> + * DFP before issuing Enter Mode
> + */
> +enum typec_data_role typec_get_data_role(struct typec_port *port)
> +{
> + return port->data_role;
> +}
> +EXPORT_SYMBOL_GPL(typec_get_data_role);
> +
> /**
> * typec_set_pwr_role - Report power role change
> * @port: The USB Type-C Port where the role was changed
> diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h
> index 252af3f77039..309251572e2e 100644
> --- a/include/linux/usb/typec.h
> +++ b/include/linux/usb/typec.h
> @@ -337,6 +337,7 @@ struct typec_plug *typec_register_plug(struct typec_cable *cable,
> void typec_unregister_plug(struct typec_plug *plug);
>
> void typec_set_data_role(struct typec_port *port, enum typec_data_role role);
> +enum typec_data_role typec_get_data_role(struct typec_port *port);
> void typec_set_pwr_role(struct typec_port *port, enum typec_role role);
> void typec_set_vconn_role(struct typec_port *port, enum typec_role role);
> void typec_set_pwr_opmode(struct typec_port *port, enum typec_pwr_opmode mode);
> diff --git a/include/linux/usb/typec_altmode.h b/include/linux/usb/typec_altmode.h
> index b3c0866ea70f..f7db3bd4c90e 100644
> --- a/include/linux/usb/typec_altmode.h
> +++ b/include/linux/usb/typec_altmode.h
> @@ -172,6 +172,19 @@ typec_altmode_get_svdm_version(struct typec_altmode *altmode)
> return typec_get_negotiated_svdm_version(typec_altmode2port(altmode));
> }
>
> +/**
> + * typec_altmode_get_data_role - Get port data role
> + * @altmode: Handle to the alternate mode
> + *
> + * Alt Mode drivers should only issue Enter Mode through the port if they are
> + * the DFP.
> + */
> +static inline enum typec_data_role
> +typec_altmode_get_data_role(struct typec_altmode *altmode)
> +{
> + return typec_get_data_role(typec_altmode2port(altmode));
> +}
> +
> /**
> * struct typec_altmode_driver - USB Type-C alternate mode device driver
> * @id_table: Null terminated array of SVIDs
> --
> 2.51.0.534.gc79095c0ca-goog
--
heikki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP
2025-09-23 18:16 ` [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
@ 2025-10-08 10:33 ` Heikki Krogerus
2026-01-10 7:53 ` Andy Yan
1 sibling, 0 replies; 6+ messages in thread
From: Heikki Krogerus @ 2025-10-08 10:33 UTC (permalink / raw)
To: RD Babiera; +Cc: gregkh, badhri, linux-usb, linux-kernel
On Tue, Sep 23, 2025 at 06:16:08PM +0000, RD Babiera wrote:
> Nothing currently stops the DisplayPort Alt Mode driver from sending
> Enter Mode if the port is the Data Device. Utilize
> typec_altmode_get_data_role to prevent mode entry.
>
> Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/altmodes/displayport.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
> index 1dcb77faf85d..8d111ad3b71b 100644
> --- a/drivers/usb/typec/altmodes/displayport.c
> +++ b/drivers/usb/typec/altmodes/displayport.c
> @@ -758,7 +758,9 @@ int dp_altmode_probe(struct typec_altmode *alt)
> struct fwnode_handle *fwnode;
> struct dp_altmode *dp;
>
> - /* FIXME: Port can only be DFP_U. */
> + /* Port can only be DFP_U. */
> + if (typec_altmode_get_data_role(alt) != TYPEC_HOST)
> + return -EPROTO;
>
> /* Make sure we have compatible pin configurations */
> if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
> --
> 2.51.0.534.gc79095c0ca-goog
--
heikki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP
2025-09-23 18:16 ` [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
2025-10-08 10:33 ` Heikki Krogerus
@ 2026-01-10 7:53 ` Andy Yan
1 sibling, 0 replies; 6+ messages in thread
From: Andy Yan @ 2026-01-10 7:53 UTC (permalink / raw)
To: rdbabiera
Cc: badhri, gregkh, heikki.krogerus, linux-kernel, linux-usb,
andyshrk, sebastian.reichel
>Nothing currently stops the DisplayPort Alt Mode driver from sending
>Enter Mode if the port is the Data Device. Utilize
>typec_altmode_get_data_role to prevent mode entry.
>---
> drivers/usb/typec/altmodes/displayport.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
>index 1dcb77faf85d..8d111ad3b71b 100644
>--- a/drivers/usb/typec/altmodes/displayport.c
>+++ b/drivers/usb/typec/altmodes/displayport.c
>@@ -758,7 +758,9 @@ int dp_altmode_probe(struct typec_altmode *alt)
> struct fwnode_handle *fwnode;
> struct dp_altmode *dp;
>
>- /* FIXME: Port can only be DFP_U. */
>+ /* Port can only be DFP_U. */
>+ if (typec_altmode_get_data_role(alt) != TYPEC_HOST)
>+ return -EPROTO;
>
> /* Make sure we have compatible pin configurations */
> if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
>
I found that after applying this patch, the Rock 5B SBC can no longer
enter alt mode when connected to a DP monitor via a Type-C hub, the following
error dmesg can be seen:
typec_displayport port0-partner.0: probe with driver typec_displayport failed with error -71
The TypeC Port on rock5b drive via the PD chip FUSB302
# cat /sys/kernel/debug/usb/tcpm-4-0022/log
[ 1.561397] Unable to find pd-revision property or incorrect array size
[ 1.590115] Setting usb_comm capable false
[ 1.590123] Setting voltage/current limit 0 mV 0 mA
[ 1.590129] polarity 0
[ 1.590198] Requesting mux state 0, usb-role 0, orientation 0
[ 1.631710] state change INVALID_STATE -> SNK_UNATTACHED [rev1 NONE_AMS]
[ 1.633129] CC1: 0 -> 0, CC2: 0 -> 0 [state SNK_UNATTACHED, polarity 0, disconnected]
[ 1.645221] 4-0022: registered
[ 1.646189] Setting usb_comm capable false
[ 1.646215] Setting voltage/current limit 0 mV 0 mA
[ 1.646231] polarity 0
[ 1.646237] Requesting mux state 0, usb-role 0, orientation 0
[ 1.662091] cc:=2
[ 1.668000] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [rev1 NONE_AMS]
[ 1.671183] state change PORT_RESET -> PORT_RESET_WAIT_OFF [delayed 100 ms]
[ 1.672491] pending state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED @ 920 ms [rev1 NONE_AMS]
[ 2.601879] state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED [delayed 920 ms]
[ 2.602431] Start toggling
[ 2.624387] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected]
[ 2.626056] state change TOGGLING -> SNK_ATTACH_WAIT [rev1 NONE_AMS]
[ 2.629010] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 200 ms [rev1 NONE_AMS]
[ 2.830604] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 200 ms]
[ 2.831984] state change SNK_DEBOUNCED -> SNK_ATTACHED [rev1 NONE_AMS]
[ 2.832941] polarity 1
[ 2.832945] Requesting mux state 1, usb-role 2, orientation 2
[ 2.860029] state change SNK_ATTACHED -> SNK_STARTUP [rev1 NONE_AMS]
[ 2.861402] state change SNK_STARTUP -> SNK_DISCOVERY [rev3 NONE_AMS]
[ 2.861945] Setting voltage/current limit 5000 mV 3000 mA
[ 2.861950] vbus=0 charge:=1
[ 2.862859] state change SNK_DISCOVERY -> SNK_WAIT_CAPABILITIES [rev3 NONE_AMS]
[ 2.869362] pending state change SNK_WAIT_CAPABILITIES -> SNK_SOFT_RESET @ 310 ms [rev3 NONE_AMS]
[ 3.181014] state change SNK_WAIT_CAPABILITIES -> SNK_SOFT_RESET [delayed 310 ms]
[ 3.181580] AMS SOFT_RESET_AMS start
[ 3.183145] state change SNK_SOFT_RESET -> AMS_START [rev3 SOFT_RESET_AMS]
[ 3.184513] state change AMS_START -> SOFT_RESET_SEND [rev3 SOFT_RESET_AMS]
[ 3.185066] PD TX, header: 0x8d
[ 3.193733] PD TX complete, status: 0
[ 3.196440] pending state change SOFT_RESET_SEND -> HARD_RESET_SEND @ 60 ms [rev3 SOFT_RESET_AMS]
[ 3.198922] PD RX, header: 0x1a3 [1]
[ 3.200603] AMS SOFT_RESET_AMS finished
[ 3.202836] state change SOFT_RESET_SEND -> SNK_WAIT_CAPABILITIES [rev3 NONE_AMS]
[ 3.207907] pending state change SNK_WAIT_CAPABILITIES -> SNK_WAIT_CAPABILITIES_TIMEOUT @ 310 ms [rev3 NONE_AMS]
[ 3.208976] PD RX, header: 0x43a1 [1]
[ 3.210464] PDO 0: type 0, 5000 mV, 2000 mA [RUDE]
[ 3.210467] PDO 1: type 0, 9000 mV, 2450 mA []
[ 3.210469] PDO 2: type 0, 15000 mV, 2670 mA []
[ 3.210472] PDO 3: type 0, 20000 mV, 3000 mA []
[ 3.211607] state change SNK_WAIT_CAPABILITIES -> SNK_NEGOTIATE_CAPABILITIES [rev3 POWER_NEGOTIATION]
[ 3.213865] Setting usb_comm capable true
[ 3.213871] cc=2 cc1=0 cc2=5 vbus=0 vconn=sink polarity=1
[ 3.213877] Requesting PDO 3: 20000 mV, 3000 mA
[ 3.213880] PD TX, header: 0x1282
[ 3.222930] PD TX complete, status: 0
[ 3.225674] pending state change SNK_NEGOTIATE_CAPABILITIES -> HARD_RESET_SEND @ 60 ms [rev3 POWER_NEGOTIATION]
[ 3.229457] PD RX, header: 0x5a3 [1]
[ 3.232125] state change SNK_NEGOTIATE_CAPABILITIES -> SNK_TRANSITION_SINK [rev3 POWER_NEGOTIATION]
[ 3.234275] Setting standby current 5000 mV @ 500 mA
[ 3.234278] Setting voltage/current limit 5000 mV 500 mA
[ 3.235158] pending state change SNK_TRANSITION_SINK -> HARD_RESET_SEND @ 500 ms [rev3 POWER_NEGOTIATION]
[ 3.339971] PD RX, header: 0x7a6 [1]
[ 3.341738] Setting voltage/current limit 20000 mV 3000 mA
[ 3.342566] state change SNK_TRANSITION_SINK -> SNK_READY [rev3 POWER_NEGOTIATION]
[ 3.346462] AMS POWER_NEGOTIATION finished
[ 3.352068] AMS DISCOVER_IDENTITY start
[ 3.354952] PD TX, header: 0x148f
[ 3.363951] PD TX complete, status: 0
[ 3.372273] PD RX, header: 0x59af [1]
[ 3.375213] Rx VDM cmd 0xff00a041 type 1 cmd 1 len 5
[ 3.376489] AMS DISCOVER_IDENTITY finished
[ 3.378482] Identity: 1d5c:7102.070a
[ 3.381145] AMS DISCOVER_SVIDS start
[ 3.384002] PD TX, header: 0x168f
[ 3.393019] PD TX complete, status: 0
[ 3.400228] PD RX, header: 0x2baf [1]
[ 3.403143] Rx VDM cmd 0xff00a042 type 1 cmd 2 len 2
[ 3.404418] AMS DISCOVER_SVIDS finished
[ 3.405753] SVID 1: 0xff01
[ 3.408814] AMS DISCOVER_MODES start
[ 3.411666] PD TX, header: 0x188f
[ 3.420681] PD TX complete, status: 0
[ 3.427868] PD RX, header: 0x2daf [1]
[ 3.430784] Rx VDM cmd 0xff01a043 type 1 cmd 3 len 2
[ 3.432193] AMS DISCOVER_MODES finished
[ 3.433811] Alternate mode 0: SVID 0xff01, VDO 1: 0x00040045
[ 3.468873] AMS DFP_TO_UFP_ENTER_MODE start
[ 3.473347] PD TX, header: 0x1a8f
[ 3.483714] PD TX complete, status: 0
[ 3.490564] PD RX, header: 0x1faf [1]
[ 3.493540] Rx VDM cmd 0xff01a144 type 1 cmd 4 len 1
[ 3.495653] AMS DFP_TO_UFP_ENTER_MODE finished
[ 3.501550] AMS STRUCTURED_VDMS start
[ 3.504410] PD TX, header: 0x2c8f
[ 3.513803] PD TX complete, status: 0
[ 3.520991] PD RX, header: 0x21af [1]
[ 3.523920] Rx VDM cmd 0xff01a150 type 1 cmd 16 len 2
[ 3.526044] AMS STRUCTURED_VDMS finished
[ 3.544870] AMS STRUCTURED_VDMS start
[ 3.547736] PD TX, header: 0x2e8f
[ 3.557132] PD TX complete, status: 0
[ 3.564509] PD RX, header: 0x13af [1]
[ 3.567452] Rx VDM cmd 0xff01a151 type 1 cmd 17 len 1
[ 3.569581] AMS STRUCTURED_VDMS finished
[ 6.927982] PD RX, header: 0x25af [1]
[ 6.931501] Rx VDM cmd 0xff01a106 type 0 cmd 6 len 2
The flow terminates at this point without continuing into alt mode.
After reverting this patch, the process can continue and successfully enter alt mode:
[ 3.159202] AMS DFP_TO_UFP_ENTER_MODE start
[ 3.159207] PD TX, header: 0x1a8f
[ 3.167022] PD TX complete, status: 0
[ 3.171317] PD RX, header: 0x1faf [1]
[ 3.171322] Rx VDM cmd 0xff01a144 type 1 cmd 4 len 1
[ 3.171327] AMS DFP_TO_UFP_ENTER_MODE finished
[ 3.171402] AMS STRUCTURED_VDMS start
[ 3.171406] PD TX, header: 0x2c8f
[ 3.179592] PD TX complete, status: 0
[ 3.184266] PD RX, header: 0x21af [1]
[ 3.184271] Rx VDM cmd 0xff01a150 type 1 cmd 16 len 2
[ 3.184277] AMS STRUCTURED_VDMS finished
[ 3.184315] AMS STRUCTURED_VDMS start
[ 3.184319] PD TX, header: 0x2e8f
[ 3.192595] PD TX complete, status: 0
[ 3.196953] PD RX, header: 0x13af [1]
[ 3.196959] Rx VDM cmd 0xff01a151 type 1 cmd 17 len 1
[ 3.196966] AMS STRUCTURED_VDMS finished
[ 6.562035] PD RX, header: 0x25af [1]
[ 6.562044] Rx VDM cmd 0xff01a106 type 0 cmd 6 len 2
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-10 7:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 18:16 [PATCH v2 0/2] usb: typec: altmodes/displayport: add port data role handling support RD Babiera
2025-09-23 18:16 ` [PATCH v2 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
2025-10-08 10:32 ` Heikki Krogerus
2025-09-23 18:16 ` [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
2025-10-08 10:33 ` Heikki Krogerus
2026-01-10 7:53 ` Andy Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox