* Re: [PATCH v5 3/5] phy: snps-eusb2: Set phy type to EUSB2
[not found] ` <20260723-eusb2-int-handling-v5-v5-3-f32ea6c1a318@oss.qualcomm.com>
@ 2026-07-24 21:51 ` Sebastian Reichel
0 siblings, 0 replies; only message in thread
From: Sebastian Reichel @ 2026-07-24 21:51 UTC (permalink / raw)
To: Krishna Kurapati
Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thinh Nguyen, Greg Kroah-Hartman, linux-phy,
devicetree, linux-kernel, linux-arm-msm, linux-usb
[-- Attachment #1.1: Type: text/plain, Size: 1405 bytes --]
Hi,
On Thu, Jul 23, 2026 at 04:09:06PM +0530, Krishna Kurapati wrote:
> USB controllers like DWC3 are agnostic of the kind of phy (USB2/eUSB2)
> connected to it. Set the phy type to EUSB2 to let the controller know
> the phy type when queried during its probe.
>
> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> ---
> drivers/phy/phy-snps-eusb2.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c
> index f90bf7e95463..e139b17bcda5 100644
> --- a/drivers/phy/phy-snps-eusb2.c
> +++ b/drivers/phy/phy-snps-eusb2.c
> @@ -13,6 +13,8 @@
> #include <linux/regulator/consumer.h>
> #include <linux/reset.h>
>
> +#include <dt-bindings/phy/phy.h>
> +
> #define EXYNOS_USB_PHY_HS_PHY_CTRL_RST (0x0)
> #define USB_PHY_RST_MASK GENMASK(1, 0)
> #define UTMI_PORT_RST_MASK GENMASK(5, 4)
> @@ -597,6 +599,8 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
> return PTR_ERR(generic_phy);
> }
>
> + phy_set_type(generic_phy, PHY_TYPE_EUSB2);
Isn't there a potential race condition if it's handled in this way?
1. phy-snps-eusb2 probe: PHY is registered
2. dwc3 probes
3. phy-snps-eusb2 probe: PHY type is set
Greetings,
-- Sebastian
> +
> dev_set_drvdata(dev, phy);
> phy_set_drvdata(generic_phy, phy);
>
>
> --
> 2.34.1
>
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 112 bytes --]
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-24 21:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260723-eusb2-int-handling-v5-v5-0-f32ea6c1a318@oss.qualcomm.com>
[not found] ` <20260723-eusb2-int-handling-v5-v5-3-f32ea6c1a318@oss.qualcomm.com>
2026-07-24 21:51 ` [PATCH v5 3/5] phy: snps-eusb2: Set phy type to EUSB2 Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox