summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/mcdp28x0.h2
-rw-r--r--util/ectool.c15
2 files changed, 15 insertions, 2 deletions
diff --git a/driver/mcdp28x0.h b/driver/mcdp28x0.h
index c753816495..3a6ead9bfb 100644
--- a/driver/mcdp28x0.h
+++ b/driver/mcdp28x0.h
@@ -8,8 +8,6 @@
#ifndef MCDP28X0_H
#define MCDP28X0_H
-#include <util.h>
-
#define MCDP_OUTBUF_MAX 16
#define MCDP_INBUF_MAX 16
diff --git a/util/ectool.c b/util/ectool.c
index cb7e7e904e..1e46e2de8f 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -17,6 +17,7 @@
#include "battery.h"
#include "comm-host.h"
#include "compile_time_macros.h"
+#include "driver/mcdp28x0.h"
#include "ec_flash.h"
#include "ectool.h"
#include "lightbar.h"
@@ -5424,6 +5425,7 @@ int cmd_pd_log(int argc, char *argv[])
struct ec_response_pd_log r;
uint32_t words[8]; /* space for the payload */
} u;
+ struct mcdp_info minfo;
struct ec_response_usb_pd_power_info pinfo;
int rv;
unsigned long long milliseconds;
@@ -5477,6 +5479,19 @@ int cmd_pd_log(int argc, char *argv[])
const char *fault = u.r.data < ARRAY_SIZE(fault_names) ?
fault_names[u.r.data] : "???";
printf("Power supply fault: %s\n", fault);
+ } else if (u.r.type == PD_EVENT_VIDEO_DP_MODE) {
+ printf("DP mode %sabled\n", (u.r.data == 1) ?
+ "en" : "dis");
+ } else if (u.r.type == PD_EVENT_VIDEO_CODEC) {
+ memcpy(&minfo, u.r.payload,
+ sizeof(struct mcdp_info));
+ printf("HDMI info: family:%04x chipid:%04x "
+ "irom:%d.%d.%d fw:%d.%d.%d\n",
+ MCDP_FAMILY(minfo.family),
+ MCDP_CHIPID(minfo.chipid),
+ minfo.irom.major, minfo.irom.minor,
+ minfo.irom.build, minfo.fw.major,
+ minfo.fw.minor, minfo.fw.build);
} else { /* Unknown type */
int i;
printf("Event %02x (%04x) [", u.r.type, u.r.data);