devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Zink <j.zink@pengutronix.de>
To: Rob Herring <robh@kernel.org>
Cc: kishon@kernel.org, devicetree@vger.kernel.org,
	krzysztof.kozlowski+dt@linaro.org, festevam@gmail.com,
	s.hauer@pengutronix.de, vkoul@kernel.org, haibo.chen@nxp.com,
	linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	linux-imx@nxp.com, kernel@pengutronix.de,
	linux-phy@lists.infradead.org, shawnguo@kernel.org,
	linux-arm-kernel@lists.infradead.org, jun.li@nxp.com
Subject: Re: [PATCH 1/2] dt-bindings: phy: imx8mq-usb: add phy tuning properties
Date: Tue, 18 Apr 2023 11:42:58 +0200	[thread overview]
Message-ID: <67d283f3-d0db-5fc0-79e9-e7531d591aab@pengutronix.de> (raw)
In-Reply-To: <6953b608-973f-c603-f852-edf7ba183e64@pengutronix.de>

Hi Rob, hi Krzysztof,

On 4/12/23 16:32, Johannes Zink wrote:
> Hi Rob,
> 
> On 4/12/23 15:39, Rob Herring wrote:
>> On Tue, Apr 11, 2023 at 04:22:37PM +0200, Johannes Zink wrote:
>>> Hi Krzystof,
>>>
>>> thank you for your explanations. As I'm still quite new to writing
>>> bindings, I still have some questions:
>>>
>>> On Fri, 2023-04-07 at 11:03 +0200, Krzysztof Kozlowski wrote:
>>>> On 05/04/2023 14:14, Johannes Zink wrote:
>>>>> Hi Krysztof,
>>>>>
>>>>> thanks for your review, please find my questions below.
>>>>>
>>>>> On Wed, 2023-04-05 at 13:51 +0200, Krzysztof Kozlowski wrote:
>>>>>> [snip]
>>>>>>>         A phandle to the regulator for USB VBUS.
>>>>>>> +  fsl,phy-tx-vref-tune:
>>>>>>> +    description:
>>>>>>> +      HS DC Voltage level adjustment
>>>>>>
>>>>>> "Level" in what units?
>>>>>>
>>>>>
>>>>> The datasheet just shows percent, ranging from -6 to +24%, in 2%
>>>>> increments. What unit would you suggest?
>>>>
>>>> percent
>>>> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
>>>
>>> I am still a bit confused how to use this properly. How can I restrict
>>> the values to multiples of 2 in order to avoid illegal values?
>>>
>>> At the moment the only thing I could come up with is something like
>>>
>>> fsl,phy-tx-vref-tune-percent:
>>>    description: |
>>>      Adjusts the high-speed DC level voltage
>>>    $ref: /schemas/types.yaml#/definitions/int32
>>
>> Note that with standard unit suffixes, you don't need a type.
>>
>>>    minimum: -6
>>>    maximum: 24
>>>    default: 0
>>>
>>> Does something like this work? I am not quite sure if I am on the right
>>> track here, especially as this requires a signed int, of which I have
>>> not seen many examples so far.
>>
>> We'd have to change the type for -percent to signed. That's possible,
>> but for vendor specific properties there's not much advantage to use
>> standard units instead of just using the register values directly.
>>
> 
> I don't have any objections to that, this is pretty much what I sent in 
> my v1 patch <20230405112118.1256151-2-j.zink@pengutronix.de>, but 
> Krzysztof requested to change the vendor specific properties to use 
> property-units.
> 
> Would something along the lines of the st,trim-hs-current on 
> Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml be 
> acceptable (i.e. use an enum and annotate the meaning of the values in 
> the description)?
> 
> I will, nevertheless, try to make the descriptions a bit more verbose in 
> my v2 (wherever the datasheet gives me proper informations), as 
> Krzysztof requested.

gentle ping - any opinions on this? Shall I just send a V2 along the 
lines of the phy-stm32-usbphy.c?

Best regards
Johannes

> 
> Best regards
> Johannes
> 
>> Rob
>>
> 

-- 
Pengutronix e.K.                | Johannes Zink                  |
Steuerwalder Str. 21            | https://www.pengutronix.de/    |
31137 Hildesheim, Germany       | Phone: +49-5121-206917-0       |
Amtsgericht Hildesheim, HRA 2686| Fax:   +49-5121-206917-5555    |


  reply	other threads:[~2023-04-18  9:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 11:21 [PATCH 0/2] Add phy tuning support for imx8mq-usb Johannes Zink
2023-04-05 11:21 ` [PATCH 1/2] dt-bindings: phy: imx8mq-usb: add phy tuning properties Johannes Zink
2023-04-05 11:51   ` Krzysztof Kozlowski
2023-04-05 12:14     ` Johannes Zink
2023-04-07  9:03       ` Krzysztof Kozlowski
2023-04-11 14:22         ` Johannes Zink
2023-04-11 14:59           ` Jun Li
2023-04-11 15:22             ` Johannes Zink
2023-04-26 10:23               ` Jun Li
2023-04-12 13:39           ` Rob Herring
2023-04-12 14:32             ` Johannes Zink
2023-04-18  9:42               ` Johannes Zink [this message]
2023-05-04  7:32                 ` Johannes Zink
2023-05-04  8:13                   ` Krzysztof Kozlowski
2023-04-05 11:21 ` [PATCH 2/2] phy: fsl-imx8mp-usb: add support for phy tuning Johannes Zink

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67d283f3-d0db-5fc0-79e9-e7531d591aab@pengutronix.de \
    --to=j.zink@pengutronix.de \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=haibo.chen@nxp.com \
    --cc=jun.li@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=kishon@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).