summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/tcpm/ps8xxx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c
index 3bc85f48e8..4643c669c0 100644
--- a/driver/tcpm/ps8xxx.c
+++ b/driver/tcpm/ps8xxx.c
@@ -560,6 +560,9 @@ static int ps8805_make_device_id(int port, int *id)
* identify the chip as A1.
*
* See b/159289062.
+ *
+ * The ps8815 A2 reports device ID 0x0001 instead of 0x0003 when the
+ * firmware is bad (mis-programmed).
*/
static int ps8815_make_device_id(int port, int *id)
{
@@ -574,6 +577,7 @@ static int ps8815_make_device_id(int port, int *id)
&val);
if (status != EC_SUCCESS)
return status;
+
switch (val) {
case 0x0a00:
*id = 1;
@@ -581,6 +585,9 @@ static int ps8815_make_device_id(int port, int *id)
case 0x0a01:
*id = 2;
break;
+ case 0x0a02:
+ *id = 3;
+ break;
default:
return EC_ERROR_UNKNOWN;
}