diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/servo_v4p1/usb_pd_config.h | 1 | ||||
-rw-r--r-- | board/servo_v4p1/usb_pd_policy.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/board/servo_v4p1/usb_pd_config.h b/board/servo_v4p1/usb_pd_config.h index baf2914727..63fb6b5728 100644 --- a/board/servo_v4p1/usb_pd_config.h +++ b/board/servo_v4p1/usb_pd_config.h @@ -57,6 +57,7 @@ * Emulate Electronically Marked Cable Assembly * (EMCA) servo (or non-EMCA) */ +#define CC_FASTBOOT_DFP BIT(7) /* Allow mux uServo->Fastboot on DFP */ /* Servo v4 DP alt-mode configuration */ #define ALT_DP_ENABLE BIT(0) /* Enable DP alt-mode or not */ diff --git a/board/servo_v4p1/usb_pd_policy.c b/board/servo_v4p1/usb_pd_policy.c index 88e1a51b33..e24e9dc266 100644 --- a/board/servo_v4p1/usb_pd_policy.c +++ b/board/servo_v4p1/usb_pd_policy.c @@ -1456,6 +1456,20 @@ static int cmd_usbc_action(int argc, char *argv[]) return EC_ERROR_PARAM2; allow_pr_swap = !!atoi(argv[2]); + } else if (!strcasecmp(argv[1], "fastboot")) { + if (argc == 2) { + CPRINTF("fastboot = %d\n", + !!(cc_config & CC_FASTBOOT_DFP)); + return EC_SUCCESS; + } + + if (argc != 3) + return EC_ERROR_PARAM2; + + if (!!atoi(argv[2])) + cc_config |= CC_FASTBOOT_DFP; + else + cc_config &= ~CC_FASTBOOT_DFP; } else { return EC_ERROR_PARAM1; } |