Lines Matching +full:revision +full:- +full:reg
3 * SPDX-License-Identifier: Apache-2.0
15 * Registers and fields are compliant to the Type-C Port Controller Interface
16 * Specification Revision 2.0, Version 1.3.
19 /** Register address - vendor id */
22 /** Register address - product id */
25 /** Register address - version of TCPC */
28 /** Register address - USB TypeC version */
30 /** Mask for major part of type-c release supported */
32 /** Macro to extract the major part of type-c release supported */
33 #define TCPC_REG_TC_REV_MAJOR(reg) (((reg) & TCPC_REG_TC_REV_MAJOR_MASK) >> 4) argument
34 /** Mask for minor part of type-c release supported */
36 /** Macro to extract the minor part of type-c release supported */
37 #define TCPC_REG_TC_REV_MINOR(reg) ((reg) & TCPC_REG_TC_REV_MINOR_MASK) argument
39 /** Register address - Power delivery revision */
41 /** Mask for major part of USB PD revision supported */
43 /** Macro to extract the major part of USB PD revision supported */
44 #define TCPC_REG_PD_REV_REV_MAJOR(reg) (((reg) & TCPC_REG_PD_REV_VER_REV_MAJOR_MASK) >> 12) argument
45 /** Mask for minor part of USB PD revision supported */
47 /** Macro to extract the minor part of USB PD revision supported */
48 #define TCPC_REG_PD_REV_REV_MINOR(reg) (((reg) & TCPC_REG_PD_REV_VER_REV_MINOR_MASK) >> 8) argument
52 #define TCPC_REG_PD_REV_VER_MAJOR(reg) (((reg) & TCPC_REG_PD_REV_VER_VER_MAJOR_MASK) >> 4) argument
56 #define TCPC_REG_PD_REV_VER_MINOR(reg) ((reg) & TCPC_REG_PD_REV_VER_VER_MINOR_MASK) argument
58 /** Register address - interface revision and version */
60 /** Mask for major part of USB Port Controller Interface revision supported */
62 /** Macro to extract the major part of USB Port Controller Interface revision supported */
63 #define TCPC_REG_PD_INT_REV_REV_MAJOR(reg) (((reg) & TCPC_REG_PD_REV_VER_REV_MAJOR_MASK) >> 12) argument
64 /** Mask for minor part of USB Port Controller Interface revision supported */
66 /** Macro to extract the minor part of USB Port Controller Interface revision supported */
67 #define TCPC_REG_PD_INT_REV_REV_MINOR(reg) (((reg) & TCPC_REG_PD_REV_VER_REV_MINOR_MASK) >> 8) argument
71 #define TCPC_REG_PD_INT_REV_VER_MAJOR(reg) (((reg) & TCPC_REG_PD_REV_VER_VER_MAJOR_MASK) >> 4) argument
75 #define TCPC_REG_PD_INT_REV_VER_MINOR(reg) ((reg) & TCPC_REG_PD_REV_VER_VER_MINOR_MASK) argument
77 /** Register address - alert */
120 * Register address - alert mask
126 * Register address - power status mask
133 * Register address - fault status mask
140 * Register address - extended status mask
147 * Register address - extended alert mask
153 /** Register address - configure standard output */
165 /** Value for mux - no connection */
167 /** Value for mux - USB3.1 connected */
169 /** Value for mux - DP alternate mode with 4 lanes */
171 /** Value for mux - USB3.1 + DP 0&1 lines */
178 /** Register address - TCPC control */
201 /** Register address - role control */
203 /** Bit for dual-role port */
216 #define TCPC_REG_ROLE_CTRL_DRP(reg) (((reg) & TCPC_REG_ROLE_CTRL_DRP_MASK) >> 6) argument
218 #define TCPC_REG_ROLE_CTRL_RP(reg) (((reg) & TCPC_REG_ROLE_CTRL_RP_MASK) >> 4) argument
220 #define TCPC_REG_ROLE_CTRL_CC2(reg) (((reg) & TCPC_REG_ROLE_CTRL_CC2_MASK) >> 2) argument
222 #define TCPC_REG_ROLE_CTRL_CC1(reg) ((reg) & TCPC_REG_ROLE_CTRL_CC1_MASK) argument
224 /** Register address - fault control */
237 /** Register address - power control */
261 /** Register address - CC lines status */
274 #define TCPC_REG_CC_STATUS_CC2_STATE(reg) (((reg) & TCPC_REG_CC_STATUS_CC2_STATE_MASK) >> 2) argument
278 #define TCPC_REG_CC_STATUS_CC1_STATE(reg) ((reg) & TCPC_REG_CC_STATUS_CC1_STATE_MASK) argument
280 /** Register address - power status */
284 /** Bit for internal initialization in-progress. If set, only registers 00-0F contain valid data. */
302 /** Register address - fault status */
321 /** Register address - extended status */
326 /** Register address - alert extended */
335 /** Register address - command */
339 /** Value for disable vbus detect command - disable vbus present and vSafe0V detection */
341 /** Value for enable vbus detect command - enable vbus present and vSafe0V detection */
343 /** Value for disable sink vbus - disable sinking power over vbus */
345 /** Value for sink vbus - enable sinking power over vbus and vbus present detection */
347 /** Value for disable source vbus - disable sourcing power over vbus */
349 /** Value for source vbus default voltage - enable sourcing vSafe5V over vbus */
351 /** Value for source vbus high voltage - enable sourcing high voltage over vbus */
353 /** Value for look for connection - start DRP toggling if DRP role is set */
365 /** Value for reset transmit buffer - TCPC resets the pointer of transmit buffer to offset 1 */
375 /** Register address - device capabilities 1 */
377 /** Bit for vbus high voltage target - if set, VBUS_HV_TARGET register is implemented */
379 /** Bit for vbus over current reporting - if set, vbus over current is reported by TCPC */
381 /** Bit for vbus over voltage reporting - if set, vbus over voltage is reported by TCPC */
383 /** Bit for bleed discharge - if set, bleed discharge is implemented in TCPC */
385 /** Bit for force discharge - if set, force discharge is implemented in TCPC */
399 #define TCPC_REG_DEV_CAP_1_SRC_RESISTOR(reg) \ argument
400 (((reg) & TCPC_REG_DEV_CAP_1_SRC_RESISTOR_MASK) >> 8)
401 /** Value for Rp default only - only default amperage is supported */
403 /** Value for Rp 1.5A and default - support for 1.5A and for default amperage*/
405 /** Value for Rp 3.0A, 1.5A and default - support for 3.0A, 1.5A and default amperage */
409 #define TCPC_REG_DEV_CAP_1_POWER_ROLE(reg) \ argument
410 (((reg) & TCPC_REG_DEV_CAP_1_POWER_ROLE_MASK) >> 5)
419 /** Value for support dual-role port only */
421 /** Value for support source, sink, dual-role port, adapter and cable */
423 /** Value for support source, sink and dual-role port */
425 /** Bit for debug SOP' and SOP'' support - if set, all SOP* messages are supported */
427 /** Bit for source vconn - if set, TCPC is capable of switching the vconn source */
429 /** Bit for sink vbus - if set, TCPC is capable of controling the sink path to the system load */
436 /** Bit for source vbus - if set, TCPC is capable of controlling the source path to vbus */
439 /** Register address - device capabilities 2 */
456 /** Bit for source fast-role swap support. If set, TCPC is capable of sending FRS as source. */
458 /** Bit for sink fast-role swap support. If set, TCPC is capable of sending FRS as sink. */
476 #define TCPC_REG_DEV_CAP_2_VBUS_VOLTAGE_ALARM(reg) \ argument
477 (((reg) & TCPC_REG_DEV_CAP_2_VBUS_VOLTAGE_ALARM_MASK) >> 4)
487 #define TCPC_REG_DEV_CAP_2_VCONN_POWER_SUPPORTED(reg) \ argument
488 (((reg) & TCPC_REG_DEV_CAP_2_VCONN_POWER_SUPPORTED_MASK) >> 1)
505 /** Bit for vconn overcurrent fault capable - if set, TCPC can detect the vconn over current */
508 /** Register address - standard input capabilities */
513 #define TCPC_REG_STD_INPUT_CAP_SRC_FRS(reg) (((reg) & TCPC_REG_STD_INPUT_CAP_SRC_FRS_MASK) >> 3) argument
527 /** Register address - standard output capabilities */
546 /** Register address - configure extended 1 */
563 * Register address - generic timer
565 * This register is 16-bit wide and has a resolution of 0.1ms.
569 /** Register address - message header info */
576 #define TCPC_REG_MSG_HDR_INFO_DATA_ROLE(reg) (((reg) & TCPC_REG_MSG_HDR_INFO_DATA_ROLE_MASK) >> 3) argument
581 /** Mask for Power Delivery Specification Revision */
583 /** Macro to extract the Power Delivery Specification Revision from register value */
584 #define TCPC_REG_MSG_HDR_INFO_PD_REV(reg) (((reg) & TCPC_REG_MSG_HDR_INFO_PD_REV_MASK) >> 1) argument
585 /** Value for Power Delivery Specification Revision 1.0 */
587 /** Value for Power Delivery Specification Revision 2.0 */
589 /** Value for Power Delivery Specification Revision 3.0 */
594 #define TCPC_REG_MSG_HDR_INFO_POWER_ROLE(reg) ((reg) & TCPC_REG_MSG_HDR_INFO_POWER_ROLE_MASK) argument
600 * Macro to set the register value with pd revision, data and power role from parameter and as
601 * non-cable plug
605 /** Mask for PD revision and power and data role */
608 /** Register address - receive detect */
640 * Register address - receive buffer (readable byte count, rx buf frame type, rx buf byte x)
647 /** Register address - transmit */
671 * Register address - transmit buffer
679 /** Register address - vbus voltage */
684 #define TCPC_REG_VBUS_VOLTAGE_MEASUREMENT(reg) ((reg) & TCPC_REG_VBUS_VOLTAGE_MEASUREMENT_MASK) argument
688 #define TCPC_REG_VBUS_VOLTAGE_SCALE(reg) \ argument
689 (1 << (((reg) & TCPC_REG_VBUS_VOLTAGE_SCALE_FACTOR_MASK) >> 10))
700 /** Register address - vbus sink disconnect threshold */
714 /** Register address - vbus sink disconnect threshold */
728 /** Register address - vbus voltage alarm - high */
740 /** Register address - vbus voltage alarm - low */
753 * Register address - vbus nondefault target
767 /** Register address - device capabilities 3 */
772 #define TCPC_REG_DEV_CAP_3_VBUS_MAX(reg) ((reg) & TCPC_REG_DEV_CAP_3_VBUS_MAX_MASK) argument