The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Re: [PATCH V2 RESEND 2/2] phy: mediatek: xsphy: add support to set disconnect threshold
       [not found] ` <20260413122836.4848-2-chunfeng.yun@mediatek.com>
@ 2026-05-10 11:50   ` Vinod Koul
  0 siblings, 0 replies; only message in thread
From: Vinod Koul @ 2026-05-10 11:50 UTC (permalink / raw)
  To: Chunfeng Yun
  Cc: AngeloGioacchino Del Regno, Neil Armstrong, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	linux-arm-kernel, linux-mediatek, linux-phy, devicetree,
	linux-kernel

On 13-04-26, 20:28, Chunfeng Yun wrote:
> Add a property to tune usb2 phy's disconnect threshold.
> 
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2: change property name
> ---
>  drivers/phy/mediatek/phy-mtk-xsphy.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/mediatek/phy-mtk-xsphy.c b/drivers/phy/mediatek/phy-mtk-xsphy.c
> index c0ddb9273cc3..46345e4f4189 100644
> --- a/drivers/phy/mediatek/phy-mtk-xsphy.c
> +++ b/drivers/phy/mediatek/phy-mtk-xsphy.c
> @@ -61,6 +61,7 @@
>  #define XSP_USBPHYACR6		((SSUSB_SIFSLV_U2PHY_COM) + 0x018)
>  #define P2A6_RG_BC11_SW_EN	BIT(23)
>  #define P2A6_RG_OTG_VBUSCMP_EN	BIT(20)
> +#define PA6_RG_U2_DISCTH	GENMASK(7, 4)
>  
>  #define XSP_U2PHYDTM1		((SSUSB_SIFSLV_U2PHY_COM) + 0x06C)
>  #define P2D_FORCE_IDDIG		BIT(9)
> @@ -107,6 +108,7 @@ struct xsphy_instance {
>  	int eye_src;
>  	int eye_vrt;
>  	int eye_term;
> +	int discth;

Please see 

https://sashiko.dev/#/patchset/20260413122836.4848-1-chunfeng.yun%40mediatek.com

>  };
>  
>  struct mtk_xsphy {
> @@ -256,9 +258,12 @@ static void phy_parse_property(struct mtk_xsphy *xsphy,
>  					 &inst->eye_vrt);
>  		device_property_read_u32(dev, "mediatek,eye-term",
>  					 &inst->eye_term);
> -		dev_dbg(dev, "intr:%d, src:%d, vrt:%d, term:%d\n",
> +		device_property_read_u32(dev, "mediatek,discth",
> +					 &inst->discth);
> +		dev_dbg(dev, "intr:%d, src:%d, vrt:%d, term:%d, discth:%d\n",
>  			inst->efuse_intr, inst->eye_src,
> -			inst->eye_vrt, inst->eye_term);
> +			inst->eye_vrt, inst->eye_term,
> +			inst->discth);
>  		break;
>  	case PHY_TYPE_USB3:
>  		device_property_read_u32(dev, "mediatek,efuse-intr",
> @@ -301,6 +306,9 @@ static void u2_phy_props_set(struct mtk_xsphy *xsphy,
>  	if (inst->eye_term)
>  		mtk_phy_update_field(pbase + XSP_USBPHYACR1, P2A1_RG_TERM_SEL,
>  				     inst->eye_term);
> +	if (inst->discth)
> +		mtk_phy_update_field(pbase + XSP_USBPHYACR6, PA6_RG_U2_DISCTH,
> +				     inst->discth);
>  }
>  
>  static void u3_phy_props_set(struct mtk_xsphy *xsphy,
> -- 
> 2.45.2

-- 
~Vinod

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-10 11:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260413122836.4848-1-chunfeng.yun@mediatek.com>
     [not found] ` <20260413122836.4848-2-chunfeng.yun@mediatek.com>
2026-05-10 11:50   ` [PATCH V2 RESEND 2/2] phy: mediatek: xsphy: add support to set disconnect threshold Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox