blob: eb2c69d0bdb202af3fa166347d1f5673b3af2a42 [file] [log] [blame]
Sebastian Reichel3dd23322024-10-15 17:26:43 +02001.. SPDX-License-Identifier: GPL-2.0+:
2
3.. index::
4 single: tcpm (command)
5
6tcpm command
7============
8
9Synopsis
10--------
11
12::
13
14 tcpm dev [devnum]
15 tcpm info
16 tcpm list
17
18Description
19-----------
20
21The tcpm command is used to control USB-PD controllers, also known as TypeC Port Manager (TCPM).
22
23The 'tcpm dev' command shows or set current TCPM device.
24
25 devnum
26 device number to change
27
28The 'tcpm info' command displays the current state of the device
29
30The 'tcpm list' command displays the list available devices.
31
32Examples
33--------
34
35The 'tcpm info' command displays device's status:
36::
37
38 => tcpm info
39 Orientation: normal
40 PD Revision: rev3
41 Power Role: sink
42 Data Role: device
43 Voltage: 20.000 V
44 Current: 2.250 A
45
46The current device can be shown or set via 'tcpm dev' command:
47::
48
49 => tcpm dev
50 TCPM device is not set!
51 => tcpm dev 0
52 dev: 0 @ usb-typec@22
53 => tcpm dev
54 dev: 0 @ usb-typec@22
55
56The list of available devices can be shown via 'tcpm list' command:
57::
58
59 => tcpm list
60 | ID | Name | Parent name | Parent uclass @ seq
61 | 0 | usb-typec@22 | i2c@feac0000 | i2c @ 4 | status: 0
62
63Configuration
64-------------
65
66The tcpm command is only available if CONFIG_CMD_TCPM=y.