Prashant Malani has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40424 )
Change subject: ec/google/chromeec: Add support for USB Type-C alternate mode control ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40424/1/src/ec/google/chromeec/acpi... File src/ec/google/chromeec/acpi/cros_ec.asl:
https://review.coreboot.org/c/coreboot/+/40424/1/src/ec/google/chromeec/acpi... PS1, Line 74: Package https://review.coreboot.org/c/coreboot/+/40425/1/src/mainboard/google/voltee... adds these objects.
I would think this cros_ec file should be made board specific, and should only include the switch definitions? These will then get combined with the dynamically generated connector nodes?
So, something like:
Device (USBC) { Name (_HID, "GOOG0014") Name (_DDN, "ChromeOS Embedded Controller USB Type-C Control")
/* * Each connector shall have its own ACPI device entry * (node), under the actual interface device. */ Device (CON0) { Name (_ADR, 0) Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package() { Package () { "usb-role-switch", _SB.PCI0.PMC.MUX.CON0 }, Package () { "mode-switch", _SB.PCI0.PMC.MUX.CON0 }, Package () { "orientation-switch", _SB.PCI0.PMC.MUX.CON0 }, } }) }
Device (CON1) { Name (_ADR, 1) Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package() { Package () { "usb-role-switch", _SB.PCI0.PMC.MUX.CON1 }, Package () { "mode-switch", _SB.PCI0.PMC.MUX.CON1 }, Package () { "orientation-switch", _SB.PCI0.PMC.MUX.CON1 }, }, })
} }
Not sure how dynamically generated + statically defined ASL is handled in the kernel, so my apologies if the above is incorrect.
Of course, the above is just a proposal for an interim solution. Eventually, all the properties should be dynamically generated.