Sebastian Reichel | 3dd2332 | 2024-10-15 17:26:43 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
| 3 | .. index:: |
| 4 | single: tcpm (command) |
| 5 | |
| 6 | tcpm command |
| 7 | ============ |
| 8 | |
| 9 | Synopsis |
| 10 | -------- |
| 11 | |
| 12 | :: |
| 13 | |
| 14 | tcpm dev [devnum] |
| 15 | tcpm info |
| 16 | tcpm list |
| 17 | |
| 18 | Description |
| 19 | ----------- |
| 20 | |
| 21 | The tcpm command is used to control USB-PD controllers, also known as TypeC Port Manager (TCPM). |
| 22 | |
| 23 | The 'tcpm dev' command shows or set current TCPM device. |
| 24 | |
| 25 | devnum |
| 26 | device number to change |
| 27 | |
| 28 | The 'tcpm info' command displays the current state of the device |
| 29 | |
| 30 | The 'tcpm list' command displays the list available devices. |
| 31 | |
| 32 | Examples |
| 33 | -------- |
| 34 | |
| 35 | The '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 | |
| 46 | The 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 | |
| 56 | The 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 | |
| 63 | Configuration |
| 64 | ------------- |
| 65 | |
| 66 | The tcpm command is only available if CONFIG_CMD_TCPM=y. |