Commit Graph

8 Commits

Author SHA1 Message Date
Martin Roth
897ce78bdd Fix various misspellings in comments
No functional changes.

BUG=none
BRANCH=none
TEST=make buildall passes

Change-Id: Ie852feb8e3951975d99dce5a49c17f5f0e8bc791
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/403417
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-11-15 17:41:53 -08:00
Aseda Aboagye
2d26ba2d24 common: pd_log: Add PD log to .bss.slow.
BUG=chrome-os-partner:46056
BUG=chrome-os-partner:46063
BRANCH=None
TEST=Enable CONFIG_REPLACE_LOADER_WITH_BSS_SLOW on GLaDOS.  Build,
flash, and verify that AP and EC boot.  Plug in a charger on both ports
and use ectool to view the PD log.
TEST=make -j buildall tests

CQ-DEPEND=CL:311209

Change-Id: I54ae617e03c645d24319d83da6cc8b7d1d6528a3
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/311413
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
2015-11-08 10:07:38 -08:00
Alec Berg
5b5f737d8f pd: move non-phy layer config out of usb_pd_config.h
Move parts of usb_pd_config.h that are not part of the phy layer
out of usb_pd_config.h and into board.h. This cleans up the
division between the TCPC and TCPM as only the TCPC needs to
use usb_pd_config.h.

Also cleans up the use of the CC detection voltage thresholds
by creating standard macros to use based on Rp strength for the
board.

BUG=none
BRANCH=none
TEST=make -j buildall

Change-Id: I946cceb38bea8233095b8a4b287102bb8a3a296d
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/270337
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2015-05-27 02:39:41 +00:00
Shawn Nematbakhsh
96536de3f4 pd_log: Add command to request PD MCU to write a log
When we find that charging is in a wedged state, we may wish to write a
PD log entry, but the PD MCU cannot detect such a state on its own.
Therefore, add a new command to ask the PD MCU to write a log of a given
type, and add a new board-specific custom log event.

BUG=chrome-os-partner:36668
TEST=Manual on samus:
./ectool --dev=1 pdwritelog charge 0
./ectool --dev=1 pdwritelog charge 1
./ectool --dev=1 pdwritelog 1 0
./ectool --dev=1 pdwritelog 2 0
./ectool --dev=1 pdlog
Verify log output matches expectation:
2015-02-12 11:12:49.290 P0 SRC
2015-02-12 11:12:49.296 P1 SNK Charger PD 20286mV max 20000mV / 3000mA
2015-02-12 11:12:49.303 P0 New connection
2015-02-12 11:12:49.310 P0 Board-custom event
--- END OF LOG --
Also, verify kernel logging of wedged event:
[  181.378420] PDLOG 2015/02/12 19:13:44.019 P0 Event 02 (0000) []
Also, trigger wedged state on Samus and verify log entry is written.
BRANCH=Samus
Change-Id: I55c7c839cf8300fcd3931dccdaaf16c1065e31a8
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/248981
Reviewed-by: Alec Berg <alecaberg@chromium.org>
2015-02-12 23:08:45 +00:00
Todd Broch
db3f86ed0b pd: Fix reverse of log size & port params
BRANCH=samus
BUG=chrome-os-partner:35935
TEST=manual, port & size params are no longer reversed when running
ectool --name cros_pd pdlog

Change-Id: I83e5ad92c260ff71330b7b5c69b30cf3b7e81a98
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/243373
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2015-01-28 11:14:02 +00:00
Vincent Palatin
6f4af26809 pd: poll PD events only on Google accessories
Poll USB PD accessories for event log entries only after we have
performed a Discover Identity and identified them as a Google device
(USB VID = 0x18d1) in order to avoid confusing third party devices with
our logging VDM.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=samus
BUG=chrome-os-partner:35858
TEST=connect Zinger to Samus and see the proper PD log entries.

Change-Id: I022fa0d19dc012e46a27b786a724ff251280eeaf
Reviewed-on: https://chromium-review.googlesource.com/242871
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
2015-01-24 00:32:33 +00:00
Vincent Palatin
b13063c247 pd: retrieve logs from accessories
Send the VDO_CMD_GET_LOG VDM to accessories to get their PD event log
and append it to the PD MCU log.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=samus
BUG=chrome-os-partner:33248 chrome-os-partner:32785
TEST=ectool --name=cros_pd pdlog

Change-Id: Ib52d1e2cae5f77dcec6d0489eaa49527388b02b6
Reviewed-on: https://chromium-review.googlesource.com/242013
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Alec Berg <alecaberg@chromium.org>
2015-01-21 06:44:33 +00:00
Vincent Palatin
4e75e20f4e Add PD events logging
Add a FIFO to log important events on the PD MCU and coming from the PD
accessories.

The retrieval of the accessories log from the accessories by the PD MCU
is not implemented yet.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=samus
BUG=chrome-os-partner:32785
TEST=execute "ectool --name=cros_pd pdlog"
before and after plugging Zinger charger.

Change-Id: If96d73e711ff6ad64cfb99bd3e4d2d8f2643f19a
Reviewed-on: https://chromium-review.googlesource.com/238854
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
2015-01-15 01:07:02 +00:00