[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a43277a-94b9-4f95-314a-876291227982@canonical.com>
Date: Mon, 14 Mar 2022 12:21:42 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: Pavan Kondeti <quic_pkondeti@...cinc.com>
Cc: Sandeep Maheswaram <quic_c_sanm@...cinc.com>,
Rob Herring <robh+dt@...nel.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Kishon Vijay Abraham I <kishon@...com>,
Vinod Koul <vkoul@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wesley Cheng <wcheng@...eaurora.org>,
Stephen Boyd <swboyd@...omium.org>,
Doug Anderson <dianders@...omium.org>,
Matthias Kaehlcke <mka@...omium.org>,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-phy@...ts.infradead.org,
linux-usb@...r.kernel.org, quic_ppratap@...cinc.com,
quic_kriskura@...cinc.com
Subject: Re: [PATCH v2 1/3] dt-bindings: phy: qcom,usb-snps-femto-v2: Add phy
override params bindings
On 14/03/2022 12:13, Pavan Kondeti wrote:
> Hi Krzysztof,
>
> On Mon, Mar 14, 2022 at 11:41:27AM +0100, Krzysztof Kozlowski wrote:
>> On 14/03/2022 11:30, Pavan Kondeti wrote:
>>> Hi Krzysztof,
>>>
>>>>
>>>> Ah, I did not get it. That's not the solution for this case. defines in
>>>> dt-bindings are for constants which already can be in DT, e.g. IDs. Your
>>>> register values should not be stored in DT.
>>>>
>>> These are again not register definitions. These are encodings that dT and
>>> driver can use. These would be constants only, no?
>>
>> What do you mean it is not a register value? I don't have access to
>> datasheet/manual but I can clearly see code:
>>
>> + if (or->hs_disconnect.override)
>> + qcom_snps_hsphy_write_mask(hsphy->base,
>> + USB2_PHY_USB_PHY_HS_PHY_OVERRIDE_X0,
>> + HS_DISCONNECT_MASK,
>> + or->hs_disconnect.value << HS_DISCONNECT_SHIFT);
>>
>> You read the value from DT (e.g. "3" which means 6.3% for hs-disconnect)
>> and you write it to a register. Directly. 3 is a value for the hardware,
>> meaningless outside of it. It has meaning only in this one hardware
>> programming model. For humans it means nothing. For humans 6.3% means
>> something.
>>
>
> Right, This is what I have been saying will change. we don't pass the direct
> register values anymore. Instead I am saying, we pass the percentage
> multiplied by 100. For 6.3%, user will be passing 630 in device tree. for
> -2.75% user will pass (-275).
>
> Are we on the same page now?
Yes, it sounds good. Thanks!
Best regards,
Krzysztof
Powered by blists - more mailing lists