From: Frank Li <Frank.li@oss.nxp.com>
To: Xu Yang <xu.yang_2@oss.nxp.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>, Jun Li <jun.li@nxp.com>,
linux-phy@lists.infradead.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Xu Yang <xu.yang_2@nxp.com>
Subject: Re: [PATCH v8 6/6] phy: fsl-imx8mq-usb: keep PHY power domain runtime always-on for i.MX8MP
Date: Fri, 31 Jul 2026 09:44:00 -0500 [thread overview]
Message-ID: <amy0sBg9QT-3v__p@SMW015318> (raw)
In-Reply-To: <20260731-imx8mp-usb-phy-improvement-v8-6-2ec8d6b3854d@nxp.com>
On Fri, Jul 31, 2026 at 04:11:24PM +0800, Xu Yang wrote:
> From: Xu Yang <xu.yang_2@nxp.com>
>
> On i.MX8MP, the USB PHY has a dedicated power domain that was previously
> never powered off at runtime. With the introduction of runtime PM support,
> the power domain will be powered off if the device is runtime suspended,
> which breaks USB wakeup functionality.
>
> To preserve wakeup functionality, mark the PHY power domain as runtime
> always-on for i.MX8MP platform. To limit the behavior to i.MX8MP, add a
> need_genpd_rpm_on to imx8mq_usb_phy_drvdata and set it as true for i.MX8MP.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> ---
> Changes in v8:
> - no changes
> Changes in v7:
> - replace dev_err_probe() with dev_warn()
> Changes in v6:
> - set need_genpd_rpm_on flag for i.MX8MP and call dev_pm_genpd_rpm_always_on()
> if the flag is true
> Changes in v5:
> - no changes
> Changes in v4:
> - no changes
> Changes in v3:
> - new patch
> ---
> drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> index ba7603a008d8..8859835541b1 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> @@ -9,6 +9,7 @@
> #include <linux/of.h>
> #include <linux/phy/phy.h>
> #include <linux/platform_device.h>
> +#include <linux/pm_domain.h>
> #include <linux/pm_runtime.h>
> #include <linux/regulator/consumer.h>
> #include <linux/regmap.h>
> @@ -134,6 +135,7 @@ struct imx8mq_usb_phy {
>
> struct imx8mq_usb_phy_drvdata {
> const struct phy_ops *ops;
> + bool need_genpd_rpm_on;
> };
>
> static void tca_blk_orientation_set(struct tca_blk *tca,
> @@ -669,6 +671,7 @@ static const struct imx8mq_usb_phy_drvdata imx8mq_usb_phy_data = {
>
> static const struct imx8mq_usb_phy_drvdata imx8mp_usb_phy_data = {
> .ops = &imx8mp_usb_phy_ops,
> + .need_genpd_rpm_on = true,
> };
>
> static const struct imx8mq_usb_phy_drvdata imx95_usb_phy_data = {
> @@ -738,6 +741,12 @@ static int imx8mq_usb_phy_probe(struct platform_device *pdev)
> if (!phy_data)
> return -EINVAL;
>
> + if (phy_data->need_genpd_rpm_on) {
> + ret = dev_pm_genpd_rpm_always_on(dev, true);
> + if (ret && ret != -EOPNOTSUPP)
> + dev_warn(dev, "failed to set genpd rpm always on\n");
> + }
> +
> pm_runtime_set_active(dev);
> pm_runtime_enable(dev);
>
>
> --
> 2.34.1
>
>
prev parent reply other threads:[~2026-07-31 14:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 8:11 [PATCH v8 0/6] phy: fsl-imx8mq-usb: few improvements Xu Yang
2026-07-31 8:11 ` [PATCH v8 1/6] phy: fsl-imx8mq-usb: fix typec switch leak on probe error path Xu Yang
2026-07-31 8:11 ` [PATCH v8 2/6] phy: fsl-imx8mq-usb: set usb phy to be wakeup capable Xu Yang
2026-07-31 8:11 ` [PATCH v8 3/6] phy: fsl-imx8mq-usb: add runtime PM support Xu Yang
2026-07-31 14:42 ` Frank Li
2026-07-31 8:11 ` [PATCH v8 4/6] phy: fsl-imx8mq-usb: add control register regmap Xu Yang
2026-07-31 8:11 ` [PATCH v8 5/6] phy: fsl-imx8mq-usb: introduce per-variant driver data structure Xu Yang
2026-07-31 8:11 ` [PATCH v8 6/6] phy: fsl-imx8mq-usb: keep PHY power domain runtime always-on for i.MX8MP Xu Yang
2026-07-31 14:44 ` Frank Li [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=amy0sBg9QT-3v__p@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=s.hauer@pengutronix.de \
--cc=vkoul@kernel.org \
--cc=xu.yang_2@nxp.com \
--cc=xu.yang_2@oss.nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox