[PATCH v8 0/6] phy: fsl-imx8mq-usb: few improvements

Xu Yang posted 6 patches 2 months ago
drivers/phy/freescale/Kconfig              |   1 +
drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 186 +++++++++++++++++++++--------
2 files changed, 138 insertions(+), 49 deletions(-)
[PATCH v8 0/6] phy: fsl-imx8mq-usb: few improvements
Posted by Xu Yang 2 months ago
Patch #1 fix Type-C switch resource leak if probe() fails.
Patch #3 add runtime PM support to avoid register access issue if the
      USB controller enters into runtime suspended state, in this state
      accessing USB PHY register may lack some resources. This will also
      avoid regulator leak if power_on() fails.
Patch #4 add debug control register regmap
Patch #5 add imx8mq_usb_phy_drvdata drvdata for better extension
Patch #6 correct i.MX8MP USB runtime wakeup issue after introduce runtime
      PM support.

---
Changes in v8:
- fix imx8mq_usb_phy_remove() if condition
- add "select REGMAP_MMIO" in Kconfig
- Link to v7: https://patch.msgid.link/20260729-imx8mp-usb-phy-improvement-v7-0-c385ee40ade6@nxp.com

Changes in v7:
- replase PM_RUNTIME_ACQUIRE()  with PM_RUNTIME_ACQUIRE_IF_ENABLED()
- use non-devm PM runtime callback finally, because the devm version will still cause the clock
  be disabled twice when probe() is failed or driver removed at device suspended state.
- Link to v6: https://patch.msgid.link/20260715-imx8mp-usb-phy-improvement-v6-0-00d95e270e4c@nxp.com

Changes in v6:
- use devm_pm_runtime_enable() to disable runtime PM if probe fails
- add imx8mq_usb_phy_drvdata drvdata and need_genpd_rpm_on flag for better extension
- Link to v5: https://patch.msgid.link/20260630-imx8mp-usb-phy-improvement-v5-0-25d616403844@nxp.com

Changes in v5:
- not use devm runtime callback to avoid clk enable/disable imblance
- Link to v4: https://patch.msgid.link/20260605-imx8mp-usb-phy-improvement-v4-0-b2ddf2f3862c@nxp.com

Changes in v4:
- add Rb tag
- replace guard() with PM_RUNTIME_ACQUIRE()
- Link to v3: https://patch.msgid.link/20260603-imx8mp-usb-phy-improvement-v3-0-7afb8f89abc6@nxp.com

Link to v2:
 - https://lore.kernel.org/linux-phy/20260512101046.1498096-1-xu.yang_2@nxp.com/
 - https://lore.kernel.org/linux-phy/20260512101212.1498223-1-xu.yang_2@nxp.com/

---
Felix Gu (1):
      phy: fsl-imx8mq-usb: fix typec switch leak on probe error path

Xu Yang (5):
      phy: fsl-imx8mq-usb: set usb phy to be wakeup capable
      phy: fsl-imx8mq-usb: add runtime PM support
      phy: fsl-imx8mq-usb: add control register regmap
      phy: fsl-imx8mq-usb: introduce per-variant driver data structure
      phy: fsl-imx8mq-usb: keep PHY power domain runtime always-on for i.MX8MP

 drivers/phy/freescale/Kconfig              |   1 +
 drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 186 +++++++++++++++++++++--------
 2 files changed, 138 insertions(+), 49 deletions(-)
---
base-commit: 3652b49adac266a3d27cb41cdfdb7d8790fc3633
change-id: 20260602-imx8mp-usb-phy-improvement-4272d308d862

Best regards,
--  
Xu Yang <xu.yang_2@nxp.com>
Re: [PATCH v8 0/6] phy: fsl-imx8mq-usb: few improvements
Posted by Vinod Koul 1 month, 3 weeks ago
On Fri, 31 Jul 2026 16:11:18 +0800, Xu Yang wrote:
> Patch #1 fix Type-C switch resource leak if probe() fails.
> Patch #3 add runtime PM support to avoid register access issue if the
>       USB controller enters into runtime suspended state, in this state
>       accessing USB PHY register may lack some resources. This will also
>       avoid regulator leak if power_on() fails.
> Patch #4 add debug control register regmap
> Patch #5 add imx8mq_usb_phy_drvdata drvdata for better extension
> Patch #6 correct i.MX8MP USB runtime wakeup issue after introduce runtime
>       PM support.
> 
> [...]

Applied, thanks!

[1/6] phy: fsl-imx8mq-usb: fix typec switch leak on probe error path
      commit: 87a1805b1c346b092c34f96f3806f207792910e1
[2/6] phy: fsl-imx8mq-usb: set usb phy to be wakeup capable
      commit: 2602012b8c625e63493647356d7290ee7c8fef2b
[3/6] phy: fsl-imx8mq-usb: add runtime PM support
      commit: 56eec5d9665cebe580d41cdf2ea7abb52d23e122
[4/6] phy: fsl-imx8mq-usb: add control register regmap
      commit: 01e9e84a43a1b4e9f67b5bd36be3d127d773a223
[5/6] phy: fsl-imx8mq-usb: introduce per-variant driver data structure
      commit: 2d9dcffd5d3995ba04feeeebe800cbf1c0d4bbbe
[6/6] phy: fsl-imx8mq-usb: keep PHY power domain runtime always-on for i.MX8MP
      commit: ee9e2b39ea4890f804b0c75c8a40a0f68ecd8d0a

Best regards,
-- 
~Vinod