devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Ante Knezic <ante.knezic@helmholz.de>,
	conor+dt@kernel.org, UNGLinuxDriver@microchip.com,
	davem@davemloft.net, devicetree@vger.kernel.org,
	edumazet@google.com, f.fainelli@gmail.com,
	krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org,
	linux-kernel@vger.kernel.org, marex@denx.de,
	netdev@vger.kernel.org, pabeni@redhat.com, robh+dt@kernel.org,
	woojung.huh@microchip.com
Subject: Re: [PATCH net-next v4 2/2] net:dsa:microchip: add property to select
Date: Thu, 2 Nov 2023 12:44:04 +0200	[thread overview]
Message-ID: <20231102104404.c5vsnduro232jdoq@skbuf> (raw)
In-Reply-To: <20231031072847.GP3803936@pengutronix.de>

On Tue, Oct 31, 2023 at 08:28:47AM +0100, Oleksij Rempel wrote:
> Transferring these issues to KSZ8863, we might face difficulties configuring
> STMMAC if KSZ8863, acting as the clock provider, isn't enabled early before MAC
> driver probing, a tricky scenario in the DSA framework.

So for each driver, there are 2 components to using CCF for MAC/PHY
interface clocks, one is providing what you have, and the other is
requesting what you need.

To avoid circular dependencies, we should make the clock provider per
DSA port be independent of the DSA driver itself. That is because, as
you point out in your example, the conduit interface (stmmac) may depend
on a clock provided by the switch, but the switch also depends on the
conduit being fully probed.

Stronger separation / more granular dependencies was one reason why I
wanted for more DSA drivers to follow Colin Foster's suit, but I stopped
working on that too:
https://lore.kernel.org/lkml/20221222134844.lbzyx5hz7z5n763n@skbuf/

but in the case of interface clocks, the separation is not so clear.
I would expect that for most if not all switches, the interface clock is
implicitly provided by enabling and configuring the respective MAC, the
same MAC that is intrinsically controlled through phylink by the main
DSA (switching IP) driver. So we have 2 APIs for controlling the same
piece of hardware, I'm not sure how conflicting requests are supposed to
be resolved.

This piece of the puzzle is quite complicated to fit into the larger
architecture in a coherent way, although I'm not arguing that there will
also be benefits.

  reply	other threads:[~2023-11-02 10:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 14:25 [PATCH net-next v4 0/2] net: dsa: microchip: enable setting rmii reference Ante Knezic
2023-10-20 14:25 ` [PATCH net-next v4 1/2] dt-bindings: net: microchip,ksz: document microchip,rmii-clk-internal Ante Knezic
2023-10-20 15:45   ` Conor Dooley
2023-10-20 14:25 ` [PATCH net-next v4 2/2] net: dsa: microchip: add property to select internal RMII reference clock Ante Knezic
2023-10-20 14:37   ` Vladimir Oltean
2023-10-23  7:27     ` [PATCH net-next v4 2/2] net:dsa:microchip: add property to select Ante Knezic
2023-10-23  7:58       ` Oleksij Rempel
2023-10-23  8:22         ` Ante Knezic
2023-10-23  8:41           ` Oleksij Rempel
2023-10-23  8:57             ` Ante Knezic
2023-10-23 11:49               ` Oleksij Rempel
2023-10-23 12:41                 ` Ante Knezic
2023-10-23 14:36                   ` Oleksij Rempel
2023-10-24  7:56                     ` Ante Knezic
2023-10-24 10:09                       ` Oleksij Rempel
2023-10-24 13:08                         ` Ante Knezic
2023-10-24 14:24                           ` Oleksij Rempel
2023-10-27  6:37                             ` Ante Knezic
2023-10-30 17:42                               ` Vladimir Oltean
2023-10-31  1:00                                 ` Andrew Lunn
2023-10-31  7:28                                   ` Oleksij Rempel
2023-11-02 10:44                                     ` Vladimir Oltean [this message]
2023-10-31  6:27                                 ` Oleksij Rempel
2023-10-23 12:19       ` Vladimir Oltean
2023-10-23 12:46         ` Ante Knezic

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=20231102104404.c5vsnduro232jdoq@skbuf \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=ante.knezic@helmholz.de \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=woojung.huh@microchip.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).