From 862d00cf9994809711853c1f5261f7b9906ba149 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Mon, 5 Nov 2018 15:20:45 -0800 Subject: sn5s330: Add VCONN overcurrent logging. The TI SN5S330 has VCONN overcurrent protection and will automatically latch off VCONN if a port overcurrents it. Keeping VCONN latched off is allowed per the USB Type-C spec. This commit simply logs a message on the EC console such that it will be easier to tell when it happens. BUG=none BRANCH=firmware-nocturne-10984.B TEST=flash nocturne, plug in a Type-C adapter which overcurrents VCONN, verify that a console message indicating the overcurrent event is shown. Change-Id: I22da6e8d43ac7739dc213d5a1f049b98d7ee829d Signed-off-by: Aseda Aboagye Reviewed-on: https://chromium-review.googlesource.com/c/1328321 Reviewed-by: Jett Rink Commit-Queue: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-on: https://chromium-review.googlesource.com/1330162 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: Edward Hill Reviewed-by: Aseda Aboagye --- driver/ppc/sn5s330.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'driver/ppc/sn5s330.h') diff --git a/driver/ppc/sn5s330.h b/driver/ppc/sn5s330.h index 039fbe68e4..c5b16ea73b 100644 --- a/driver/ppc/sn5s330.h +++ b/driver/ppc/sn5s330.h @@ -135,6 +135,14 @@ enum sn5s330_pp_idx { */ #define SN5S330_ILIM_PP1_MASK (1 << 4) +/* + * INT_MASK_RISE/FALL_EDGE2 + * + * The VCONN_ILIM bit indicates an overcurrent condition on VCONN. By default, + * VCONN will be latched off. + */ +#define SN5S330_VCONN_ILIM (1 << 1) + /* * INT_MASK_RISE/FALL_EDGE_3 * -- cgit v1.2.1