diff --git a/drivers/usb/dwc3/dwc3-apple.c b/drivers/usb/dwc3/dwc3-apple.c index 7b1004854107a..500b0f85fb949 100644 --- a/drivers/usb/dwc3/dwc3-apple.c +++ b/drivers/usb/dwc3/dwc3-apple.c @@ -1081,12 +1081,13 @@ static void dwc3_apple_check_hub_later(struct dwc3_apple *appledwc) } /* - * Waiting for a Type-C PHY that is not started after sleep is specific to the J714s. - * The notifier work and its admission rules apply to every board. + * Waiting for a Type-C PHY that is not started after sleep is specific to the T6050 boards + * whose port controllers take the sleep's power states (J714s, J716c). The notifier work + * and its admission rules apply to every board. */ static bool dwc3_apple_sleep_board(void) { - return of_machine_is_compatible("apple,j714s"); + return of_machine_is_compatible("apple,j714s") || of_machine_is_compatible("apple,j716c"); } /* @@ -1470,7 +1471,8 @@ static int dwc3_apple_recover(struct dwc3_apple *appledwc) static bool dwc3_apple_tunnel_keep(struct dwc3_apple *appledwc) { lockdep_assert_held(&appledwc->lock); - if (appledwc->fixed_hub || !of_machine_is_compatible("apple,j714s") || + if (appledwc->fixed_hub || !(of_machine_is_compatible("apple,j714s") || + of_machine_is_compatible("apple,j716c")) || !of_device_is_compatible(appledwc->dev->of_node, "apple,t6050-dwc3") || dwc3_apple_tunnel_phy(appledwc, APPLE_T6050_CIO_USB_KEEP)) return false; diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 9298672c02aa0..886f0fffb5cc9 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -353,12 +353,12 @@ static int tps6598x_disconnect(struct tps6598x *tps, u32 status) /* * The sleep's rules for the port controllers' system power state command (the controller is * woken first, the command's end is read at intervals, a failed S3 refuses the sleep, the - * command's limit and its lines) are in force on the board they have run on, the J714s. - * Elsewhere, other boards with the same SoC included, the command is as it was. + * command's limit and its lines) are in force on the T6050 boards that sleep, the J714s and + * the J716c. Elsewhere the command is as it was. */ static bool tipd_sleep_ssps_rules(void) { - return of_machine_is_compatible("apple,j714s"); + return of_machine_is_compatible("apple,j714s") || of_machine_is_compatible("apple,j716c"); } /* diff --git a/drivers/usb/typec/tipd/spmi.c b/drivers/usb/typec/tipd/spmi.c index 4428fdbc03b2a..4865a65d9792d 100644 --- a/drivers/usb/typec/tipd/spmi.c +++ b/drivers/usb/typec/tipd/spmi.c @@ -734,13 +734,18 @@ static bool sn201202x_sleep_event(struct tps6598x *tps) } /* - * On the J714s, the board the sleep has run on, the probe and the sleep's SLEEP command print a - * line; on every other machine they don't. A controller without a connector (the J714s's - * MagSafe one, hpm5) is probed as any other: it registers its Type-C port and power supply, and - * with apple,sleep-ssps it follows the system's sleep as the USB-C ports' controllers do (woken - * and switched to S3 at the prepare, SLEEP at the suspend, woken at the resume and switched to - * S0 at the complete). + * On the T6050 boards that sleep (J714s, J716c), the probe and the sleep's SLEEP command print a + * line; on every other machine they don't. A controller without a connector (the MagSafe one, + * hpm5) is probed as any other: it registers its Type-C port and power supply, and with + * apple,sleep-ssps it follows the system's sleep as the USB-C ports' controllers do (woken and + * switched to S3 at the prepare, SLEEP at the suspend, woken at the resume and switched to S0 + * at the complete). */ +static bool sn201202x_sleep_board(void) +{ + return of_machine_is_compatible("apple,j714s") || of_machine_is_compatible("apple,j716c"); +} + static bool sn201202x_j714s(void) { return of_machine_is_compatible("apple,j714s"); @@ -965,7 +970,7 @@ static int sn201202x_probe(struct spmi_device *device) tps->data->irq_handler(tps->irq, tps); sn201202x_idle_sleep_start(tps); - if (sn201202x_j714s()) + if (sn201202x_sleep_board()) dev_info(tps->dev, "port controller ready%s\n", sn->polled ? ", polled" : ""); return 0; } @@ -1057,7 +1062,7 @@ VISIBLE_IF_KUNIT int __maybe_unused sn201202x_suspend(struct device *dev) tipd_usb_wake(tps, true); reinit_completion(&sn->sleep_completion); err = spmi_command_sleep(sn->sdev); - if (pm_suspend_via_firmware() && sn201202x_j714s()) + if (pm_suspend_via_firmware() && sn201202x_sleep_board()) dev_info(dev, "SLEEP: %d\n", err); if (err) goto out_resume;