Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: chipidea: ci_hdrc_imx: Set out of band wakeup for i.MX95

i.MX95 USB2 inside HSIOMIX could still wakeup Linux, even if HSIOMIX
power domain(Digital logic) is off. There is still always on logic
have the wakeup capability which is out band wakeup capbility.

So use device_set_out_band_wakeup for i.MX95 to make sure usb2 could
wakeup system even if HSIOMIX power domain is in off state.

Tested-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Xu Yang <xu.yang_2@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Peng Fan and committed by
Ulf Hansson
85482536 dfdcfc19

+11 -1
+10 -1
drivers/usb/chipidea/ci_hdrc_imx.c
··· 79 79 CI_HDRC_HAS_PORTSC_PEC_MISSED, 80 80 }; 81 81 82 + static const struct ci_hdrc_imx_platform_flag imx95_usb_data = { 83 + .flags = CI_HDRC_SUPPORTS_RUNTIME_PM | CI_HDRC_OUT_BAND_WAKEUP, 84 + }; 85 + 82 86 static const struct ci_hdrc_imx_platform_flag s32g_usb_data = { 83 87 .flags = CI_HDRC_DISABLE_HOST_STREAMING, 84 88 }; ··· 98 94 { .compatible = "fsl,imx7d-usb", .data = &imx7d_usb_data}, 99 95 { .compatible = "fsl,imx7ulp-usb", .data = &imx7ulp_usb_data}, 100 96 { .compatible = "fsl,imx8ulp-usb", .data = &imx8ulp_usb_data}, 97 + { .compatible = "fsl,imx95-usb", .data = &imx95_usb_data}, 101 98 { .compatible = "nxp,s32g2-usb", .data = &s32g_usb_data}, 102 99 { /* sentinel */ } 103 100 }; ··· 709 704 710 705 pinctrl_pm_select_sleep_state(dev); 711 706 712 - if (data->wakeup_irq > 0 && device_may_wakeup(dev)) 707 + if (data->wakeup_irq > 0 && device_may_wakeup(dev)) { 713 708 enable_irq_wake(data->wakeup_irq); 709 + 710 + if (data->plat_data->flags & CI_HDRC_OUT_BAND_WAKEUP) 711 + device_set_out_band_wakeup(dev); 712 + } 714 713 715 714 return ret; 716 715 }
+1
include/linux/usb/chipidea.h
··· 66 66 #define CI_HDRC_HAS_PORTSC_PEC_MISSED BIT(17) 67 67 #define CI_HDRC_FORCE_VBUS_ACTIVE_ALWAYS BIT(18) 68 68 #define CI_HDRC_HAS_SHORT_PKT_LIMIT BIT(19) 69 + #define CI_HDRC_OUT_BAND_WAKEUP BIT(20) 69 70 enum usb_dr_mode dr_mode; 70 71 #define CI_HDRC_CONTROLLER_RESET_EVENT 0 71 72 #define CI_HDRC_CONTROLLER_STOPPED_EVENT 1