Re: [PATCH] phy: qualcomm: phy-qcom-eusb2-repeater: rework reg override handler
From: Dmitry Baryshkov
Date: Sun Apr 06 2025 - 16:31:18 EST
On Sun, Apr 06, 2025 at 01:43:18AM +0800, Pengyu Luo wrote:
> In downstream tree, many registers need to be overrided, it varies
> from devices and platforms, not only HS trasmit amplitude(0x51),
> HS disconnect threshold(0x53), Tx pre-emphasis tuning(0x57).
>
> The device I plan to upstream also uses it, so I write the patch for
> it (Oneplus Pad Pro / Oneplus Pad 2, sm8650-mtp based).
>
> In upstream, only Sony Xperia 1 V is using this, so fixing it for sony,
> in downstream, some crd, mtp, htk devices also use it, I have no
> such device, don't set it for them.
>
> Signed-off-by: Pengyu Luo <mitltlatltl@xxxxxxxxx>
> ---
> .../qcom/sm8550-sony-xperia-yodo-pdx234.dts | 5 +-
> .../phy/qualcomm/phy-qcom-eusb2-repeater.c | 86 +++++++++++++++----
> 2 files changed, 72 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts b/arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts
> index d90dc7b37..99f5fd32c 100644
> --- a/arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts
> @@ -673,9 +673,8 @@ cam_pwr_a_cs: cam-pwr-a-cs-state {
> };
>
> &pm8550b_eusb2_repeater {
> - qcom,tune-usb2-disc-thres = /bits/ 8 <0x6>;
> - qcom,tune-usb2-amplitude = /bits/ 8 <0xf>;
> - qcom,tune-usb2-preem = /bits/ 8 <0x7>;
> + qcom,param-override-seq = <0x51 0x08 0x53 0x06 0x57 0x07>;
> + qcom,host-param-override-seq = <0x51 0x08 0x53 0x06 0x57 0x07>;
Other than Krzysztof's comments: In upstream we describe invididual
properties / overrides rather than just dumping the whole register
sequence. So, using a single 'seq' property is not acceptable.
> vdd18-supply = <&pm8550_l15>;
> vdd3-supply = <&pm8550_l5>;
> };
--
With best wishes
Dmitry