linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@seco.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "Vinod Koul" <vkoul@kernel.org>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	linux-phy@lists.infradead.org,
	"Madalin Bucur" <madalin.bucur@nxp.com>,
	linux-arm-kernel@lists.infradead.org,
	"Camelia Alexandra Groza" <camelia.groza@nxp.com>,
	devicetree@vger.kernel.org, "Rob Herring" <robh+dt@kernel.org>,
	linuxppc-dev@lists.ozlabs.org,
	"Bagas Sanjaya" <bagasdotme@gmail.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Ioana Ciornei" <ioana.ciornei@nxp.com>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Fernández Rojas" <noltari@gmail.com>,
	"Jonas Gorski" <jonas.gorski@gmail.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Li Yang" <leoyang.li@nxp.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Stephen Boyd" <sboyd@kernel.org>,
	linux-clk@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes
Date: Mon, 12 Jun 2023 16:46:16 -0400	[thread overview]
Message-ID: <1dd01fe2-08a8-ec2f-1184-a58b2f55ba85@seco.com> (raw)
In-Reply-To: <20230612163353.dwouatvqbuo6h4ea@skbuf>

On 6/12/23 12:33, Vladimir Oltean wrote:
> On Mon, Jun 12, 2023 at 10:35:21AM -0400, Sean Anderson wrote:
>> > And if SERDES protocol switching was not physically possible, would this
>> > patch set still have value?

More to the point, did you make any progress in this area?

>> Yes. To e.g. set up SGMII25 or to fix the clocking situation.
> 
> Let me analyze the reasons one by one.
> 
> The clocking situation only exists due to a hope that protocol changing
> would be possible. If you were sure it wasn't possible, your board would
> have had refclks set up for protocol 3333 via the supported PLL mapping 2222.
> In essence, I consider this almost a non-argument, as it fixes a
> self-inflicted problem.

2222 also does not work, as outlined above.

The clocking is incompatible, and must be fixed by software.

The only thing self-inflicted is NXP's conflicting design.

> Have you actually tested changing individual lanes from SGMII to SGMII 2.5?
> I know it works on LS1028A, but I don't know if that's also true on LS1046A.
> Your comments do say "LYNX_PROTO_SGMII25, /* Not tested */".

Not yet. 

This driver would also be a good place to add the KR link training with
NXP tried to upstream a few years ago.

> Assuming a start from SERDES protocol 3333 with PLL mapping 2222,
> this protocol change implies powering on PLL 1 (reset state machine
> wants it to be disabled) and moving those lanes from PLL 2 to PLL 1.
> 
> At first sight you might appear to have a point related to the fact that
> PLL register writes are necessary, and thus this whole shebang is necessary.
> But this can all be done using PBI commands, with the added benefit that
> U-Boot can also use those SERDES networking ports, and not just Linux.
> You can use the RCW+PBL specific to your board to inform the SoC that
> your platform's refclk 1 is 156 MHz (something which the reset state
> machine seems unable to learn, with protocol 0x3333). You don't have to
> put that in the device tree. You don't have to push code to any open
> source project to expose your platform specific details. Then, just like
> in the case of the Lynx 28G driver on LX2160, the SERDES driver could
> just treat the PLL configuration as read-only, which would greatly
> simplify things and eliminate the need for a clk driver.
> 
> Here is an illustrative example (sorry, I don't have a board with the
> right refclk on that PLL, to verify all the way):
> 
> ... snip ...

(which of course complicates the process of building the PBIs...)

> In short, I believe the reasons you have cited do not justify the
> complexity of the solution that you propose.

The work is done, and it is certainly more flexible than what you
propose. E.g. imagine a clock which needs to be configured before it has
the correct frequency. Such a thing is difficult to do in a PBI solution,
but is trivial in Linux.

--Sean

  reply	other threads:[~2023-06-12 20:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 16:05 [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes Sean Anderson
2023-04-13 16:05 ` [PATCH v14 07/15] phy: fsl: Add Lynx 10G SerDes driver Sean Anderson
2023-05-08  9:22   ` Vinod Koul
2023-05-08 15:28     ` Sean Anderson
2023-05-16 13:36       ` Vinod Koul
2023-05-16 15:12         ` Sean Anderson
2023-04-25 19:50 ` [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes Vladimir Oltean
2023-04-25 20:22   ` Sean Anderson
2023-04-26 10:51     ` Vladimir Oltean
2023-04-26 14:50       ` Sean Anderson
2023-04-29 17:24         ` Vladimir Oltean
2023-05-01 15:03           ` Sean Anderson
2023-05-22 14:42             ` Sean Anderson
2023-05-22 15:00               ` Vladimir Oltean
2023-06-09 19:19                 ` Sean Anderson
2023-06-10 22:21                   ` Vladimir Oltean
2023-06-12 14:35                     ` Sean Anderson
2023-06-12 16:33                       ` Vladimir Oltean
2023-06-12 20:46                         ` Sean Anderson [this message]
2023-06-13 14:27                           ` Vladimir Oltean
2023-08-10 10:26                             ` Vladimir Oltean
2023-08-10 19:58                               ` Sean Anderson
2023-08-11 16:12                                 ` Vladimir Oltean
2023-09-13 22:02                                 ` Vladimir Oltean
2023-08-11 15:08                             ` Vladimir Oltean
2023-08-11 15:43                               ` Sean Anderson
2023-08-11 16:36                                 ` Vladimir Oltean
2023-08-21 12:49                                   ` Vladimir Oltean
2023-08-21 17:45                                     ` Sean Anderson
2023-08-21 18:13                                       ` Ioana Ciornei
2023-08-21 18:20                                         ` Vladimir Oltean
2023-08-21 18:46                                         ` Sean Anderson
2023-08-21 19:58                                           ` Vladimir Oltean
2023-08-21 21:06                                             ` Sean Anderson
2023-08-21 22:48                                               ` Vladimir Oltean
2023-08-21 23:39                                                 ` Sean Anderson
2023-08-21 23:59                                                   ` Vladimir Oltean
2023-08-24 22:09                                                     ` Sean Anderson
2023-08-25 14:43                                                       ` Vladimir Oltean
2023-08-22 14:55                                           ` Ioana Ciornei
2023-08-24 20:54                                             ` Sean Anderson

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=1dd01fe2-08a8-ec2f-1184-a58b2f55ba85@seco.com \
    --to=sean.anderson@seco.com \
    --cc=bagasdotme@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=camelia.groza@nxp.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=jonas.gorski@gmail.com \
    --cc=kishon@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leoyang.li@nxp.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@nxp.com \
    --cc=mturquette@baylibre.com \
    --cc=noltari@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /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).