* [PATCH] dt-bindings: net: Correct the documentation of KSZ9021 skew values
@ 2019-09-13 16:46 James Byrne
2019-09-16 14:14 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: James Byrne @ 2019-09-13 16:46 UTC (permalink / raw)
To: Rob Herring, Mark Rutland
Cc: David S . Miller, netdev, devicetree, James Byrne
The documentation of skew values for the KSZ9021 PHY was misleading
because the driver implementation followed the erroneous information
given in the original KSZ9021 datasheet before it was corrected in
revision 1.2 (Feb 2014). It is probably too late to correct the driver
now because of the many existing device trees, so instead this just
corrects the documentation to explain that what you actually get is not
what you might think when looking at the device tree.
Signed-off-by: James Byrne <james.byrne@origamienergy.com>
---
.../bindings/net/micrel-ksz90x1.txt | 32 +++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt b/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt
index 5100358177c9..b921731cd970 100644
--- a/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt
+++ b/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt
@@ -12,8 +12,36 @@ and therefore may overwrite them.
KSZ9021:
All skew control options are specified in picoseconds. The minimum
- value is 0, the maximum value is 3000, and it is incremented by 200ps
- steps.
+ value is 0, the maximum value is 3000, and it can be specified in 200ps
+ steps, *but* these values are in not fact what you get because this chip's
+ skew values actually increase in 120ps steps, starting from -840ps. The
+ incorrect values came from an error in the original KSZ9021 datasheet
+ before it was corrected in revision 1.2 (Feb 2014), but it is too late to
+ change the driver now because of the many existing device trees that have
+ been created using values that go up in increments of 200.
+
+ The following table shows the actual skew delay you will get for each of the
+ possible devicetree values, and the number that will be programmed into the
+ corresponding pad skew register:
+
+ Device Tree Value Delay Pad Skew Register Value
+ -----------------------------------------------------
+ 0 -840ps 0000
+ 200 -720ps 0001
+ 400 -600ps 0010
+ 600 -480ps 0011
+ 800 -360ps 0100
+ 1000 -240ps 0101
+ 1200 -120ps 0110
+ 1400 0ps 0111
+ 1600 120ps 1000
+ 1800 240ps 1001
+ 2000 360ps 1010
+ 2200 480ps 1011
+ 2400 600ps 1100
+ 2600 720ps 1101
+ 2800 840ps 1110
+ 3000 960ps 1111
Optional properties:
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: net: Correct the documentation of KSZ9021 skew values
2019-09-13 16:46 [PATCH] dt-bindings: net: Correct the documentation of KSZ9021 skew values James Byrne
@ 2019-09-16 14:14 ` David Miller
2019-09-16 17:40 ` James Byrne
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2019-09-16 14:14 UTC (permalink / raw)
To: james.byrne; +Cc: robh+dt, mark.rutland, netdev, devicetree
From: James Byrne <james.byrne@origamienergy.com>
Date: Fri, 13 Sep 2019 16:46:35 +0000
> The documentation of skew values for the KSZ9021 PHY was misleading
> because the driver implementation followed the erroneous information
> given in the original KSZ9021 datasheet before it was corrected in
> revision 1.2 (Feb 2014). It is probably too late to correct the driver
> now because of the many existing device trees, so instead this just
> corrects the documentation to explain that what you actually get is not
> what you might think when looking at the device tree.
>
> Signed-off-by: James Byrne <james.byrne@origamienergy.com>
What tree should this go into?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: net: Correct the documentation of KSZ9021 skew values
2019-09-16 14:14 ` David Miller
@ 2019-09-16 17:40 ` James Byrne
2019-09-20 1:30 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: James Byrne @ 2019-09-16 17:40 UTC (permalink / raw)
To: David Miller; +Cc: robh+dt, mark.rutland, netdev, devicetree
On 16/09/2019 15:14, David Miller wrote:
> From: James Byrne <james.byrne@origamienergy.com>
> Date: Fri, 13 Sep 2019 16:46:35 +0000
>
>> The documentation of skew values for the KSZ9021 PHY was misleading
>> because the driver implementation followed the erroneous information
>> given in the original KSZ9021 datasheet before it was corrected in
>> revision 1.2 (Feb 2014). It is probably too late to correct the driver
>> now because of the many existing device trees, so instead this just
>> corrects the documentation to explain that what you actually get is not
>> what you might think when looking at the device tree.
>>
>> Signed-off-by: James Byrne <james.byrne@origamienergy.com>
>
> What tree should this go into?
I believe this should go into the 'net' tree, but please let me know if
I have submitted this patch incorrectly in some way.
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: net: Correct the documentation of KSZ9021 skew values
2019-09-16 17:40 ` James Byrne
@ 2019-09-20 1:30 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2019-09-20 1:30 UTC (permalink / raw)
To: James Byrne; +Cc: David Miller, robh+dt, mark.rutland, netdev, devicetree
On Mon, 16 Sep 2019 17:40:35 +0000, James Byrne wrote:
> On 16/09/2019 15:14, David Miller wrote:
> > From: James Byrne <james.byrne@origamienergy.com>
> > Date: Fri, 13 Sep 2019 16:46:35 +0000
> >
> >> The documentation of skew values for the KSZ9021 PHY was misleading
> >> because the driver implementation followed the erroneous information
> >> given in the original KSZ9021 datasheet before it was corrected in
> >> revision 1.2 (Feb 2014). It is probably too late to correct the driver
> >> now because of the many existing device trees, so instead this just
> >> corrects the documentation to explain that what you actually get is not
> >> what you might think when looking at the device tree.
> >>
> >> Signed-off-by: James Byrne <james.byrne@origamienergy.com>
> >
> > What tree should this go into?
>
> I believe this should go into the 'net' tree, but please let me know if
> I have submitted this patch incorrectly in some way.
Okay, applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-20 1:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 16:46 [PATCH] dt-bindings: net: Correct the documentation of KSZ9021 skew values James Byrne
2019-09-16 14:14 ` David Miller
2019-09-16 17:40 ` James Byrne
2019-09-20 1:30 ` Jakub Kicinski
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).