mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 10:45:22 +00:00
pd: Log events for dingdong & hoho
Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus BUG=chrome-os-partner:35935 TEST=manual, see new events for dingdong & hoho. Note must be in GFU mode to facilitate. Change-Id: I1b79237512748796cf98765a553af8c9978cb594 Reviewed-on: https://chromium-review.googlesource.com/243374 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
db3f86ed0b
commit
54aa5e16d0
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user