diff mbox series

[v2,2/7] dt-bindings: phy: mediatek,tphy: add property to set pre-emphasis

Message ID 20220829080830.5378-2-chunfeng.yun@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/7] dt-bindings: phy: mediatek,tphy: add support type of SGMII | expand

Commit Message

Chunfeng Yun (云春峰) Aug. 29, 2022, 8:08 a.m. UTC
Add a property to set usb2 phy's pre-emphasis, which used to widen eye
opening and boost eye swing.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v2: Add more description suggested by Krzysztof
---
 .../devicetree/bindings/phy/mediatek,tphy.yaml         | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Krzysztof Kozlowski Aug. 30, 2022, 5:38 p.m. UTC | #1
On 29/08/2022 11:08, Chunfeng Yun wrote:
> Add a property to set usb2 phy's pre-emphasis, which used to widen eye
> opening and boost eye swing.
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2: Add more description suggested by Krzysztof
> ---
>  .../devicetree/bindings/phy/mediatek,tphy.yaml         | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
> index 848edfb1f677..e0754fb44451 100644
> --- a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
> +++ b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
> @@ -219,6 +219,16 @@ patternProperties:
>          minimum: 1
>          maximum: 15
>  
> +      mediatek,pre-emphasis:
> +        description:
> +          The level of pre-emphasis which used to widen the eye opening and
> +          boost eye swing, the unit step is about 4.16% increment; e.g. the
> +          level 1 means amplitude increases about 4.16%, the level 2 is about
> +          8.3% etc. (U2 phy)
> +        $ref: /schemas/types.yaml#/definitions/uint32

As I proposed - use instead common units. Since only three values are
allowed - make it an enum. These bindings are expected to be
usable/applicable on several devices, so units, not register values
which can change between devices, are the proper and reliable way to
describe a feature.


Best regards,
Krzysztof
Chunfeng Yun (云春峰) Aug. 31, 2022, 3:14 a.m. UTC | #2
On Tue, 2022-08-30 at 20:38 +0300, Krzysztof Kozlowski wrote:
> On 29/08/2022 11:08, Chunfeng Yun wrote:
> > Add a property to set usb2 phy's pre-emphasis, which used to widen
> > eye
> > opening and boost eye swing.
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > v2: Add more description suggested by Krzysztof
> > ---
> >  .../devicetree/bindings/phy/mediatek,tphy.yaml         | 10
> > ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
> > b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
> > index 848edfb1f677..e0754fb44451 100644
> > --- a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
> > @@ -219,6 +219,16 @@ patternProperties:
> >          minimum: 1
> >          maximum: 15
> >  
> > +      mediatek,pre-emphasis:
> > +        description:
> > +          The level of pre-emphasis which used to widen the eye
> > opening and
> > +          boost eye swing, the unit step is about 4.16% increment;
> > e.g. the
> > +          level 1 means amplitude increases about 4.16%, the level
> > 2 is about
> > +          8.3% etc. (U2 phy)
> > +        $ref: /schemas/types.yaml#/definitions/uint32
> 
> As I proposed - use instead common units. 
As explained before, no units for these value.

> Since only three values are
> allowed - make it an enum. 
Ok,

> These bindings are expected to be
> usable/applicable on several devices, so units, not register values
> which can change between devices, are the proper and reliable way to
> describe a feature.
I prefer to use exact level values, but not the inexact values with
units (e.g. -percent, -microvolt).

Thanks a lot

> 
> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski Aug. 31, 2022, 6:02 a.m. UTC | #3
On 31/08/2022 06:14, Chunfeng Yun wrote:
>> These bindings are expected to be
>> usable/applicable on several devices, so units, not register values
>> which can change between devices, are the proper and reliable way to
>> describe a feature.
> I prefer to use exact level values, but not the inexact values with
> units (e.g. -percent, -microvolt).

What stops you from using exact values - bp?

Best regards,
Krzysztof
Chunfeng Yun (云春峰) Sept. 9, 2022, 3:07 a.m. UTC | #4
On Wed, 2022-08-31 at 09:02 +0300, Krzysztof Kozlowski wrote:
> On 31/08/2022 06:14, Chunfeng Yun wrote:
> > > These bindings are expected to be
> > > usable/applicable on several devices, so units, not register
> > > values
> > > which can change between devices, are the proper and reliable way
> > > to
> > > describe a feature.
> > 
> > I prefer to use exact level values, but not the inexact values with
> > units (e.g. -percent, -microvolt).
> 
> What stops you from using exact values - bp?
See reply for the first series, thanks

> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski Sept. 9, 2022, 7:11 a.m. UTC | #5
On 09/09/2022 05:07, Chunfeng Yun wrote:
> On Wed, 2022-08-31 at 09:02 +0300, Krzysztof Kozlowski wrote:
>> On 31/08/2022 06:14, Chunfeng Yun wrote:
>>>> These bindings are expected to be
>>>> usable/applicable on several devices, so units, not register
>>>> values
>>>> which can change between devices, are the proper and reliable way
>>>> to
>>>> describe a feature.
>>>
>>> I prefer to use exact level values, but not the inexact values with
>>> units (e.g. -percent, -microvolt).
>>
>> What stops you from using exact values - bp?
> See reply for the first series, thanks

Not in my inbox anymore.


Best regards,
Krzysztof
Krzysztof Kozlowski Sept. 9, 2022, 8:27 a.m. UTC | #6
On 29/08/2022 10:08, Chunfeng Yun wrote:
> Add a property to set usb2 phy's pre-emphasis, which used to widen eye
> opening and boost eye swing.
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2: Add more description suggested by Krzysztof
> ---
>  .../devicetree/bindings/phy/mediatek,tphy.yaml         | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
index 848edfb1f677..e0754fb44451 100644
--- a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
+++ b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
@@ -219,6 +219,16 @@  patternProperties:
         minimum: 1
         maximum: 15
 
+      mediatek,pre-emphasis:
+        description:
+          The level of pre-emphasis which used to widen the eye opening and
+          boost eye swing, the unit step is about 4.16% increment; e.g. the
+          level 1 means amplitude increases about 4.16%, the level 2 is about
+          8.3% etc. (U2 phy)
+        $ref: /schemas/types.yaml#/definitions/uint32
+        minimum: 1
+        maximum: 3
+
       mediatek,bc12:
         description:
           Specify the flag to enable BC1.2 if support it