diff options
-rw-r--r-- | board/dingdong/usb_pd_policy.c | 3 | ||||
-rw-r--r-- | board/hoho/board.c | 7 | ||||
-rw-r--r-- | board/hoho/usb_pd_policy.c | 3 | ||||
-rw-r--r-- | include/ec_commands.h | 3 |
4 files changed, 14 insertions, 2 deletions
diff --git a/board/dingdong/usb_pd_policy.c b/board/dingdong/usb_pd_policy.c index 2537a9a658..10f920b237 100644 --- a/board/dingdong/usb_pd_policy.c +++ b/board/dingdong/usb_pd_policy.c @@ -7,6 +7,7 @@ #include "board.h" #include "common.h" #include "console.h" +#include "ec_commands.h" #include "gpio.h" #include "hooks.h" #include "registers.h" @@ -195,6 +196,7 @@ static int svdm_enter_mode(int port, uint32_t *payload) (PD_VDO_OPOS(payload[0]) == OPOS_DP)) { alt_mode[PD_AMODE_DISPLAYPORT] = OPOS_DP; rv = 1; + pd_log_event(PD_EVENT_VIDEO_DP_MODE, 0, 1, NULL); } else if ((PD_VDO_VID(payload[0]) == USB_VID_GOOGLE) && (PD_VDO_OPOS(payload[0]) == OPOS_GFU)) { alt_mode[PD_AMODE_GOOGLE] = OPOS_GFU; @@ -225,6 +227,7 @@ static int svdm_exit_mode(int port, uint32_t *payload) if (PD_VDO_VID(payload[0]) == USB_SID_DISPLAYPORT) { gpio_set_level(GPIO_PD_SBU_ENABLE, 0); alt_mode[PD_AMODE_DISPLAYPORT] = 0; + pd_log_event(PD_EVENT_VIDEO_DP_MODE, 0, 0, NULL); } else if (PD_VDO_VID(payload[0]) == USB_VID_GOOGLE) { alt_mode[PD_AMODE_GOOGLE] = 0; } else { diff --git a/board/hoho/board.c b/board/hoho/board.c index 324f79b2ef..19f0cc2f7c 100644 --- a/board/hoho/board.c +++ b/board/hoho/board.c @@ -7,6 +7,7 @@ #include "adc.h" #include "adc_chip.h" #include "common.h" +#include "ec_commands.h" #include "ec_version.h" #include "gpio.h" #include "hooks.h" @@ -140,8 +141,12 @@ static void factory_validation_deferred(void) /* test mcdp via serial to validate function */ if (!mcdp_get_info(&info) && (MCDP_FAMILY(info.family) == 0xe) && - (MCDP_CHIPID(info.chipid) == 0x1)) + (MCDP_CHIPID(info.chipid) == 0x1)) { gpio_set_level(GPIO_MCDP_READY, 1); + pd_log_event(PD_EVENT_VIDEO_CODEC, + PD_LOG_PORT_SIZE(0, sizeof(info)), + 0, &info); + } mcdp_disable(); } diff --git a/board/hoho/usb_pd_policy.c b/board/hoho/usb_pd_policy.c index 2b589d144b..dc6eb7fc84 100644 --- a/board/hoho/usb_pd_policy.c +++ b/board/hoho/usb_pd_policy.c @@ -7,6 +7,7 @@ #include "board.h" #include "common.h" #include "console.h" +#include "ec_commands.h" #include "gpio.h" #include "hooks.h" #include "registers.h" @@ -194,6 +195,7 @@ static int svdm_enter_mode(int port, uint32_t *payload) (PD_VDO_OPOS(payload[0]) == OPOS_DP)) { alt_mode[PD_AMODE_DISPLAYPORT] = OPOS_DP; rv = 1; + pd_log_event(PD_EVENT_VIDEO_DP_MODE, 0, 1, NULL); } else if ((PD_VDO_VID(payload[0]) == USB_VID_GOOGLE) && (PD_VDO_OPOS(payload[0]) == OPOS_GFU)) { alt_mode[PD_AMODE_GOOGLE] = OPOS_GFU; @@ -224,6 +226,7 @@ static int svdm_exit_mode(int port, uint32_t *payload) if (PD_VDO_VID(payload[0]) == USB_SID_DISPLAYPORT) { gpio_set_level(GPIO_PD_SBU_ENABLE, 0); alt_mode[PD_AMODE_DISPLAYPORT] = 0; + pd_log_event(PD_EVENT_VIDEO_DP_MODE, 0, 0, NULL); } else if (PD_VDO_VID(payload[0]) == USB_VID_GOOGLE) { alt_mode[PD_AMODE_GOOGLE] = 0; } else { diff --git a/include/ec_commands.h b/include/ec_commands.h index 58a698fb8d..ce10f80b85 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2886,12 +2886,13 @@ struct ec_response_pd_log { #define PD_EVENT_ACC_BASE 0x20 #define PD_EVENT_ACC_RW_FAIL (PD_EVENT_ACC_BASE+0) #define PD_EVENT_ACC_RW_ERASE (PD_EVENT_ACC_BASE+1) -#define PD_EVENT_ACC_GFU_ENTER (PD_EVENT_ACC_BASE+2) /* PD power supply events */ #define PD_EVENT_PS_BASE 0x40 #define PD_EVENT_PS_FAULT (PD_EVENT_PS_BASE+0) /* PD video dongles events */ #define PD_EVENT_VIDEO_BASE 0x60 +#define PD_EVENT_VIDEO_DP_MODE (PD_EVENT_VIDEO_BASE+0) +#define PD_EVENT_VIDEO_CODEC (PD_EVENT_VIDEO_BASE+1) /* Returned in the "type" field, when there is no entry available */ #define PD_EVENT_NO_ENTRY 0xFF |