Skip to content

Commit 8548253

Browse files
MrVanUlf Hansson
authored andcommitted
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>
1 parent dfdcfc1 commit 8548253

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

drivers/usb/chipidea/ci_hdrc_imx.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ static const struct ci_hdrc_imx_platform_flag imx8ulp_usb_data = {
7979
CI_HDRC_HAS_PORTSC_PEC_MISSED,
8080
};
8181

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+
8286
static const struct ci_hdrc_imx_platform_flag s32g_usb_data = {
8387
.flags = CI_HDRC_DISABLE_HOST_STREAMING,
8488
};
@@ -94,6 +98,7 @@ static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
9498
{ .compatible = "fsl,imx7d-usb", .data = &imx7d_usb_data},
9599
{ .compatible = "fsl,imx7ulp-usb", .data = &imx7ulp_usb_data},
96100
{ .compatible = "fsl,imx8ulp-usb", .data = &imx8ulp_usb_data},
101+
{ .compatible = "fsl,imx95-usb", .data = &imx95_usb_data},
97102
{ .compatible = "nxp,s32g2-usb", .data = &s32g_usb_data},
98103
{ /* sentinel */ }
99104
};
@@ -704,9 +709,13 @@ static int ci_hdrc_imx_suspend(struct device *dev)
704709

705710
pinctrl_pm_select_sleep_state(dev);
706711

707-
if (data->wakeup_irq > 0 && device_may_wakeup(dev))
712+
if (data->wakeup_irq > 0 && device_may_wakeup(dev)) {
708713
enable_irq_wake(data->wakeup_irq);
709714

715+
if (data->plat_data->flags & CI_HDRC_OUT_BAND_WAKEUP)
716+
device_set_out_band_wakeup(dev);
717+
}
718+
710719
return ret;
711720
}
712721

include/linux/usb/chipidea.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ struct ci_hdrc_platform_data {
6666
#define CI_HDRC_HAS_PORTSC_PEC_MISSED BIT(17)
6767
#define CI_HDRC_FORCE_VBUS_ACTIVE_ALWAYS BIT(18)
6868
#define CI_HDRC_HAS_SHORT_PKT_LIMIT BIT(19)
69+
#define CI_HDRC_OUT_BAND_WAKEUP BIT(20)
6970
enum usb_dr_mode dr_mode;
7071
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
7172
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1

0 commit comments

Comments
 (0)