[PATCH v2 1/4] dt-bindings: connector: Add DP AltMode VDO definitions
From: Sebastian Reichel
Date: Sat Oct 17 2026 - 16:00:14 EST
From: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
The typical USB-C DisplayPort AltMode capabilities for a down facing
port (i.e. sending out video data) looks like this:
altmodes {
displayport {
svid = /bits/ 16 <0xff01>;
vdo = <0x00001c46>;
};
};
Improve the readability by adding defines for the numbers, so that
the above instead looks like this:
altmodes {
displayport {
svid = /bits/ 16 <USB_SVID_DP_ALTMODE>;
vdo = <VDO_DP(DP_CAP_DPAM_V2_0, DP_CAP_CABLE_TYPE_PASSIVE,
DP_CAP_UHBR_13_5_UNSUPPORTED,
DP_PIN_UFP_NONE, DP_PIN_DFP_C_D_E,
DP_CAP_USB2_USED, DP_CAP_RECEPTACLE,
DP_CAP_SIGNALLING_HBR3, DP_CAP_DFP_D)>;
};
};
The generated DT binary will stay unchanged.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
---
include/dt-bindings/usb/pd.h | 58 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/include/dt-bindings/usb/pd.h b/include/dt-bindings/usb/pd.h
index 1e64a1f563f9..6cea6165fc0f 100644
--- a/include/dt-bindings/usb/pd.h
+++ b/include/dt-bindings/usb/pd.h
@@ -483,6 +483,64 @@
| ((vbm) & 0x3) << 15 | (curr) << 14 | ((vbi) & 0x3f) << 7 \
| ((gi) & 0x3f) << 1 | (ct))
+/*
+ * Displayport AltMode VDO
+ * -----------------------
+ * <30> :: DPAM version
+ * <29:28> :: Cable type
+ * <26> :: UHBR 13.5 support
+ * <23:16> :: UFP Pin assignment
+ * <15:8> :: DFP Pin assignment
+ * <7> :: USB
+ * <6> :: Receptacle
+ * <5:2> :: Signalling
+ * <1:0> :: Capabilities
+ */
+#define DP_CAP_UFP_D 1
+#define DP_CAP_DFP_D 2
+#define DP_CAP_DFP_D_AND_UFP_D 3
+
+#define DP_CAP_SIGNALLING_HBR3 1
+#define DP_CAP_SIGNALLING_UHBR10 2
+#define DP_CAP_SIGNALLING_UHBR20 3
+
+#define DP_CAP_PLUG 0
+#define DP_CAP_RECEPTACLE 1
+
+#define DP_CAP_USB2_USED 0
+#define DP_CAP_USB2_UNUSED 1
+
+#define DP_PIN_ASSIGN_A 0x01 /* Not supported after v1.0b */
+#define DP_PIN_ASSIGN_B 0x02 /* Not supported after v1.0b */
+#define DP_PIN_ASSIGN_C 0x04
+#define DP_PIN_ASSIGN_D 0x08
+#define DP_PIN_ASSIGN_E 0x10
+#define DP_PIN_ASSIGN_F 0x20 /* Not supported after v1.0b */
+
+#define DP_PIN_UFP_NONE 0x00
+#define DP_PIN_DFP_C_D_E (DP_PIN_ASSIGN_C | \
+ DP_PIN_ASSIGN_D | \
+ DP_PIN_ASSIGN_E)
+
+#define DP_CAP_UHBR_13_5_UNSUPPORTED 0
+#define DP_CAP_UHBR_13_5_SUPPORTED 1
+
+#define DP_CAP_CABLE_TYPE_PASSIVE 0
+#define DP_CAP_CABLE_TYPE_RE_TIMER 1
+#define DP_CAP_CABLE_TYPE_RE_DRIVER 2
+#define DP_CAP_CABLE_TYPE_OPTICAL 3
+
+#define DP_CAP_DPAM_V2_0 0
+#define DP_CAP_DPAM_V2_1 1
+
+#define VDO_DP(dpam, cable, uhbr, ufp_pins, dfp_pins, usb, rcpt, sig, caps) \
+ (((dpam) & 1) << 30 | ((cable) & 3) << 28 | ((uhbr) & 1) << 26 \
+ | ((ufp_pins) & 0xff) << 16 | ((dfp_pins) & 0xff) << 8 \
+ | ((usb) & 1) << 7 | ((rcpt) & 1) << 6 | ((sig) & 0xf) << 2 \
+ | ((caps) & 3))
+
+#define USB_SVID_DP_ALTMODE 0xff01
+
/*
* Sink Load Characteristics
* -------------------------
--
2.53.0