Attention is currently required from: Reka Norman, Jeremy Soller, Paul Menzel, Nick Vaccaro, Angel Pons, Patrick Rudolph. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/60143 )
Change subject: drivers/intel/pmc_mux/conn: Change usb{23}_port_number fields to device pointers ......................................................................
Patch Set 4: Code-Review+1
(1 comment)
File src/drivers/intel/pmc_mux/conn/conn.c:
https://review.coreboot.org/c/coreboot/+/60143/comment/de7fb111_1f9ebaad PS2, Line 60: path.usb.port_id + 1
I'm not sure why the numbering is the way it is currently... but the PMC/kernel expects 1-based port numbers,
About everything expects that. It's USB standard AFAICT.
whereas in coreboot we usually treat them as 0-based, hence the `+ 1`.
Not generally. Only when it comes to the devicetree. And there, it should be always the same, not usually ;)
I wouldn't say they're "wrong" it's just the consumer of them expects a different numbering system than we use.
Maybe not wrong, but this seems error-prone: `device usb 2.0 alias usb2_port1 off end`
Although taking another look at how they're used via a quick `git grep '->path.usb.port_id`, it appears they are mostly used for the ACPI device names, and only in a few other places, so maybe it would make sense to change them
Only place I could find where we don't add 1 and the number seems to matter is Intel's USB4 retimer driver, retimer_get_index_for_typec().
but I think that's for another CL.
Of course, I just noticed this here. Marking as resolved to avoid confusion, hopefully Angel doesn't mind.