From 9e06e793bb953817a6f6b56da19970f04f09c84e Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Wed, 22 Jan 2020 14:59:33 -0700 Subject: hatch: Add board specific override for board_get_pd_port_location() Returns LEFT_BACK for port 0, and RIGHT_BACK for port 1. BUG=b:146506369 BRANCH=firmware-hatch-12672.B TEST=Verified in SSDT that the port-location property is correct Change-Id: Ib21119d8416b36dde242449bb4433e3250dfb130 Signed-off-by: Tim Wawrzynczak Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2016918 Reviewed-by: Paul Fagerburg --- baseboard/hatch/baseboard.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/baseboard/hatch/baseboard.c b/baseboard/hatch/baseboard.c index 7b0456ab8d..c1fb0e3939 100644 --- a/baseboard/hatch/baseboard.c +++ b/baseboard/hatch/baseboard.c @@ -16,6 +16,7 @@ #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" #include "driver/tcpm/tcpm.h" +#include "ec_commands.h" #include "espi.h" #include "gpio.h" #include "hooks.h" @@ -387,3 +388,15 @@ static void cbi_init(void) CPRINTS("Board ID: %d", board_id); } DECLARE_HOOK(HOOK_INIT, cbi_init, HOOK_PRIO_INIT_I2C + 1); + +__override enum ec_pd_port_location board_get_pd_port_location(int port) +{ + switch (port) { + case 0: + return EC_PD_PORT_LOCATION_LEFT_BACK; + case 1: + return EC_PD_PORT_LOCATION_RIGHT_BACK; + default: + return EC_PD_PORT_LOCATION_UNKNOWN; + } +} -- cgit v1.2.1