summaryrefslogtreecommitdiff
path: root/src/mainboard/intel
diff options
context:
space:
mode:
authorReka Norman <rekanorman@google.com>2021-12-09 12:09:27 +1100
committerFelix Held <felix-coreboot@felixheld.de>2021-12-23 14:33:28 +0000
commitd448f8ce0fe9955e7792f54cc278897152d53590 (patch)
tree90c3700fd8945569c7936a3f0649e6907997fae3 /src/mainboard/intel
parent9fe2ce802af0751b2df657e487631df8fb60ab9f (diff)
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>
Diffstat (limited to 'src/mainboard/intel')
-rw-r--r--src/mainboard/intel/adlrvp/variants/adlrvp_m_ext_ec/overridetree.cb8
-rw-r--r--src/mainboard/intel/adlrvp/variants/adlrvp_p_ext_ec/overridetree.cb12
-rw-r--r--src/mainboard/intel/adlrvp/variants/adlrvp_p_mchp/overridetree.cb8
-rw-r--r--src/mainboard/intel/shadowmountain/variants/baseboard/devicetree.cb8
-rw-r--r--src/mainboard/intel/tglrvp/variants/tglrvp_up3/devicetree.cb8
-rw-r--r--src/mainboard/intel/tglrvp/variants/tglrvp_up4/devicetree.cb8
6 files changed, 26 insertions, 26 deletions
diff --git a/src/mainboard/intel/adlrvp/variants/adlrvp_m_ext_ec/overridetree.cb b/src/mainboard/intel/adlrvp/variants/adlrvp_m_ext_ec/overridetree.cb
index 133a737f66..a3860c6f76 100644
--- a/src/mainboard/intel/adlrvp/variants/adlrvp_m_ext_ec/overridetree.cb
+++ b/src/mainboard/intel/adlrvp/variants/adlrvp_m_ext_ec/overridetree.cb
@@ -14,15 +14,15 @@ chip soc/intel/alderlake
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "1"
- register "usb3_port_number" = "1"
+ use usb2_port1 as usb2_port
+ use tcss_usb3_port1 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 0 alias conn0 on end
end
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "2"
- register "usb3_port_number" = "2"
+ use usb2_port2 as usb2_port
+ use tcss_usb3_port2 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 1 alias conn1 on end
diff --git a/src/mainboard/intel/adlrvp/variants/adlrvp_p_ext_ec/overridetree.cb b/src/mainboard/intel/adlrvp/variants/adlrvp_p_ext_ec/overridetree.cb
index e78d00fa7f..de5471cf65 100644
--- a/src/mainboard/intel/adlrvp/variants/adlrvp_p_ext_ec/overridetree.cb
+++ b/src/mainboard/intel/adlrvp/variants/adlrvp_p_ext_ec/overridetree.cb
@@ -34,22 +34,22 @@ chip soc/intel/alderlake
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "1"
- register "usb3_port_number" = "1"
+ use usb2_port1 as usb2_port
+ use tcss_usb3_port1 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 0 alias conn0 on end
end
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "2"
- register "usb3_port_number" = "2"
+ use usb2_port2 as usb2_port
+ use tcss_usb3_port2 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 1 alias conn1 on end
end
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "3"
- register "usb3_port_number" = "3"
+ use usb2_port3 as usb2_port
+ use tcss_usb3_port3 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 2 alias conn2 on end
diff --git a/src/mainboard/intel/adlrvp/variants/adlrvp_p_mchp/overridetree.cb b/src/mainboard/intel/adlrvp/variants/adlrvp_p_mchp/overridetree.cb
index a23db8c0f9..91073f7661 100644
--- a/src/mainboard/intel/adlrvp/variants/adlrvp_p_mchp/overridetree.cb
+++ b/src/mainboard/intel/adlrvp/variants/adlrvp_p_mchp/overridetree.cb
@@ -14,15 +14,15 @@ chip soc/intel/alderlake
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "1"
- register "usb3_port_number" = "1"
+ use usb2_port1 as usb2_port
+ use tcss_usb3_port1 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 0 alias conn0 on end
end
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "2"
- register "usb3_port_number" = "2"
+ use usb2_port2 as usb2_port
+ use tcss_usb3_port2 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 1 alias conn1 on end
diff --git a/src/mainboard/intel/shadowmountain/variants/baseboard/devicetree.cb b/src/mainboard/intel/shadowmountain/variants/baseboard/devicetree.cb
index 6cf83d2707..575739241e 100644
--- a/src/mainboard/intel/shadowmountain/variants/baseboard/devicetree.cb
+++ b/src/mainboard/intel/shadowmountain/variants/baseboard/devicetree.cb
@@ -279,15 +279,15 @@ chip soc/intel/alderlake
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "6"
- register "usb3_port_number" = "1"
+ use usb2_port6 as usb2_port
+ use tcss_usb3_port1 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 0 alias conn0 on end
end
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "4"
- register "usb3_port_number" = "2"
+ use usb2_port4 as usb2_port
+ use tcss_usb3_port2 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 1 alias conn1 on end
diff --git a/src/mainboard/intel/tglrvp/variants/tglrvp_up3/devicetree.cb b/src/mainboard/intel/tglrvp/variants/tglrvp_up3/devicetree.cb
index 47c4368a52..201983cc87 100644
--- a/src/mainboard/intel/tglrvp/variants/tglrvp_up3/devicetree.cb
+++ b/src/mainboard/intel/tglrvp/variants/tglrvp_up3/devicetree.cb
@@ -319,15 +319,15 @@ chip soc/intel/tigerlake
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "6"
- register "usb3_port_number" = "3"
+ use usb2_port6 as usb2_port
+ use tcss_usb3_port3 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 0 alias conn0 on end
end
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "7"
- register "usb3_port_number" = "4"
+ use usb2_port7 as usb2_port
+ use tcss_usb3_port4 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 1 alias conn1 on end
diff --git a/src/mainboard/intel/tglrvp/variants/tglrvp_up4/devicetree.cb b/src/mainboard/intel/tglrvp/variants/tglrvp_up4/devicetree.cb
index cd5493bc30..d76c0f530c 100644
--- a/src/mainboard/intel/tglrvp/variants/tglrvp_up4/devicetree.cb
+++ b/src/mainboard/intel/tglrvp/variants/tglrvp_up4/devicetree.cb
@@ -323,15 +323,15 @@ chip soc/intel/tigerlake
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "6"
- register "usb3_port_number" = "3"
+ use usb2_port6 as usb2_port
+ use tcss_usb3_port3 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 0 alias conn0 on end
end
chip drivers/intel/pmc_mux/conn
- register "usb2_port_number" = "5"
- register "usb3_port_number" = "2"
+ use usb2_port5 as usb2_port
+ use tcss_usb3_port2 as usb3_port
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
device generic 1 alias conn1 on end