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: <95b4afd4-c93e-628b-fd22-6fcbc1d1234e@linaro.org>
Date:   Fri, 7 Apr 2023 11:03:42 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Johannes Zink <j.zink@...gutronix.de>, vkoul@...nel.org,
        kishon@...nel.org, shawnguo@...nel.org, s.hauer@...gutronix.de,
        kernel@...gutronix.de, festevam@...il.com, linux-imx@....com,
        robh+dt@...nel.org, 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

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

> 
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
>>> 16]
>>> +
>>> +  fsl,phy-tx-rise-tune:
>>> +    description:
>>> +      HS Transmitter Rise/Fall Time Adjustment
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    enum: [0, 1, 2, 3]
>>> +
>>> +  fsl,phy-tx-preemp-amp-tune:
>>> +    description:
>>> +      HS Transmitter Pre-Emphasis Current Control
>>
>> If this is current then use standard unit suffixes.
> 
> According to the datasheet this is in "unit amonts" of 600uA, basically
> 0x600uA, 1x600uA etc. Should I just suffix it with uA then?

Yes
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml

The register values can work sometimes fine but also do not scale at
all. For any other variant all the meanings will differ. Any other IMX8
phy will need new bindings and new description/values for your
register-like-fields.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ