Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
USB Power Delivery

USB Power Delivery. More...

Data Structures

union  pd_header
 Build a PD message header See Table 6-1 Message Header. More...
 
union  pd_ext_header
 Build an extended message header See Table 6-3 Extended Message Header. More...
 
union  pd_fixed_supply_pdo_source
 Create a Fixed Supply PDO Source value See Table 6-9 Fixed Supply PDO - Source. More...
 
union  pd_fixed_supply_pdo_sink
 Create a Fixed Supply PDO Sink value See Table 6-14 Fixed Supply PDO - Sink. More...
 
union  pd_variable_supply_pdo_source
 Create a Variable Supply PDO Source value See Table 6-11 Variable Supply (non-Battery) PDO - Source. More...
 
union  pd_variable_supply_pdo_sink
 Create a Variable Supply PDO Sink value See Table 6-15 Variable Supply (non-Battery) PDO - Sink. More...
 
union  pd_battery_supply_pdo_source
 Create a Battery Supply PDO Source value See Table 6-12 Battery Supply PDO - Source. More...
 
union  pd_battery_supply_pdo_sink
 Create a Battery Supply PDO Sink value See Table 6-16 Battery Supply PDO - Sink. More...
 
union  pd_augmented_supply_pdo_source
 Create Augmented Supply PDO Source value See Table 6-13 Programmable Power Supply APDO - Source. More...
 
union  pd_augmented_supply_pdo_sink
 Create Augmented Supply PDO Sink value See Table 6-17 Programmable Power Supply APDO - Sink. More...
 
union  pd_rdo
 The Request Data Object (RDO) Shall be returned by the Sink making a request for power. More...
 
struct  pd_msg
 Power Delivery message. More...
 

Macros

#define PD_MAX_EXTENDED_MSG_LEGACY_LEN   26
 Maximum length of a non-Extended Message in bytes.
 
#define PD_MAX_EXTENDED_MSG_LEN   260
 Maximum length of an Extended Message in bytes.
 
#define PD_MAX_EXTENDED_MSG_CHUNK_LEN   26
 Maximum length of a Chunked Message in bytes.
 
#define PD_T_TYPEC_SINK_WAIT_CAP_MIN_MS   310
 Minimum time a sink shall wait for a Source_Capabilities message before sending a Hard Reset See Table 6-61 Time Values Parameter Name: tTypeCSinkWaitCap.
 
#define PD_T_TYPEC_SINK_WAIT_CAP_MAX_MS   620
 Minimum time a sink shall wait for a Source_Capabilities message before sending a Hard Reset See Table 6-61 Time Values Parameter Name: tTypeCSinkWaitCap.
 
#define PD_V_SAFE_0V_MAX_MV   800
 VBUS maximum safe operating voltage at "zero volts".
 
#define PD_V_SAFE_5V_MIN_MV   4750
 VBUS minimum safe operating voltage at 5V.
 
#define PD_T_SAFE_0V_MAX_MS   650
 Time to reach PD_V_SAFE_0V_MV max in milliseconds.
 
#define PD_T_SAFE_5V_MAX_MS   275
 Time to reach PD_V_SAFE_5V_MV max in milliseconds.
 
#define PD_T_TX_TIMEOUT_MS   100
 Time to wait for TCPC to complete transmit.
 
#define PD_T_HARD_RESET_COMPLETE_MIN_MS   4
 Minimum time a Hard Reset must complete.
 
#define PD_T_HARD_RESET_COMPLETE_MAX_MS   5
 Maximum time a Hard Reset must complete.
 
#define PD_T_SENDER_RESPONSE_MIN_MS   24
 Minimum time a response must be sent from a Port Partner See Table 6-68 Time Values.
 
#define PD_T_SENDER_RESPONSE_NOM_MS   27
 Nomiminal time a response must be sent from a Port Partner See Table 6-68 Time Values.
 
#define PD_T_SENDER_RESPONSE_MAX_MS   30
 Maximum time a response must be sent from a Port Partner See Table 6-68 Time Values.
 
#define PD_T_SPR_PS_TRANSITION_MIN_MS   450
 Minimum SPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.
 
#define PD_T_SPR_PS_TRANSITION_NOM_MS   500
 Nominal SPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.
 
#define PD_T_SPR_PS_TRANSITION_MAX_MS   550
 Maximum SPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.
 
#define PD_T_EPR_PS_TRANSITION_MIN_MS   830
 Minimum EPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.
 
#define PD_T_EPR_PS_TRANSITION_NOM_MS   925
 Nominal EPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.
 
#define PD_T_EPR_PS_TRANSITION_MAX_MS   1020
 Maximum EPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.
 
#define PD_T_SINK_REQUEST_MIN_MS   100
 Minimum time to wait before sending another request after receiving a Wait message See Table 6-68 Time Values.
 
#define PD_T_CHUNKING_NOT_SUPPORTED_MIN_MS   40
 Minimum time to wait before sending a Not_Supported message after receiving a Chunked message See Table 6-68 Time Values.
 
#define PD_T_CHUNKING_NOT_SUPPORTED_NOM_MS   45
 Nominal time to wait before sending a Not_Supported message after receiving a Chunked message See Table 6-68 Time Values.
 
#define PD_T_CHUNKING_NOT_SUPPORTED_MAX_MS   50
 Maximum time to wait before sending a Not_Supported message after receiving a Chunked message See Table 6-68 Time Values.
 
#define PD_CONVERT_BYTES_TO_PD_HEADER_COUNT(c)   ((c) >> 2)
 Convert bytes to PD Header data object count, where a data object is 4-bytes.
 
#define PD_CONVERT_PD_HEADER_COUNT_TO_BYTES(c)   ((c) << 2)
 Convert PD Header data object count to bytes.
 
#define SINK_TX_OK   TC_RP_3A0
 Collision avoidance Rp values in REV 3.0 Sink Transmit "OK".
 
#define SINK_TX_NG   TC_RP_1A5
 Collision avoidance Rp values in REV 3.0 Sink Transmit "NO GO".
 
#define PD_GET_EXT_HEADER(c)   ((c) & 0xffff)
 Used to get extended header from the first 32-bit word of the message.
 
#define PDO_MAX_DATA_OBJECTS   7
 PDO - Power Data Object RDO - Request Data Object.
 
#define PD_CONVERT_MA_TO_FIXED_PDO_CURRENT(c)   ((c) / 10)
 Convert milliamps to Fixed PDO Current in 10mA units.
 
#define PD_CONVERT_MV_TO_FIXED_PDO_VOLTAGE(v)   ((v) / 50)
 Convert millivolts to Fixed PDO Voltage in 50mV units.
 
#define PD_CONVERT_FIXED_PDO_CURRENT_TO_MA(c)   ((c) * 10)
 Convert a Fixed PDO Current from 10mA units to milliamps.
 
#define PD_CONVERT_FIXED_PDO_VOLTAGE_TO_MV(v)   ((v) * 50)
 Convert a Fixed PDO Voltage from 50mV units to millivolts.
 
#define PD_CONVERT_MA_TO_VARIABLE_PDO_CURRENT(c)   ((c) / 10)
 Convert milliamps to Variable PDO Current in 10ma units.
 
#define PD_CONVERT_MV_TO_VARIABLE_PDO_VOLTAGE(v)   ((v) / 50)
 Convert millivolts to Variable PDO Voltage in 50mV units.
 
#define PD_CONVERT_VARIABLE_PDO_CURRENT_TO_MA(c)   ((c) * 10)
 Convert a Variable PDO Current from 10mA units to milliamps.
 
#define PD_CONVERT_VARIABLE_PDO_VOLTAGE_TO_MV(v)   ((v) * 50)
 Convert a Variable PDO Voltage from 50mV units to millivolts.
 
#define PD_CONVERT_MW_TO_BATTERY_PDO_POWER(c)   ((c) / 250)
 Convert milliwatts to Battery PDO Power in 250mW units.
 
#define PD_CONVERT_MV_TO_BATTERY_PDO_VOLTAGE(v)   ((v) / 50)
 Convert milliwatts to Battery PDO Voltage in 50mV units.
 
#define PD_CONVERT_BATTERY_PDO_POWER_TO_MW(c)   ((c) * 250)
 Convert a Battery PDO Power from 250mW units to milliwatts.
 
#define PD_CONVERT_BATTERY_PDO_VOLTAGE_TO_MV(v)   ((v) * 50)
 Convert a Battery PDO Voltage from 50mV units to millivolts.
 
#define PD_CONVERT_MA_TO_AUGMENTED_PDO_CURRENT(c)   ((c) / 50)
 Convert milliamps to Augmented PDO Current in 50mA units.
 
#define PD_CONVERT_MV_TO_AUGMENTED_PDO_VOLTAGE(v)   ((v) / 100)
 Convert millivolts to Augmented PDO Voltage in 100mV units.
 
#define PD_CONVERT_AUGMENTED_PDO_CURRENT_TO_MA(c)   ((c) * 50)
 Convert an Augmented PDO Current from 50mA units to milliamps.
 
#define PD_CONVERT_AUGMENTED_PDO_VOLTAGE_TO_MV(v)   ((v) * 100)
 Convert an Augmented PDO Voltage from 100mV units to millivolts.
 
#define NUM_SOP_STAR_TYPES   (PD_PACKET_DEBUG_PRIME_PRIME + 1)
 Number of valid Transmit Types.
 

Enumerations

enum  pdo_type { PDO_FIXED = 0 , PDO_BATTERY = 1 , PDO_VARIABLE = 2 , PDO_AUGMENTED = 3 }
 Power Data Object Type Table 6-7 Power Data Object. More...
 
enum  pd_frs_type { FRS_NOT_SUPPORTED , FRS_DEFAULT_USB_POWER , FRS_1P5A_5V , FRS_3P0A_5V }
 Fast Role Swap Required for USB Type-C current. More...
 
enum  pd_rev_type { PD_REV10 = 0 , PD_REV20 = 1 , PD_REV30 = 2 }
 Protocol revision. More...
 
enum  pd_packet_type {
  PD_PACKET_SOP = 0 , PD_PACKET_SOP_PRIME = 1 , PD_PACKET_PRIME_PRIME = 2 , PD_PACKET_DEBUG_PRIME = 3 ,
  PD_PACKET_DEBUG_PRIME_PRIME = 4 , PD_PACKET_TX_HARD_RESET = 5 , PD_PACKET_CABLE_RESET = 6 , PD_PACKET_TX_BIST_MODE_2 = 7 ,
  PD_PACKET_MSG_INVALID = 0xf
}
 Power Delivery packet type See USB Type-C Port Controller Interface Specification, Revision 2.0, Version 1.2, Table 4-38 TRANSMIT Register Definition. More...
 
enum  pd_ctrl_msg_type {
  PD_CTRL_GOOD_CRC = 1 , PD_CTRL_GOTO_MIN = 2 , PD_CTRL_ACCEPT = 3 , PD_CTRL_REJECT = 4 ,
  PD_CTRL_PING = 5 , PD_CTRL_PS_RDY = 6 , PD_CTRL_GET_SOURCE_CAP = 7 , PD_CTRL_GET_SINK_CAP = 8 ,
  PD_CTRL_DR_SWAP = 9 , PD_CTRL_PR_SWAP = 10 , PD_CTRL_VCONN_SWAP = 11 , PD_CTRL_WAIT = 12 ,
  PD_CTRL_SOFT_RESET = 13 , PD_CTRL_DATA_RESET = 14 , PD_CTRL_DATA_RESET_COMPLETE = 15 , PD_CTRL_NOT_SUPPORTED = 16 ,
  PD_CTRL_GET_SOURCE_CAP_EXT = 17 , PD_CTRL_GET_STATUS = 18 , PD_CTRL_FR_SWAP = 19 , PD_CTRL_GET_PPS_STATUS = 20 ,
  PD_CTRL_GET_COUNTRY_CODES = 21 , PD_CTRL_GET_SINK_CAP_EXT = 22
}
 Control Message type See Table 6-5 Control Message Types. More...
 
enum  pd_data_msg_type {
  PD_DATA_SOURCE_CAP = 1 , PD_DATA_REQUEST = 2 , PD_DATA_BIST = 3 , PD_DATA_SINK_CAP = 4 ,
  PD_DATA_BATTERY_STATUS = 5 , PD_DATA_ALERT = 6 , PD_DATA_GET_COUNTRY_INFO = 7 , PD_DATA_ENTER_USB = 8 ,
  PD_DATA_VENDOR_DEF = 15
}
 Data message type See Table 6-6 Data Message Types. More...
 
enum  pd_ext_msg_type {
  PD_EXT_SOURCE_CAP = 1 , PD_EXT_STATUS = 2 , PD_EXT_GET_BATTERY_CAP = 3 , PD_EXT_GET_BATTERY_STATUS = 4 ,
  PD_EXT_BATTERY_CAP = 5 , PD_EXT_GET_MANUFACTURER_INFO = 6 , PD_EXT_MANUFACTURER_INFO = 7 , PD_EXT_SECURITY_REQUEST = 8 ,
  PD_EXT_SECURITY_RESPONSE = 9 , PD_EXT_FIRMWARE_UPDATE_REQUEST = 10 , PD_EXT_FIRMWARE_UPDATE_RESPONSE = 11 , PD_EXT_PPS_STATUS = 12 ,
  PD_EXT_COUNTRY_INFO = 13 , PD_EXT_COUNTRY_CODES = 14
}
 Extended message type for REV 3.0 See Table 6-48 Extended Message Types. More...
 
enum  usbpd_cc_pin { USBPD_CC_PIN_1 = 0 , USBPD_CC_PIN_2 = 1 }
 Active PD CC pin. More...
 

USB PD 3.1 Rev 1.6, Table 6-70 Counter Parameters

#define PD_N_CAPS_COUNT   50
 The CapsCounter is used to count the number of Source_Capabilities Messages which have been sent by a Source at power up or after a Hard Reset.
 
#define PD_N_HARD_RESET_COUNT   2
 The HardResetCounter is used to retry the Hard Reset whenever there is no response from the remote device (see Section 6.6.6) Parameter Name: nHardResetCounter.
 

USB PD 3.1 Rev 1.6, Table 6-68 Time Values

#define PD_T_NO_RESPONSE_MIN_MS   4500
 The NoResponseTimer is used by the Policy Engine in a Source to determine that its Port Partner is not responding after a Hard Reset.
 
#define PD_T_NO_RESPONSE_MAX_MS   5500
 The NoResponseTimer is used by the Policy Engine in a Source to determine that its Port Partner is not responding after a Hard Reset.
 
#define PD_T_PS_HARD_RESET_MIN_MS   25
 Min time the Source waits to ensure that the Sink has had sufficient time to process Hard Reset Signaling before turning off its power supply to VBUS Parameter Name: tPSHardReset.
 
#define PD_T_PS_HARD_RESET_MAX_MS   35
 Max time the Source waits to ensure that the Sink has had sufficient time to process Hard Reset Signaling before turning off its power supply to VBUS Parameter Name: tPSHardReset.
 
#define PD_T_SINK_TX_MIN_MS   16
 Minimum time a Source waits after changing Rp from SinkTxOk to SinkTxNG before initiating an AMS by sending a Message.
 
#define PD_T_SINK_TX_MAX_MS   20
 Maximum time a Source waits after changing Rp from SinkTxOk to SinkTxNG before initiating an AMS by sending a Message.
 
#define PD_T_TYPEC_SEND_SOURCE_CAP_MIN_MS   100
 Minimum time a source shall wait before sending a Source_Capabilities message while the following is true: 1) The Port is Attached.
 
#define PD_T_TYPEC_SEND_SOURCE_CAP_MAX_MS   200
 Maxmimum time a source shall wait before sending a Source_Capabilities message while the following is true: 1) The Port is Attached.
 

Detailed Description

USB Power Delivery.

Macro Definition Documentation

◆ NUM_SOP_STAR_TYPES

#define NUM_SOP_STAR_TYPES   (PD_PACKET_DEBUG_PRIME_PRIME + 1)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Number of valid Transmit Types.

◆ PD_CONVERT_AUGMENTED_PDO_CURRENT_TO_MA

#define PD_CONVERT_AUGMENTED_PDO_CURRENT_TO_MA (   c)    ((c) * 50)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert an Augmented PDO Current from 50mA units to milliamps.

Parameters
cAugmented PDO current in 50mA units.

◆ PD_CONVERT_AUGMENTED_PDO_VOLTAGE_TO_MV

#define PD_CONVERT_AUGMENTED_PDO_VOLTAGE_TO_MV (   v)    ((v) * 100)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert an Augmented PDO Voltage from 100mV units to millivolts.

Parameters
vAugmented PDO voltage in 100mV units.

◆ PD_CONVERT_BATTERY_PDO_POWER_TO_MW

#define PD_CONVERT_BATTERY_PDO_POWER_TO_MW (   c)    ((c) * 250)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert a Battery PDO Power from 250mW units to milliwatts.

Parameters
cPower in 250mW units.

◆ PD_CONVERT_BATTERY_PDO_VOLTAGE_TO_MV

#define PD_CONVERT_BATTERY_PDO_VOLTAGE_TO_MV (   v)    ((v) * 50)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert a Battery PDO Voltage from 50mV units to millivolts.

Parameters
vVoltage in 50mV units.

◆ PD_CONVERT_BYTES_TO_PD_HEADER_COUNT

#define PD_CONVERT_BYTES_TO_PD_HEADER_COUNT (   c)    ((c) >> 2)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert bytes to PD Header data object count, where a data object is 4-bytes.

Parameters
cnumber of bytes to convert

◆ PD_CONVERT_FIXED_PDO_CURRENT_TO_MA

#define PD_CONVERT_FIXED_PDO_CURRENT_TO_MA (   c)    ((c) * 10)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert a Fixed PDO Current from 10mA units to milliamps.

Parameters
cFixed PDO current in 10mA units.

◆ PD_CONVERT_FIXED_PDO_VOLTAGE_TO_MV

#define PD_CONVERT_FIXED_PDO_VOLTAGE_TO_MV (   v)    ((v) * 50)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert a Fixed PDO Voltage from 50mV units to millivolts.

Used for converting pd_fixed_supply_pdo_source.voltage and pd_fixed_supply_pdo_sink.voltage

Parameters
vFixed PDO voltage in 50mV units.

◆ PD_CONVERT_MA_TO_AUGMENTED_PDO_CURRENT

#define PD_CONVERT_MA_TO_AUGMENTED_PDO_CURRENT (   c)    ((c) / 50)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert milliamps to Augmented PDO Current in 50mA units.

Parameters
cCurrent in milliamps

◆ PD_CONVERT_MA_TO_FIXED_PDO_CURRENT

#define PD_CONVERT_MA_TO_FIXED_PDO_CURRENT (   c)    ((c) / 10)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert milliamps to Fixed PDO Current in 10mA units.

Parameters
cCurrent in milliamps

◆ PD_CONVERT_MA_TO_VARIABLE_PDO_CURRENT

#define PD_CONVERT_MA_TO_VARIABLE_PDO_CURRENT (   c)    ((c) / 10)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert milliamps to Variable PDO Current in 10ma units.

Parameters
cCurrent in milliamps

◆ PD_CONVERT_MV_TO_AUGMENTED_PDO_VOLTAGE

#define PD_CONVERT_MV_TO_AUGMENTED_PDO_VOLTAGE (   v)    ((v) / 100)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert millivolts to Augmented PDO Voltage in 100mV units.

Parameters
vVoltage in millivolts

◆ PD_CONVERT_MV_TO_BATTERY_PDO_VOLTAGE

#define PD_CONVERT_MV_TO_BATTERY_PDO_VOLTAGE (   v)    ((v) / 50)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert milliwatts to Battery PDO Voltage in 50mV units.

Parameters
vVoltage in millivolts

◆ PD_CONVERT_MV_TO_FIXED_PDO_VOLTAGE

#define PD_CONVERT_MV_TO_FIXED_PDO_VOLTAGE (   v)    ((v) / 50)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert millivolts to Fixed PDO Voltage in 50mV units.

Parameters
vVoltage in millivolts

◆ PD_CONVERT_MV_TO_VARIABLE_PDO_VOLTAGE

#define PD_CONVERT_MV_TO_VARIABLE_PDO_VOLTAGE (   v)    ((v) / 50)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert millivolts to Variable PDO Voltage in 50mV units.

Parameters
vVoltage in millivolts

◆ PD_CONVERT_MW_TO_BATTERY_PDO_POWER

#define PD_CONVERT_MW_TO_BATTERY_PDO_POWER (   c)    ((c) / 250)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert milliwatts to Battery PDO Power in 250mW units.

Parameters
cPower in milliwatts

◆ PD_CONVERT_PD_HEADER_COUNT_TO_BYTES

#define PD_CONVERT_PD_HEADER_COUNT_TO_BYTES (   c)    ((c) << 2)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert PD Header data object count to bytes.

Parameters
cnumber of PD Header data objects

◆ PD_CONVERT_VARIABLE_PDO_CURRENT_TO_MA

#define PD_CONVERT_VARIABLE_PDO_CURRENT_TO_MA (   c)    ((c) * 10)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert a Variable PDO Current from 10mA units to milliamps.

Parameters
cVariable PDO current in 10mA units.

◆ PD_CONVERT_VARIABLE_PDO_VOLTAGE_TO_MV

#define PD_CONVERT_VARIABLE_PDO_VOLTAGE_TO_MV (   v)    ((v) * 50)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Convert a Variable PDO Voltage from 50mV units to millivolts.

Parameters
vVariable PDO voltage in 50mV units.

◆ PD_GET_EXT_HEADER

#define PD_GET_EXT_HEADER (   c)    ((c) & 0xffff)

#include <zephyr/drivers/usb_c/usbc_pd.h>

Used to get extended header from the first 32-bit word of the message.

Parameters
cfirst 32-bit word of the message

◆ PD_MAX_EXTENDED_MSG_CHUNK_LEN

#define PD_MAX_EXTENDED_MSG_CHUNK_LEN   26

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum length of a Chunked Message in bytes.

When one of both Port Partners do not support Extended Messages of Data Size greater than PD_MAX_EXTENDED_MSG_LEGACY_LEN then the Protocol Layer supports a Chunking mechanism to break larger Messages into smaller Chunks of size PD_MAX_EXTENDED_MSG_CHUNK_LEN. See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgChunkLen

◆ PD_MAX_EXTENDED_MSG_LEGACY_LEN

#define PD_MAX_EXTENDED_MSG_LEGACY_LEN   26

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum length of a non-Extended Message in bytes.

See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgLegacyLen

◆ PD_MAX_EXTENDED_MSG_LEN

#define PD_MAX_EXTENDED_MSG_LEN   260

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum length of an Extended Message in bytes.

See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgLen

◆ PD_N_CAPS_COUNT

#define PD_N_CAPS_COUNT   50

#include <zephyr/drivers/usb_c/usbc_pd.h>

The CapsCounter is used to count the number of Source_Capabilities Messages which have been sent by a Source at power up or after a Hard Reset.

Parameter Name: nCapsCounter

◆ PD_N_HARD_RESET_COUNT

#define PD_N_HARD_RESET_COUNT   2

#include <zephyr/drivers/usb_c/usbc_pd.h>

The HardResetCounter is used to retry the Hard Reset whenever there is no response from the remote device (see Section 6.6.6) Parameter Name: nHardResetCounter.

◆ PD_T_CHUNKING_NOT_SUPPORTED_MAX_MS

#define PD_T_CHUNKING_NOT_SUPPORTED_MAX_MS   50

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum time to wait before sending a Not_Supported message after receiving a Chunked message See Table 6-68 Time Values.

◆ PD_T_CHUNKING_NOT_SUPPORTED_MIN_MS

#define PD_T_CHUNKING_NOT_SUPPORTED_MIN_MS   40

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum time to wait before sending a Not_Supported message after receiving a Chunked message See Table 6-68 Time Values.

◆ PD_T_CHUNKING_NOT_SUPPORTED_NOM_MS

#define PD_T_CHUNKING_NOT_SUPPORTED_NOM_MS   45

#include <zephyr/drivers/usb_c/usbc_pd.h>

Nominal time to wait before sending a Not_Supported message after receiving a Chunked message See Table 6-68 Time Values.

◆ PD_T_EPR_PS_TRANSITION_MAX_MS

#define PD_T_EPR_PS_TRANSITION_MAX_MS   1020

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum EPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.

◆ PD_T_EPR_PS_TRANSITION_MIN_MS

#define PD_T_EPR_PS_TRANSITION_MIN_MS   830

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum EPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.

◆ PD_T_EPR_PS_TRANSITION_NOM_MS

#define PD_T_EPR_PS_TRANSITION_NOM_MS   925

#include <zephyr/drivers/usb_c/usbc_pd.h>

Nominal EPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.

◆ PD_T_HARD_RESET_COMPLETE_MAX_MS

#define PD_T_HARD_RESET_COMPLETE_MAX_MS   5

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum time a Hard Reset must complete.

See Table 6-68 Time Values

◆ PD_T_HARD_RESET_COMPLETE_MIN_MS

#define PD_T_HARD_RESET_COMPLETE_MIN_MS   4

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum time a Hard Reset must complete.

See Table 6-68 Time Values

◆ PD_T_NO_RESPONSE_MAX_MS

#define PD_T_NO_RESPONSE_MAX_MS   5500

#include <zephyr/drivers/usb_c/usbc_pd.h>

The NoResponseTimer is used by the Policy Engine in a Source to determine that its Port Partner is not responding after a Hard Reset.

Parameter Name: tNoResponseTimer

◆ PD_T_NO_RESPONSE_MIN_MS

#define PD_T_NO_RESPONSE_MIN_MS   4500

#include <zephyr/drivers/usb_c/usbc_pd.h>

The NoResponseTimer is used by the Policy Engine in a Source to determine that its Port Partner is not responding after a Hard Reset.

Parameter Name: tNoResponseTimer

◆ PD_T_PS_HARD_RESET_MAX_MS

#define PD_T_PS_HARD_RESET_MAX_MS   35

#include <zephyr/drivers/usb_c/usbc_pd.h>

Max time the Source waits to ensure that the Sink has had sufficient time to process Hard Reset Signaling before turning off its power supply to VBUS Parameter Name: tPSHardReset.

◆ PD_T_PS_HARD_RESET_MIN_MS

#define PD_T_PS_HARD_RESET_MIN_MS   25

#include <zephyr/drivers/usb_c/usbc_pd.h>

Min time the Source waits to ensure that the Sink has had sufficient time to process Hard Reset Signaling before turning off its power supply to VBUS Parameter Name: tPSHardReset.

◆ PD_T_SAFE_0V_MAX_MS

#define PD_T_SAFE_0V_MAX_MS   650

#include <zephyr/drivers/usb_c/usbc_pd.h>

Time to reach PD_V_SAFE_0V_MV max in milliseconds.

See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: tSafe0V

◆ PD_T_SAFE_5V_MAX_MS

#define PD_T_SAFE_5V_MAX_MS   275

#include <zephyr/drivers/usb_c/usbc_pd.h>

Time to reach PD_V_SAFE_5V_MV max in milliseconds.

See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: tSafe5V

◆ PD_T_SENDER_RESPONSE_MAX_MS

#define PD_T_SENDER_RESPONSE_MAX_MS   30

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum time a response must be sent from a Port Partner See Table 6-68 Time Values.

◆ PD_T_SENDER_RESPONSE_MIN_MS

#define PD_T_SENDER_RESPONSE_MIN_MS   24

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum time a response must be sent from a Port Partner See Table 6-68 Time Values.

◆ PD_T_SENDER_RESPONSE_NOM_MS

#define PD_T_SENDER_RESPONSE_NOM_MS   27

#include <zephyr/drivers/usb_c/usbc_pd.h>

Nomiminal time a response must be sent from a Port Partner See Table 6-68 Time Values.

◆ PD_T_SINK_REQUEST_MIN_MS

#define PD_T_SINK_REQUEST_MIN_MS   100

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum time to wait before sending another request after receiving a Wait message See Table 6-68 Time Values.

◆ PD_T_SINK_TX_MAX_MS

#define PD_T_SINK_TX_MAX_MS   20

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum time a Source waits after changing Rp from SinkTxOk to SinkTxNG before initiating an AMS by sending a Message.

Parameter Name: tSinkTx

◆ PD_T_SINK_TX_MIN_MS

#define PD_T_SINK_TX_MIN_MS   16

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum time a Source waits after changing Rp from SinkTxOk to SinkTxNG before initiating an AMS by sending a Message.

Parameter Name: tSinkTx

◆ PD_T_SPR_PS_TRANSITION_MAX_MS

#define PD_T_SPR_PS_TRANSITION_MAX_MS   550

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maximum SPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.

◆ PD_T_SPR_PS_TRANSITION_MIN_MS

#define PD_T_SPR_PS_TRANSITION_MIN_MS   450

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum SPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.

◆ PD_T_SPR_PS_TRANSITION_NOM_MS

#define PD_T_SPR_PS_TRANSITION_NOM_MS   500

#include <zephyr/drivers/usb_c/usbc_pd.h>

Nominal SPR Mode time for a power suppply to transition to a new level See Table 6-68 Time Values.

◆ PD_T_TX_TIMEOUT_MS

#define PD_T_TX_TIMEOUT_MS   100

#include <zephyr/drivers/usb_c/usbc_pd.h>

Time to wait for TCPC to complete transmit.

◆ PD_T_TYPEC_SEND_SOURCE_CAP_MAX_MS

#define PD_T_TYPEC_SEND_SOURCE_CAP_MAX_MS   200

#include <zephyr/drivers/usb_c/usbc_pd.h>

Maxmimum time a source shall wait before sending a Source_Capabilities message while the following is true: 1) The Port is Attached.

2) The Source is not in an active connection with a PD Sink Port. Parameter Name: tTypeCSendSourceCap

◆ PD_T_TYPEC_SEND_SOURCE_CAP_MIN_MS

#define PD_T_TYPEC_SEND_SOURCE_CAP_MIN_MS   100

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum time a source shall wait before sending a Source_Capabilities message while the following is true: 1) The Port is Attached.

2) The Source is not in an active connection with a PD Sink Port. Parameter Name: tTypeCSendSourceCap

◆ PD_T_TYPEC_SINK_WAIT_CAP_MAX_MS

#define PD_T_TYPEC_SINK_WAIT_CAP_MAX_MS   620

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum time a sink shall wait for a Source_Capabilities message before sending a Hard Reset See Table 6-61 Time Values Parameter Name: tTypeCSinkWaitCap.

◆ PD_T_TYPEC_SINK_WAIT_CAP_MIN_MS

#define PD_T_TYPEC_SINK_WAIT_CAP_MIN_MS   310

#include <zephyr/drivers/usb_c/usbc_pd.h>

Minimum time a sink shall wait for a Source_Capabilities message before sending a Hard Reset See Table 6-61 Time Values Parameter Name: tTypeCSinkWaitCap.

◆ PD_V_SAFE_0V_MAX_MV

#define PD_V_SAFE_0V_MAX_MV   800

#include <zephyr/drivers/usb_c/usbc_pd.h>

VBUS maximum safe operating voltage at "zero volts".

See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: vSafe0V

◆ PD_V_SAFE_5V_MIN_MV

#define PD_V_SAFE_5V_MIN_MV   4750

#include <zephyr/drivers/usb_c/usbc_pd.h>

VBUS minimum safe operating voltage at 5V.

See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: vSafe5V

◆ PDO_MAX_DATA_OBJECTS

#define PDO_MAX_DATA_OBJECTS   7

#include <zephyr/drivers/usb_c/usbc_pd.h>

PDO - Power Data Object RDO - Request Data Object.

Maximum number of 32-bit data objects sent in a single request

◆ SINK_TX_NG

#define SINK_TX_NG   TC_RP_1A5

#include <zephyr/drivers/usb_c/usbc_pd.h>

Collision avoidance Rp values in REV 3.0 Sink Transmit "NO GO".

◆ SINK_TX_OK

#define SINK_TX_OK   TC_RP_3A0

#include <zephyr/drivers/usb_c/usbc_pd.h>

Collision avoidance Rp values in REV 3.0 Sink Transmit "OK".

Enumeration Type Documentation

◆ pd_ctrl_msg_type

#include <zephyr/drivers/usb_c/usbc_pd.h>

Control Message type See Table 6-5 Control Message Types.

Enumerator
PD_CTRL_GOOD_CRC 

0 Reserved

GoodCRC Message

PD_CTRL_GOTO_MIN 

GotoMin Message.

PD_CTRL_ACCEPT 

Accept Message.

PD_CTRL_REJECT 

Reject Message.

PD_CTRL_PING 

Ping Message.

PD_CTRL_PS_RDY 

PS_RDY Message.

PD_CTRL_GET_SOURCE_CAP 

Get_Source_Cap Message.

PD_CTRL_GET_SINK_CAP 

Get_Sink_Cap Message.

PD_CTRL_DR_SWAP 

DR_Swap Message.

PD_CTRL_PR_SWAP 

PR_Swap Message.

PD_CTRL_VCONN_SWAP 

VCONN_Swap Message.

PD_CTRL_WAIT 

Wait Message.

PD_CTRL_SOFT_RESET 

Soft Reset Message.

PD_CTRL_DATA_RESET 

Used for REV 3.0.

Data_Reset Message

PD_CTRL_DATA_RESET_COMPLETE 

Data_Reset_Complete Message.

PD_CTRL_NOT_SUPPORTED 

Not_Supported Message.

PD_CTRL_GET_SOURCE_CAP_EXT 

Get_Source_Cap_Extended Message.

PD_CTRL_GET_STATUS 

Get_Status Message.

PD_CTRL_FR_SWAP 

FR_Swap Message.

PD_CTRL_GET_PPS_STATUS 

Get_PPS_Status Message.

PD_CTRL_GET_COUNTRY_CODES 

Get_Country_Codes Message.

PD_CTRL_GET_SINK_CAP_EXT 

Get_Sink_Cap_Extended Message.

◆ pd_data_msg_type

#include <zephyr/drivers/usb_c/usbc_pd.h>

Data message type See Table 6-6 Data Message Types.

Enumerator
PD_DATA_SOURCE_CAP 

0 Reserved

Source_Capabilities Message

PD_DATA_REQUEST 

Request Message.

PD_DATA_BIST 

BIST Message.

PD_DATA_SINK_CAP 

Sink Capabilities Message.

PD_DATA_BATTERY_STATUS 

5-14 Reserved for REV 2.0

PD_DATA_ALERT 

Alert Message.

PD_DATA_GET_COUNTRY_INFO 

Get Country Info Message.

PD_DATA_ENTER_USB 

8-14 Reserved for REV 3.0

Enter USB message

PD_DATA_VENDOR_DEF 

Vendor Defined Message.

◆ pd_ext_msg_type

#include <zephyr/drivers/usb_c/usbc_pd.h>

Extended message type for REV 3.0 See Table 6-48 Extended Message Types.

Enumerator
PD_EXT_SOURCE_CAP 

0 Reserved

Source_Capabilities_Extended Message

PD_EXT_STATUS 

Status Message.

PD_EXT_GET_BATTERY_CAP 

Get_Battery_Cap Message.

PD_EXT_GET_BATTERY_STATUS 

Get_Battery_Status Message.

PD_EXT_BATTERY_CAP 

Battery_Capabilities Message.

PD_EXT_GET_MANUFACTURER_INFO 

Get_Manufacturer_Info Message.

PD_EXT_MANUFACTURER_INFO 

Manufacturer_Info Message.

PD_EXT_SECURITY_REQUEST 

Security_Request Message.

PD_EXT_SECURITY_RESPONSE 

Security_Response Message.

PD_EXT_FIRMWARE_UPDATE_REQUEST 

Firmware_Update_Request Message.

PD_EXT_FIRMWARE_UPDATE_RESPONSE 

Firmware_Update_Response Message.

PD_EXT_PPS_STATUS 

PPS_Status Message.

PD_EXT_COUNTRY_INFO 

Country_Codes Message.

PD_EXT_COUNTRY_CODES 

Country_Info Message.

◆ pd_frs_type

#include <zephyr/drivers/usb_c/usbc_pd.h>

Fast Role Swap Required for USB Type-C current.

Enumerator
FRS_NOT_SUPPORTED 

Fast Swap not supported.

FRS_DEFAULT_USB_POWER 

Default USB Power.

FRS_1P5A_5V 

1.5A @ 5V

FRS_3P0A_5V 

3.0A @ 5V

◆ pd_packet_type

#include <zephyr/drivers/usb_c/usbc_pd.h>

Power Delivery packet type See USB Type-C Port Controller Interface Specification, Revision 2.0, Version 1.2, Table 4-38 TRANSMIT Register Definition.

Enumerator
PD_PACKET_SOP 

Port Partner message.

PD_PACKET_SOP_PRIME 

Cable Plug message.

PD_PACKET_PRIME_PRIME 

Cable Plug message far end.

PD_PACKET_DEBUG_PRIME 

Currently undefined in the PD specification.

PD_PACKET_DEBUG_PRIME_PRIME 

Currently undefined in the PD specification.

PD_PACKET_TX_HARD_RESET 

Hard Reset message to the Port Partner.

PD_PACKET_CABLE_RESET 

Cable Reset message to the Cable.

PD_PACKET_TX_BIST_MODE_2 

BIST_MODE_2 message to the Port Partner.

PD_PACKET_MSG_INVALID 

USED ONLY FOR RECEPTION OF UNKNOWN MSG TYPES.

◆ pd_rev_type

#include <zephyr/drivers/usb_c/usbc_pd.h>

Protocol revision.

Enumerator
PD_REV10 

PD revision 1.0.

PD_REV20 

PD revision 2.0.

PD_REV30 

PD revision 3.0.

◆ pdo_type

enum pdo_type

#include <zephyr/drivers/usb_c/usbc_pd.h>

Power Data Object Type Table 6-7 Power Data Object.

Enumerator
PDO_FIXED 

Fixed supply (Vmin = Vmax)

PDO_BATTERY 

Battery.

PDO_VARIABLE 

Variable Supply (non-Battery)

PDO_AUGMENTED 

Augmented Power Data Object (APDO)

◆ usbpd_cc_pin

#include <zephyr/drivers/usb_c/usbc_pd.h>

Active PD CC pin.

Enumerator
USBPD_CC_PIN_1 

PD is active on CC1.

USBPD_CC_PIN_2 

PD is active on CC2.