Re: [PATCH v5 3/5] phy: snps-eusb2: Set phy type to EUSB2

Thinh Nguyen <[email protected]>
Newsgroups org.kernel.vger.linux-devicetree,org.infradead.lists.linux-phy,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb
Message-ID <anJbvvONg4S6rh2k@vbox>
On Thu, Jul 23, 2026, 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 <[email protected]>
> ---
>  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>

This is already included in <linux/phy/phy.h>

BR,
Thinh

> +
>  #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);
> +
>  	dev_set_drvdata(dev, phy);
>  	phy_set_drvdata(generic_phy, phy);
>  
> 
> -- 
> 2.34.1
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.