Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38618 )
Change subject: mb/google/hatch: Override board_get_usb_typec_port_paths on Kohaku ......................................................................
mb/google/hatch: Override board_get_usb_typec_port_paths on Kohaku
Override board_get_usb_typec_port_paths on Kohaku so that the SSDT generator for the EC can add references to the USB port objects in the _DSD for each connector object.
BUG=b:146506369 BRANCH=none TEST=Disassemble SSDT and verify
Change-Id: Ide244ac47c439b8fae90cc842c0805cd17640556 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/mainboard/google/hatch/variants/kohaku/ramstage.c 1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/38618/1
diff --git a/src/mainboard/google/hatch/variants/kohaku/ramstage.c b/src/mainboard/google/hatch/variants/kohaku/ramstage.c index 9b919fc..9cd0f7e 100644 --- a/src/mainboard/google/hatch/variants/kohaku/ramstage.c +++ b/src/mainboard/google/hatch/variants/kohaku/ramstage.c @@ -17,6 +17,7 @@ #include <gpio.h> #include <baseboard/variants.h> #include <soc/gpio.h> +#include <ec/google/chromeec/ec.h>
void variant_ramstage_init(void) { @@ -30,3 +31,26 @@ mdelay(1); gpio_output(GPP_A12, 1); } + +static struct device_path usb_port_paths[][2] = +{ + { + {.type=DEVICE_PATH_USB, {.usb={ .port_type = 2, .port_id = 0 }}}, + {.type=DEVICE_PATH_USB, {.usb={ .port_type = 3, .port_id = 0 }}}, + }, + { + {.type=DEVICE_PATH_USB, {.usb={ .port_type = 2, .port_id = 1 }}}, + {.type=DEVICE_PATH_USB, {.usb={ .port_type = 3, .port_id = 1 }}}, + } +}; + +struct device_path *board_get_usb_typec_port_paths(int port, int *devices) +{ + if (port < 0 || port > 1) + return NULL; + + /* 2 devices for each port */ + *devices = 2; + + return usb_port_paths[port]; +}