coreboot-kgpe-d16/src/drivers
Maulik V Vaghela 0f7e086229 drivers/intel/usb4/retimer: Update code to assign correct port number
Since TBT controller can have maximum 2 ports per controller, our
code will loop over DFP structure twice and determine port number.

Retimer driver used to assign port number as below:
1. Check if power GPIO is assigned for particular DFP entry or not
2. If entry is there, assign loop count as port number

Since loop count is 2, retimer will never assign port number = 2
even if it's present. In case of more than 1 controller, port number
assigned will still be 0 or 1 even though actual port index might
be 2 or 3. This will create an issue where even if you do transaction
on device on controller 2 (port index 2 or 3), EC will route it on
port 0 or 1 due to incorrect port index.

Update the driver flow as per below to handle this scenario:
1. Check if power GPIO is assigned for particular DFP entry or not
2. Get USB port number from config since it's stored in usb port
   information under devicetree
3. Pass the port number to ACPI SSDT and EC code

Above changes will ensure that we're assigning correct port
number as per calculation and EC will use correct port index.

BUG=b:189476816
BRANCH=None
TEST=Checked that retimer firmware update works on both ports and update
happens on correct port index.

Change-Id: Ib11637ae39046e0afdacd33bc34e8a59e6f2bfb1
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55945
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-07-12 07:29:32 +00:00
..
acpi/thermal_zone drivers/acpi: Add a chip driver to generate thermal zone 2021-05-20 08:01:11 +00:00
amd nb/amd/pi/00630F01: Remove unused directory and code 2021-05-27 11:48:19 +00:00
ams treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
analogix/anx7625 drivers/analogix: Increase the clock tolerance from 0.1% to 2% 2021-03-27 10:02:18 +00:00
asmedia src: Remove leading blank lines from SPDX header 2020-05-18 07:00:27 +00:00
aspeed drivers/aspeed: Fix some issues 2021-02-03 08:53:10 +00:00
broadcom src: Remove leading blank lines from SPDX header 2020-05-18 07:00:27 +00:00
camera drivers/camera: Add config CHROMEOS_CAMERA 2020-10-19 06:50:20 +00:00
crb drivers/crb/tpm: Fix compilation on x86_64 2020-12-10 07:25:23 +00:00
elog SMBIOS: Introduce smbios_full_table_len function 2021-07-01 07:38:00 +00:00
emulation/qemu drivers: Replace set_vbe_mode_info_valid 2020-12-17 06:21:56 +00:00
generic arch/x86/ioapic: Drop irq_on_fsb as a configurable item 2021-06-16 19:54:49 +00:00
genesyslogic drivers/genesyslogic/gl9755: Disable debug mode to enable circuit protections 2021-05-05 11:45:06 +00:00
gfx/generic src/drivers: Remove unused <console/console.h> 2021-02-15 10:48:39 +00:00
gic treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
i2c drivers/i2c/designware: Report I2C timings for additional bus speeds 2021-06-04 12:39:06 +00:00
intel drivers/intel/usb4/retimer: Update code to assign correct port number 2021-07-12 07:29:32 +00:00
ipmi src/drivers/ipmi: Add DEBUG_IPMI option 2021-04-18 20:37:10 +00:00
lenovo src: Retype option API to use unsigned integers 2021-05-06 14:48:15 +00:00
maxim drivers/maxim/max77686/max77686.h: Remove repeated word 2021-01-18 07:39:21 +00:00
mrc_cache drivers/mrc_cache: Avoid sizeof on struct type 2021-07-01 07:26:33 +00:00
net cbfs: Replace more instances of cbfs_boot_locate() with newer APIs 2021-03-17 08:10:20 +00:00
ocp/dmi drivers/ocp/dmi/Kconfig: Set FRU_DEVICE_ID depend on OCP_DMI 2021-01-18 07:50:46 +00:00
parade src: Remove leading blank lines from SPDX header 2020-05-18 07:00:27 +00:00
pc80 drivers/pc80/mc146818rtc: Check date and time for sanity 2021-05-30 20:28:14 +00:00
pcie/rtd3/device drivers/pcie/rtd3/device: Add PCIe RTD3 driver 2021-06-07 11:35:47 +00:00
ricoh/rce822 treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
secunet/dmi treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
siemens/nc_fpga src: Remove leading blank lines from SPDX header 2020-05-18 07:00:27 +00:00
sil/3114 treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
smmstore drivers/smmstore: Enable SMMSTORE V2 by default for Tianocore UEFIPAYLOAD 2021-06-07 05:06:23 +00:00
soundwire drivers/soundwire/alc1308 : Add ALC1308 soundwire device 2021-02-27 09:41:42 +00:00
spi drivers/spi: Add winbond chip details 2021-06-11 07:33:33 +00:00
ti trogdor: Add backlight support for sn65dsi86bridge for Homestar 2021-05-08 00:13:13 +00:00
tpm Apply more uses for Kconfig TPM 2021-05-30 20:14:47 +00:00
uart lib/trace: Remove TRACE support 2020-12-02 23:35:58 +00:00
usb drivers/usb/acpi: Create function to get PLD information 2021-07-12 07:29:24 +00:00
vpd commonlib/region: Turn addrspace_32bit into a more official API 2021-04-21 02:06:26 +00:00
wifi/generic SMBIOS: Drop now-unnecessary unions 2021-07-01 07:38:32 +00:00