summaryrefslogtreecommitdiff
path: root/doc/usage/cmd/tcpm.rst
blob: eb2c69d0bdb202af3fa166347d1f5673b3af2a42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.. SPDX-License-Identifier: GPL-2.0+:

.. index::
   single: tcpm (command)

tcpm command
============

Synopsis
--------

::

    tcpm dev [devnum]
    tcpm info
    tcpm list

Description
-----------

The tcpm command is used to control USB-PD controllers, also known as TypeC Port Manager (TCPM).

The 'tcpm dev' command shows or set current TCPM device.

    devnum
        device number to change

The 'tcpm info' command displays the current state of the device

The 'tcpm list' command displays the list available devices.

Examples
--------

The 'tcpm info' command displays device's status:
::

    => tcpm info
    Orientation: normal
    PD Revision: rev3
    Power Role:  sink
    Data Role:   device
    Voltage:     20.000 V
    Current:      2.250 A

The current device can be shown or set via 'tcpm dev' command:
::

    => tcpm dev
    TCPM device is not set!
    => tcpm dev 0
    dev: 0 @ usb-typec@22
    => tcpm dev
    dev: 0 @ usb-typec@22

The list of available devices can be shown via 'tcpm list' command:
::

    => tcpm list
    | ID | Name                            | Parent name         | Parent uclass @ seq
    |  0 | usb-typec@22                    | i2c@feac0000        | i2c @ 4 | status: 0

Configuration
-------------

The tcpm command is only available if CONFIG_CMD_TCPM=y.