summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/usb/pd.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/dt-bindings/usb/pd.h b/include/dt-bindings/usb/pd.h
index e6526b138174..6cff2339bda3 100644
--- a/include/dt-bindings/usb/pd.h
+++ b/include/dt-bindings/usb/pd.h
@@ -465,4 +465,22 @@
| ((vbm) & 0x3) << 15 | (curr) << 14 | ((vbi) & 0x3f) << 7 \
| ((gi) & 0x3f) << 1 | (ct))
+/*
+ * Sink Load Characteristics
+ * -------------------------
+ * <15> :: Can tolerate vbus voltage droop
+ * <11:14> :: Duty cycle in 5% increments when bits 4:0 are non-zero
+ * <10:5> :: Overload period in 20ms when bits 4:0 are non-zero
+ * <4:0> :: Percent overload in 10% increments. Values higher than 25 are
+ * clipped to 250%
+ */
+#define SINK_LOAD_CHAR(vdroop, duty_cycle, period, percent_ol) \
+ (((vdroop) & 0x1) << 15 | ((duty_cycle) & 0xf) << 11 | \
+ ((period) & 0x3f) << 5 | ((percent_ol) & 0x1f))
+
+/* Compliance */
+#define COMPLIANCE_LPS (1 << 0)
+#define COMPLIANCE_PS1 (1 << 1)
+#define COMPLIANCE_PS2 (1 << 2)
+
#endif /* __DT_POWER_DELIVERY_H */