Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35456 )
Change subject: sconfig: Allow to link devices to other device' drivers ......................................................................
Patch Set 4:
I resurrected this change and added the missing features that were called out (order doesn't matter now, handle overrides, check for conflicts) because this solves a device reference problem for USB4 in a clean way and it has potential to be useful in many other situations.
With USB4 ports we need to provide a set of references to the OS (connection manager) that indicate the underlying devices where the various data streams that go to the port actually come from.
In this case the mainboard devicetree will have a number of aliases defined throughout the tree and a typec driver that collates them:
chip ec/google/chromeec/typec use typec_mlb_usb2 as usb2_port use typec_mlb_usb3 as usb3_port use typec_mlb_usb4 as usb4_port use typec_mlb_pcie as pcie_port use typec_mlb_mux as orientation_switch use typec_mlb_mux as usb_role_switch use typec_mlb_mux as mode_switch use typec_mlb_retimer as retimer0 device generic 1 on end end
And generates ACPI properties with the links:
Package () { "port-number", 1 }, Package () { "usb2-port", _SB.PCI0.XHCI.RHUB.HS10 }, Package () { "usb3-port", _SB.PCI0.TXHC.RHUB.SS02 }, Package () { "usb4-port", _SB.PCI0.TDM0.RHUB.PRTB }, Package () { "pcie-port", _SB.PCI0.TRP1 }, Package () { "orientation-switch", _SB.PCI0.PMC.MUX.CON1 }, Package () { "usb-role-switch", _SB.PCI0.PMC.MUX.CON1 }, Package () { "mode-switch", _SB.PCI0.PMC.MUX.CON1 } Package () { "retimers", Package () { _SB.PCI0.SBUS.RTM0 } },