lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6953b608-973f-c603-f852-edf7ba183e64@pengutronix.de>
Date:   Wed, 12 Apr 2023 16:32:06 +0200
From:   Johannes Zink <j.zink@...gutronix.de>
To:     Rob Herring <robh@...nel.org>
Cc:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        vkoul@...nel.org, kishon@...nel.org, shawnguo@...nel.org,
        s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
        linux-imx@....com, krzysztof.kozlowski+dt@...aro.org,
        jun.li@....com, haibo.chen@....com, linux-phy@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: phy: imx8mq-usb: add phy tuning
 properties

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@...gutronix.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.

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    |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ