diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-02-28 15:33:00 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-07 14:15:56 -0800 |
commit | ad089de4b0430e5d997b9f6d6f187daae1fb11dc (patch) | |
tree | bf6668423a37f7beba6f9c1b24765385cc6e6135 /board/plankton/board.h | |
parent | 5b8b06e976623ad52a1c4c558dfdac8b1c9d3dc7 (diff) | |
download | chrome-ec-ad089de4b0430e5d997b9f6d6f187daae1fb11dc.tar.gz |
pdcontrol: Suspend port individually
pdcontrol suspend command will be used to prevent tcpm from putting
the chip into sleep while firmware update is taking place. Currently
the command suspends or resumes port 0. This patch makes the command
apply to ports individually.
pd enable console command now takes a port number:
pd <port> enable/disable.
This patch also replaces CONFIG_USB_PD_COMM_ENABLED with _DISABLED.
When it's defined, PD communication is disabled at startup.
Plankton undefines CONFIG_USB_PD_COMM_ENABLED enable, intending to
disable PD communication at startup. Therefore, this patch defines
CONFIG_USB_PD_COMM_DISABLED in its board.h.
BUG=b:35586859
BRANCH=none
TEST=From AP console:
localhost # /tmp/ectool pdcontrol suspend 1
[600.188013 TCPC p1 suspended!]
> pd 1 state
Port C1 CC1, Dis - Role: SNK-UFP State: SUSPENDED, Flags: 0x0020
localhost # /tmp/ectool pdcontrol resume 1
[678.516613 TCPC p1 resumed!]
> pd 1 state
Port C1 CC1, Ena - Role: SNK-UFP State: DRP_AUTO_TOGGLE, Flags: 0x0020
From ec console:
> pd 1 disable
Port C1 disable
> pd 1 state
Port C1 CC1, Dis - Role: SNK-UFP State: DRP_AUTO_TOGGLE, Flags: 0x0020
> pd 1 enable
Port C1 enabled
> pd 1 state
Port C1 CC1, Ena - Role: SNK-UFP State: DRP_AUTO_TOGGLE, Flags: 0x0020
Change-Id: Ia0cc4904ac52adc4b89de20918968c8df78b9c80
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/447968
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/plankton/board.h')
-rw-r--r-- | board/plankton/board.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/plankton/board.h b/board/plankton/board.h index 994fb98c76..590c6ef7f3 100644 --- a/board/plankton/board.h +++ b/board/plankton/board.h @@ -19,7 +19,7 @@ #define CONFIG_STM_HWTIMER32 #define CONFIG_USB_POWER_DELIVERY #define CONFIG_USB_PD_ALT_MODE -#undef CONFIG_USB_PD_COMM_ENABLED +#define CONFIG_USB_PD_COMM_DISABLED #define CONFIG_USB_PD_CUSTOM_VDM #define CONFIG_USB_PD_DUAL_ROLE #define CONFIG_USB_PD_DYNAMIC_SRC_CAP |