From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Chen-Yu Tsai <wens@csie.org>,
Samuel Holland <samuel@sholland.org>,
Philippe Simons <simons.philippe@gmail.com>,
"open list:GENERIC PHY FRAMEWORK" <linux-phy@lists.infradead.org>,
"moderated list:ARM/Allwinner sunXi SoC support"
<linux-arm-kernel@lists.infradead.org>,
"open list:ARM/Allwinner sunXi SoC support"
<linux-sunxi@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>,
Philippe Simons <simons.philippe@gmail.com>
Subject: Re: [RFC PATCH 2/3] phy: override dr_mode for phy0
Date: Thu, 20 Feb 2025 21:33:24 +0100 [thread overview]
Message-ID: <2428472.yKrmzQ4Hd0@jernej-laptop> (raw)
In-Reply-To: <20250118102207.9339-2-simons.philippe@gmail.com>
Dne sobota, 18. januar 2025 ob 11:22:05 Srednjeevropski standardni čas je Philippe Simons napisal(a):
> PHY0 mode is fully determined by the selected mux route.
> Ignore changes requests from controllers.
>
> Signed-off-by: Philippe Simons <simons.philippe@gmail.com>
Some context is missing. Why is this patch needed? Which scenario causes
issues without this patch?
Please also provide cover letter to the series, with "big picture" explanation.
Best regards,
Jernej
> ---
> drivers/phy/allwinner/phy-sun4i-usb.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
> index 24fbabe7a..f163b355e 100644
> --- a/drivers/phy/allwinner/phy-sun4i-usb.c
> +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
> @@ -544,6 +544,18 @@ static int sun4i_usb_phy_set_mode(struct phy *_phy,
> return -EINVAL;
> }
>
> + if (data->cfg->phy0_dual_route) {
> + /*
> + For SoCs with dual route the PHY mode is fully determined by
> + the selected mux route (i.e. USB controller to use).
> + As both host (EHCI/OHCI) and peripheral (MUSB) controllers uses
> + the same PHY, both drivers can try to set PHY mode.
> + We need to ignore this requests, but not report error in case
> + of valid mode values.
> + */
> + return 0;
> + }
> +
> if (new_mode != data->dr_mode) {
> dev_info(&_phy->dev, "Changing dr_mode to %d\n", new_mode);
> data->dr_mode = new_mode;
>
next prev parent reply other threads:[~2025-02-20 20:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-18 10:22 [RFC PATCH 1/3] phy: don't let controllers change vbus reg Philippe Simons
2025-01-18 10:22 ` [RFC PATCH 2/3] phy: override dr_mode for phy0 Philippe Simons
2025-02-20 20:33 ` Jernej Škrabec [this message]
2025-01-18 10:22 ` [RFC PATCH 3/3] arm64: dts: allwinner: h700: Enable USB OTG Philippe Simons
2025-02-20 20:38 ` Jernej Škrabec
2025-02-21 9:54 ` Philippe Simons
2025-02-21 18:20 ` Jernej Škrabec
2025-02-20 20:27 ` [RFC PATCH 1/3] phy: don't let controllers change vbus reg Jernej Škrabec
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=2428472.yKrmzQ4Hd0@jernej-laptop \
--to=jernej.skrabec@gmail.com \
--cc=kishon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=simons.philippe@gmail.com \
--cc=vkoul@kernel.org \
--cc=wens@csie.org \
/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