[PATCH 2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop

Luca Weiss posted 4 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH 2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop
Posted by Luca Weiss 3 months, 2 weeks ago
Support reading the FS Differential TX Output Resistance Tuning from
devicetree and writing the register, as required on some boards.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
index d7493c2294ef23e37e484019a49ddf7b3d6a6a46..61594739e5b12706775622e1f76af6ad5d2d29bf 100644
--- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
+++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
@@ -136,6 +136,9 @@ static int eusb2_repeater_init(struct phy *phy)
 	if (!of_property_read_u8(np, "qcom,tune-usb2-preem", &val))
 		regmap_write(regmap, base + EUSB2_TUNE_IUSB2, val);
 
+	if (!of_property_read_u8(np, "qcom,tune-res-fsdif", &val))
+		regmap_write(regmap, base + EUSB2_TUNE_RES_FSDIF, val);
+
 	/* Wait for status OK */
 	ret = regmap_read_poll_timeout(regmap, base + EUSB2_RPTR_STATUS, poll_val,
 				       poll_val & RPTR_OK, 10, 5);

-- 
2.50.0
Re: [PATCH 2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop
Posted by Abel Vesa 3 months, 2 weeks ago
On 25-06-25 11:14:57, Luca Weiss wrote:
> Support reading the FS Differential TX Output Resistance Tuning from
> devicetree and writing the register, as required on some boards.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>

Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Re: [PATCH 2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop
Posted by neil.armstrong@linaro.org 3 months, 2 weeks ago
On 25/06/2025 11:14, Luca Weiss wrote:
> Support reading the FS Differential TX Output Resistance Tuning from
> devicetree and writing the register, as required on some boards.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>   drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
> index d7493c2294ef23e37e484019a49ddf7b3d6a6a46..61594739e5b12706775622e1f76af6ad5d2d29bf 100644
> --- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
> +++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
> @@ -136,6 +136,9 @@ static int eusb2_repeater_init(struct phy *phy)
>   	if (!of_property_read_u8(np, "qcom,tune-usb2-preem", &val))
>   		regmap_write(regmap, base + EUSB2_TUNE_IUSB2, val);
>   
> +	if (!of_property_read_u8(np, "qcom,tune-res-fsdif", &val))
> +		regmap_write(regmap, base + EUSB2_TUNE_RES_FSDIF, val);
> +
>   	/* Wait for status OK */
>   	ret = regmap_read_poll_timeout(regmap, base + EUSB2_RPTR_STATUS, poll_val,
>   				       poll_val & RPTR_OK, 10, 5);
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>