mbox series

[0/3] Add QCOM SNPS PHY overriding params support

Message ID 1644952755-15527-1-git-send-email-quic_c_sanm@quicinc.com
Headers show
Series Add QCOM SNPS PHY overriding params support | expand

Message

Sandeep Maheswaram Feb. 15, 2022, 7:19 p.m. UTC
Added support for overriding tuning parameters in QCOM SNPS PHY
from device tree.

Sandeep Maheswaram (3):
  dt-bindings: phy: qcom,usb-snps-femto-v2: Add phy override params
    bindings
  phy: qcom-snps: Add support for overriding phy tuning parameters
  arm64: dts: qcom: sc7280: Update SNPS Phy params for SC7280 IDP device

 .../bindings/phy/qcom,usb-snps-femto-v2.yaml       | 16 ++++++++
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi           |  4 ++
 drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c      | 45 ++++++++++++++++++++++
 3 files changed, 65 insertions(+)

Comments

Stephen Boyd Feb. 16, 2022, 2:10 a.m. UTC | #1
Quoting Dmitry Baryshkov (2022-02-15 11:55:18)
> On 15/02/2022 22:19, Sandeep Maheswaram wrote:
> > Add support for overriding SNPS phy tuning parameters in device tree
> > bindings.
>
> This does not really benefit the users and does not help developers.
> Could you please change the dt bindings to specify values for
> thresholds, durations, impedance, etc. The values should be represented
> in the human units (e.g. us, Ohms, mV), not in the internal register
> 'bits' representation.

+1
Pavan Kondeti Feb. 16, 2022, 3:47 a.m. UTC | #2
On Tue, Feb 15, 2022 at 06:10:45PM -0800, Stephen Boyd wrote:
> Quoting Dmitry Baryshkov (2022-02-15 11:55:18)
> > On 15/02/2022 22:19, Sandeep Maheswaram wrote:
> > > Add support for overriding SNPS phy tuning parameters in device tree
> > > bindings.
> >
> > This does not really benefit the users and does not help developers.
> > Could you please change the dt bindings to specify values for
> > thresholds, durations, impedance, etc. The values should be represented
> > in the human units (e.g. us, Ohms, mV), not in the internal register
> > 'bits' representation.
> 
> +1

Agreed to this proposal.

Sandeep,

We have a similar implemention in QUSB phy driver. can we have something like
that for SNPSHS PHY too?

Thanks,
Pavan
Krzysztof Kozlowski Feb. 16, 2022, 7:40 a.m. UTC | #3
On 15/02/2022 20:19, Sandeep Maheswaram wrote:
> Add support for overriding SNPS phy tuning parameters in device tree
> bindings.
> 
> Signed-off-by: Sandeep Maheswaram <quic_c_sanm@quicinc.com>
> ---
>  .../devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml  | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml b/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml
> index 0dfe691..44cf3bf 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml
> @@ -50,6 +50,22 @@ properties:
>    vdda33-supply:
>      description: phandle to the regulator 3.3V supply node.
>  
> +  qcom,override_x0:

Do not use underscore in properties, but hyphen. Just like everywhere in
bindings.

This does not look like description of hardware but hard-coding some
register values. Bindings should rather describe the actual hardware
parameters instead of values written into registers.

Plus what other reviewers pointed about usefulness.

Best regards,
Krzysztof