coreboot-kgpe-d16/src/mainboard/system76
Reka Norman d448f8ce0f drivers/intel/pmc_mux/conn: Change usb{23}_port_number fields to device pointers
Currently, the pmc_mux/conn driver uses integer fields to store the
USB-2 and USB-3 port numbers from the SoC's point of view. Specifying
these as integers in the devicetree is error-prone, and this
information can instead be represented using pointers to the USB-2 and
USB-3 devices. The port numbers can then be obtained from the paths of
the linked devices, i.e. dev->path.usb.port_id.

Modify the driver to store device pointers instead of integer port
numbers, and update all devicetrees using the driver. These are the
mainboards affected (all are Intel TGL or ADL based):
google/brya
google/volteer
intel/adlrvp
intel/shadowmountain
intel/tglrvp
system76/darp7
system76/galp5
system76/lemp10

Command used to update the devicetrees:
git grep -l "usb._port_number" src/mainboard/ | \
  xargs sed -i \
  -e 's/register "usb2_port_number" = "\(.*\)"/use usb2_port\1 as usb2_port/g' \
  -e 's/register "usb3_port_number" = "\(.*\)"/use tcss_usb3_port\1 as usb3_port/g'

BUG=b:208502191
TEST=Build test all affected boards. On brya0, boot device and check
that the ACPI tables generated with and without the change are the same.

Change-Id: I5045b8ea57e8ca6f9ebd7d68a19486736b7e2809
Signed-off-by: Reka Norman <rekanorman@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60143
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-23 14:33:28 +00:00
..
addw1 mb/system76/*: Enable dGPU temp/fan reporting 2021-11-23 09:22:42 +00:00
bonw14 mb/system76/*: Enable dGPU temp/fan reporting 2021-11-23 09:22:42 +00:00
cml-u mb/system76/*: Disable IME by CMOS option 2021-11-23 09:22:10 +00:00
darp7 drivers/intel/pmc_mux/conn: Change usb{23}_port_number fields to device pointers 2021-12-23 14:33:28 +00:00
galp5 drivers/intel/pmc_mux/conn: Change usb{23}_port_number fields to device pointers 2021-12-23 14:33:28 +00:00
gaze15 mb/system76/*: Enable dGPU temp/fan reporting 2021-11-23 09:22:42 +00:00
gaze16 soc/intel/tigerlake: Hook up DPTF device to devicetree 2021-12-09 22:00:23 +00:00
kbl-u mb/system76/kbl-u: Add Galago Pro 2 as a variant 2021-11-02 20:31:12 +00:00
lemp9 mainboard: Fix comment about early GPIOs 2021-12-19 22:52:13 +00:00
lemp10 drivers/intel/pmc_mux/conn: Change usb{23}_port_number fields to device pointers 2021-12-23 14:33:28 +00:00
oryp5 mb/system76/*: Enable dGPU temp/fan reporting 2021-11-23 09:22:42 +00:00
oryp6 mb/system76/*: Enable dGPU temp/fan reporting 2021-11-23 09:22:42 +00:00
oryp8 soc/intel/tigerlake: Hook up DPTF device to devicetree 2021-12-09 22:00:23 +00:00
whl-u mb/system76/*: Disable IME by CMOS option 2021-11-23 09:22:10 +00:00
Kconfig
Kconfig.name