From: Andrew Lunn <andrew@lunn.ch>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC] option to use proper skew timings for Micrel KSZ9021
Date: Fri, 11 Nov 2022 15:25:05 +0100 [thread overview]
Message-ID: <Y25bQfVwPZDT4T5D@lunn.ch> (raw)
In-Reply-To: <0b22ce6a-97b5-2784-fb52-7cbae8be39b0@mev.co.uk>
> 1. Forward planning to replace KSZ9021 with KSZ9031 in a future hardware
> iteration. As long as the device tree and kernel driver (and possibly the
> bootloader if it uses the same device tree blob as the kernel internally)
> are upgraded at the same time, software upgrades of existing hardware with
> KSZ9021 will continue to work correctly. Upgraded hardware with KSZ9031
> will work properly with the updated software.
>
> 2. Due to KSZ9031 chip shortages, it may be useful to replace KSZ9031 with
> KSZ9021 for a few manufacturing runs. This can be done as long as the
> device tree and driver are updated to know about the new property in time
> for those manufacturing runs.
>
> In both cases, the skew timings chosen would need to apply to both KSZ9021
> and KSZ9031.
So you are saying that as it is pin compatible ( i assume), you can
swap the PHY and still call it the same board, and still use the same
device tree blob.
If you are going to do this, i think you really should fix all the
bugs, not just the step. KSZ9021 has an offset of -840ps. KSZ9031 has
an offset of -900ps. So both are broke, in that the skew is expected
to be a signed value, 0 meaning 0.
I would suggest a bool property something like:
micrel,skew-equals-real-picoseconds
and you need to update the documentation in a way it is really clear
what is going on.
I would also consider adding a phydev_dbg() which prints the actual ps
skew being used, with/without the bug.
And since you are adding more foot guns, please validate the values in
DT as strictly as possible, without breaking the existing binding.
Andrew
next prev parent reply other threads:[~2022-11-11 14:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 12:50 [RFC] option to use proper skew timings for Micrel KSZ9021 Ian Abbott
2022-11-09 17:27 ` Andrew Lunn
2022-11-11 10:34 ` Ian Abbott
2022-11-11 14:25 ` Andrew Lunn [this message]
2022-11-11 17:34 ` Ian Abbott
2022-11-11 17:53 ` Andrew Lunn
2022-11-11 19:03 ` Ian Abbott
2022-11-11 19:35 ` Andrew Lunn
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=Y25bQfVwPZDT4T5D@lunn.ch \
--to=andrew@lunn.ch \
--cc=abbotti@mev.co.uk \
--cc=netdev@vger.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).