]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
phy: qualcomm: phy-qcom-eusb2-repeater: fix override properties
authorPengyu Luo <mitltlatltl@gmail.com>
Tue, 12 Aug 2025 09:39:56 +0000 (17:39 +0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 12 Aug 2025 10:34:51 +0000 (16:04 +0530)
property "qcom,tune-usb2-preem" is for EUSB2_TUNE_USB2_PREEM
property "qcom,tune-usb2-amplitude" is for EUSB2_TUNE_IUSB2

The downstream correspondence is as follows:
EUSB2_TUNE_USB2_PREEM: Tx pre-emphasis tuning
EUSB2_TUNE_IUSB2: HS trasmit amplitude
EUSB2_TUNE_SQUELCH_U: Squelch detection threshold
EUSB2_TUNE_HSDISC: HS disconnect threshold
EUSB2_TUNE_EUSB_SLEW: slew rate

Fixes: 31bc94de7602 ("phy: qualcomm: phy-qcom-eusb2-repeater: Don't zero-out registers")
Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20250812093957.32235-1-mitltlatltl@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c

index e0f2acc8109c10efce6d3684a4c6d3c70c914554..8fcbc312fd616a8ed23027492c974085b6a9821a 100644 (file)
@@ -127,13 +127,13 @@ static int eusb2_repeater_init(struct phy *phy)
                             rptr->cfg->init_tbl[i].value);
 
        /* Override registers from devicetree values */
-       if (!of_property_read_u8(np, "qcom,tune-usb2-amplitude", &val))
+       if (!of_property_read_u8(np, "qcom,tune-usb2-preem", &val))
                regmap_write(regmap, base + EUSB2_TUNE_USB2_PREEM, val);
 
        if (!of_property_read_u8(np, "qcom,tune-usb2-disc-thres", &val))
                regmap_write(regmap, base + EUSB2_TUNE_HSDISC, val);
 
-       if (!of_property_read_u8(np, "qcom,tune-usb2-preem", &val))
+       if (!of_property_read_u8(np, "qcom,tune-usb2-amplitude", &val))
                regmap_write(regmap, base + EUSB2_TUNE_IUSB2, val);
 
        /* Wait for status OK */