Attention is currently required from: John Zhao, Duncan Laurie. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/52712 )
Change subject: drivers/intel/usb4: Update driver to support Retimer firmware upgrade ......................................................................
Patch Set 3:
(14 comments)
Patchset:
PS3: Thanks for your patience John!!
FYI, shadowmountain also uses `power_gpio`
File src/drivers/intel/usb4/retimer/retimer.c:
https://review.coreboot.org/c/coreboot/+/52712/comment/25efb590_3b0ed4bb PS3, Line 27: usb4_retimer_iteration_num USB4_RETIMER_ITERATION_NUM
https://review.coreboot.org/c/coreboot/+/52712/comment/988b2237_6ca40348 PS3, Line 28: usb4_retimer_poll_cycle USB4_RETIMER_POLL_CYCLE_MS
https://review.coreboot.org/c/coreboot/+/52712/comment/9922b8fd_ec6f7011 PS3, Line 29: match suggestion: rename this to `expected_return_value` or similar
https://review.coreboot.org/c/coreboot/+/52712/comment/6d70eb67_245a1c4e PS3, Line 32: uint8_t nit: const
https://review.coreboot.org/c/coreboot/+/52712/comment/17182c50_ad3f47bd PS3, Line 38: acpigen_write_return_integer this takes a `uint64_t` as an arg, so it will write out as a QWORD of 0xFFFFFFFFFFFFFFFF, will the kernel reinterpret that OK?
https://review.coreboot.org/c/coreboot/+/52712/comment/3dc5dd73_100449e7 PS3, Line 98: match = USB_PD_MUX_NONE; : usb4_retimer_execute_ec_cmd(port, USB_RETIMER_FW_UPDATE_GET_MUX, match); : : /* : * Suspend PD : * Command: USB_RETIMER_FW_UPDATE_SUSPEND_PD : * Expect return value: 0 : */ : match = 0; : usb4_retimer_execute_ec_cmd(port, USB_RETIMER_FW_UPDATE_SUSPEND_PD, match); : : /* : * Set MUX USB Mode : * Command: USB_RETIMER_FW_UPDATE_SUSPEND_PD : * Expect return value: USB_PD_MUX_USB_ENABLED : */ : match = USB_PD_MUX_USB_ENABLED; : usb4_retimer_execute_ec_cmd(port, USB_RETIMER_FW_UPDATE_SET_USB, match); : : /* : * Set MUX Safe Mode : * Command: USB_RETIMER_FW_UPDATE_SET_SAFE : * Expect return value: USB_PD_MUX_SAFE_MODE : */ : match = USB_PD_MUX_SAFE_MODE; : usb4_retimer_execute_ec_cmd(port, USB_RETIMER_FW_UPDATE_SET_SAFE, match); : : /* : * Set MUX TBT Mode : * Command: USB_RETIMER_FW_UPDATE_SET_TBT : * Expect return value: USB_PD_MUX_USB4_ENABLED or USB_PD_MUX_TBT_COMPAT_ENABLED : */ : match = USB_PD_MUX_USB4_ENABLED; : usb4_retimer_execute_ec_cmd(port, USB_RETIMER_FW_UPDATE_SET_TBT, match); : } chrome EC can handle these commands to RFWU ?
https://review.coreboot.org/c/coreboot/+/52712/comment/71ef5bed_f36df6c6 PS3, Line 141: Resuem Resume
https://review.coreboot.org/c/coreboot/+/52712/comment/6bf89977_f17dce9c PS3, Line 171: poewr power
https://review.coreboot.org/c/coreboot/+/52712/comment/ba60c07b_b5111d77 PS3, Line 200: snprintf(pwr, sizeof(pwr), "HR.DFP%d%c%s", port, '.', "PWR"); suggestion: `snprintf(pwr, sizeof(pwr), "HR.DFP%1d.PWR", port);`
https://review.coreboot.org/c/coreboot/+/52712/comment/fdd74458_086438b2 PS3, Line 230: snprintf(pwr, sizeof(pwr), "HR.DFP%d%c%s", port, '.', "PWR"); snprintf(pwr, sizeof(pwr), "HR.DFP%1d.PWR", port);
https://review.coreboot.org/c/coreboot/+/52712/comment/1b080100_6c46ce35 PS3, Line 322: LOCAL1_OP nit: start with LOCAL0_OP
https://review.coreboot.org/c/coreboot/+/52712/comment/89049987_1cde839a PS3, Line 353: 0xf ACPI_STATUS_DEVICE_ALL_ON
https://review.coreboot.org/c/coreboot/+/52712/comment/ff580224_5cce2686 PS3, Line 363: UPC_TYPE_PROPRIETARY why PROPRIETARY?