Attention is currently required from: Alexander Couzens, Patrick Rudolph.
Keith Hui has posted comments on this change by Keith Hui. ( https://review.coreboot.org/c/coreboot/+/81880?usp=email )
Change subject: mb/*: Add consolidated USB port config for SNB+MRC boards ......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/81880/comment/5e5d1f66_40a2bb38?usp... : PS2, Line 13: runtime
I'd prefer runtime mappings. […]
I have this figured out mostly:
Desktop: 0x40/0x80 -> 1/2 Mobile: 0x40/0x80 -> 0/1 I've added MRC-side code to translate from native values. Where the PCH SKU is known, I just put the native value in directly. It's the Google boards that someone else needs to confirm. For them I kept the special H/L enums.
Then again, one other thing we can actually do is to save the lower 16 bits of USBIRx values directly in the devicetree. (I have plans to shrink the current portmap struct down from current 3 dwords per port.) A bit of runtime code saves us the trouble from messing with lookup tables:
if (current > ARRAY_SIZE(currents)) { current = 0x20000000 | current; } else { current = currents[portmap[i].current]; } RCBA32(USBIR0+4*i) = current;
Heh heh heh.