Skip to content

Commit 019baec

Browse files
Sean-StarLabsjackpot51
authored andcommitted
soc/intel/alderlake: Set UsbTcPortEn based on tcss_port[x]
UsbTcPortEn is configured based on pointers to tcss_usb3_port1, which is part of the ACPI driver. This is illogical, as the port might need to be enabled, and the ACPI not needed or included. Change this so it's configured based on the tcss_port[x] in devicetree. Tested by connecting a USB 3.0 hub, and checking that Linux correctly identifies a new USB 3.0 device. Change-Id: I07ef0759057f7f40210766a73643c9ccf1dc986d Signed-off-by: Sean Rhodes <sean@starlabs.systems>
1 parent 792996f commit 019baec

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

src/soc/intel/alderlake/fsp_params.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -652,13 +652,6 @@ WEAK_DEV_PTR(tcss_usb3_port4);
652652
static void fill_fsps_tcss_params(FSP_S_CONFIG *s_cfg,
653653
const struct soc_intel_alderlake_config *config)
654654
{
655-
const struct device *tcss_port_arr[] = {
656-
DEV_PTR(tcss_usb3_port1),
657-
DEV_PTR(tcss_usb3_port2),
658-
DEV_PTR(tcss_usb3_port3),
659-
DEV_PTR(tcss_usb3_port4),
660-
};
661-
662655
s_cfg->TcssAuxOri = config->tcss_aux_ori;
663656

664657
/* Explicitly clear this field to avoid using defaults */
@@ -676,8 +669,8 @@ static void fill_fsps_tcss_params(FSP_S_CONFIG *s_cfg,
676669
s_cfg->D3ColdEnable = CONFIG(D3COLD_SUPPORT);
677670

678671
s_cfg->UsbTcPortEn = 0;
679-
for (int i = 0; i < MAX_TYPE_C_PORTS; i++) {
680-
if (is_dev_enabled(tcss_port_arr[i]))
672+
for (int i = 0; i < ARRAY_SIZE(config->tcss_ports); i++) {
673+
if (config->tcss_ports[i].enable)
681674
s_cfg->UsbTcPortEn |= BIT(i);
682675
}
683676

0 commit comments

Comments
 (0)