[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2428472.yKrmzQ4Hd0@jernej-laptop>
Date: Thu, 20 Feb 2025 21:33:24 +0100
From: Jernej Škrabec <jernej.skrabec@...il.com>
To: Vinod Koul <vkoul@...nel.org>, Kishon Vijay Abraham I <kishon@...nel.org>,
Chen-Yu Tsai <wens@...e.org>, Samuel Holland <samuel@...lland.org>,
Philippe Simons <simons.philippe@...il.com>,
"open list:GENERIC PHY FRAMEWORK" <linux-phy@...ts.infradead.org>,
"moderated list:ARM/Allwinner sunXi SoC support"
<linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/Allwinner sunXi SoC support" <linux-sunxi@...ts.linux.dev>,
open list <linux-kernel@...r.kernel.org>,
Philippe Simons <simons.philippe@...il.com>
Subject: Re: [RFC PATCH 2/3] phy: override dr_mode for phy0
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@...il.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;
>
Powered by blists - more mailing lists