[PATCH v3 0/4] pmdomain: core: Introduce device_set/get_out_band_wakeup and use it in usb

Peng Fan posted 4 patches 1 month ago
drivers/pmdomain/core.c            |  6 ++++--
drivers/usb/chipidea/ci_hdrc_imx.c |  8 ++++++++
drivers/usb/chipidea/core.c        |  3 +++
drivers/usb/dwc3/dwc3-imx8mp.c     |  4 ++++
include/linux/pm.h                 |  1 +
include/linux/pm_wakeup.h          | 17 +++++++++++++++++
include/linux/usb/chipidea.h       |  1 +
7 files changed, 38 insertions(+), 2 deletions(-)
[PATCH v3 0/4] pmdomain: core: Introduce device_set/get_out_band_wakeup and use it in usb
Posted by Peng Fan 1 month ago
This is pick up of [1] which does not have response in about 5 months.
This V2 patchset
- includes usb driver changes(patch 2,3) to give people a full picture on how it is used.
- Rebased next-20250729 to resolve conflicts

To i.MX95, USB2 and USB3 are in HSIOMIX, but there is always on logic
to make USB2 and USB3 has wakeup capability when HSIOMIX power domain
is in off state. Otherwise the HSIOMIX will be kept on when
USB2 and USB3 are configured to be wakeup source and Linux suspended.
With this patchset, HSIOMIX could be powered off and Linux could still
be woke up by USB hotplug event.

Patch 1 introduces device_set/get_out_band_wakeup
Patch 2 and 3 are drivers changes to use device_set_out_band_wakeup

[1]https://lore.kernel.org/linux-pm/20250311083239.3336439-1-peng.fan@oss.nxp.com/

More old discussions:
https://lore.kernel.org/linux-pm/20250311083239.3336439-1-peng.fan@oss.nxp.com/

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Changes in v3:
- Add a new patch from Xu Yang to detach power domain for ci hdrc
- Add A-b for patch 4
- Link to v2: https://lore.kernel.org/r/20250801-pm-v2-0-97c8fb2a433c@nxp.com

---
Peng Fan (3):
      pmdomain: core: Introduce device_set/get_out_band_wakeup()
      usb: chipidea: ci_hdrc_imx: Set out of band wakeup for i.MX95
      usb: dwc3: imx8mp: Set out of band wakeup for i.MX95

Xu Yang (1):
      usb: chipidea: core: detach power domain for ci_hdrc platform device

 drivers/pmdomain/core.c            |  6 ++++--
 drivers/usb/chipidea/ci_hdrc_imx.c |  8 ++++++++
 drivers/usb/chipidea/core.c        |  3 +++
 drivers/usb/dwc3/dwc3-imx8mp.c     |  4 ++++
 include/linux/pm.h                 |  1 +
 include/linux/pm_wakeup.h          | 17 +++++++++++++++++
 include/linux/usb/chipidea.h       |  1 +
 7 files changed, 38 insertions(+), 2 deletions(-)
---
base-commit: 1b09efec32046a9c78cfecc46a26b1b139a3e8a8
change-id: 20250729-pm-243ff7097e44

Best regards,
-- 
Peng Fan <peng.fan@nxp.com>
Re: [PATCH v3 0/4] pmdomain: core: Introduce device_set/get_out_band_wakeup and use it in usb
Posted by Ulf Hansson 3 weeks ago
On Tue, 2 Sept 2025 at 05:33, Peng Fan <peng.fan@nxp.com> wrote:
>
> This is pick up of [1] which does not have response in about 5 months.

Sorry, I have planned to have a look at this, but just never got to it.

> This V2 patchset
> - includes usb driver changes(patch 2,3) to give people a full picture on how it is used.
> - Rebased next-20250729 to resolve conflicts
>
> To i.MX95, USB2 and USB3 are in HSIOMIX, but there is always on logic
> to make USB2 and USB3 has wakeup capability when HSIOMIX power domain
> is in off state. Otherwise the HSIOMIX will be kept on when
> USB2 and USB3 are configured to be wakeup source and Linux suspended.
> With this patchset, HSIOMIX could be powered off and Linux could still
> be woke up by USB hotplug event.
>
> Patch 1 introduces device_set/get_out_band_wakeup
> Patch 2 and 3 are drivers changes to use device_set_out_band_wakeup
>
> [1]https://lore.kernel.org/linux-pm/20250311083239.3336439-1-peng.fan@oss.nxp.com/
>
> More old discussions:
> https://lore.kernel.org/linux-pm/20250311083239.3336439-1-peng.fan@oss.nxp.com/
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Overall I think the series looks nice, but I will make some more
thinking of this in the next few days and come back with some proper
comments, at latest in the middle of next week.

Kind regards
Uffe

> ---
> Changes in v3:
> - Add a new patch from Xu Yang to detach power domain for ci hdrc
> - Add A-b for patch 4
> - Link to v2: https://lore.kernel.org/r/20250801-pm-v2-0-97c8fb2a433c@nxp.com
>
> ---
> Peng Fan (3):
>       pmdomain: core: Introduce device_set/get_out_band_wakeup()
>       usb: chipidea: ci_hdrc_imx: Set out of band wakeup for i.MX95
>       usb: dwc3: imx8mp: Set out of band wakeup for i.MX95
>
> Xu Yang (1):
>       usb: chipidea: core: detach power domain for ci_hdrc platform device
>
>  drivers/pmdomain/core.c            |  6 ++++--
>  drivers/usb/chipidea/ci_hdrc_imx.c |  8 ++++++++
>  drivers/usb/chipidea/core.c        |  3 +++
>  drivers/usb/dwc3/dwc3-imx8mp.c     |  4 ++++
>  include/linux/pm.h                 |  1 +
>  include/linux/pm_wakeup.h          | 17 +++++++++++++++++
>  include/linux/usb/chipidea.h       |  1 +
>  7 files changed, 38 insertions(+), 2 deletions(-)
> ---
> base-commit: 1b09efec32046a9c78cfecc46a26b1b139a3e8a8
> change-id: 20250729-pm-243ff7097e44
>
> Best regards,
> --
> Peng Fan <peng.fan@nxp.com>
>
Re: [PATCH v3 0/4] pmdomain: core: Introduce device_set/get_out_band_wakeup and use it in usb
Posted by Peng Fan 3 weeks ago
Hi Ulf
On Thu, Sep 11, 2025 at 04:45:31PM +0200, Ulf Hansson wrote:
[...]
>
>Overall I think the series looks nice, but I will make some more
>thinking of this in the next few days and come back with some proper
>comments, at latest in the middle of next week.

Thanks a lot for the review! I'll stay tuned for your comments next week.

Thanks,
Peng