From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Kyle Hendry <kylehendrydev@gmail.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] net: dsa: b53: Enable internal GPHY on BCM63268
Date: Mon, 10 Feb 2025 00:30:36 +0100 [thread overview]
Message-ID: <aa8fefa0-c5ba-4bb0-9e45-6b0ac4cfbacc@lunn.ch> (raw)
In-Reply-To: <318e8b95-4ef8-43ca-a19d-129372a9dc48@gmail.com>
On Fri, Feb 07, 2025 at 08:44:31AM -0800, Florian Fainelli wrote:
> On 2/6/25 17:41, Kyle Hendry wrote:
> >
> > On 2025-02-06 12:17, Andrew Lunn wrote:
> > > On Thu, Feb 06, 2025 at 10:15:50AM -0800, Florian Fainelli wrote:
> > > > Hi Kyle,
> > > >
> > > > On 2/5/25 20:30, Kyle Hendry wrote:
> > > > > Some BCM63268 bootloaders do not enable the internal PHYs by default.
> > > > > This patch series adds functionality for the switch driver to
> > > > > configure the gigabit ethernet PHY.
> > > > >
> > > > > Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
> > > > So the register address you are manipulating logically belongs
> > > > in the GPIO
> > > > block (GPIO_GPHY_CTRL) which has become quite a bit of a sundry here. I
> > > > don't have a strong objection about the approach picked up here
> > > > but we will
> > > > need a Device Tree binding update describing the second (and optional)
> > > > register range.
> > > Despite this being internal, is this actually a GPIO? Should it be
> > > modelled as a GPIO line connected to a reset input on the PHY? It
> > > would then nicely fit in the existing phylib handling of a PHY with a
> > > GPIO reset line?
> > >
> > > Andrew
> > The main reason I took this approach is because a SF2 register has
> > similar bits and I wanted to be consistent with that driver. If it
> > makes more sense to treat these bits as GPIOs/clocks/resets then it
> > would make the implementation simpler.
>
> I don't think there is a need to go that far, and I don't think any of those
> abstractions work really well in the sense that they are neither clocks, nor
> resets, nor GPIOs, they are just enable bits for the power gating logic of
> the PHY, power domains would be the closest to what this is, but this is a
> very heavy handed approach with little benefit IMHO.
O.K. The naming is not particularly helpful. It is in the GPIO block,
and named GPIO_GPHY_CTRL so it kind of sounds like a GPIO. If the
existing GPIO driver could expose it as a GPIO it would of been a lot
simpler.
If the SF2 has similar bits, could the SF2 code be shared?
Andrew
next prev parent reply other threads:[~2025-02-09 23:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 4:30 Kyle Hendry
2025-02-06 4:30 ` [PATCH 1/4] net: dsa: b53: Indicate which BCM63268 port is GPHY Kyle Hendry
2025-02-06 4:30 ` [PATCH 2/4] net: dsa: b53: mmap: Add gphy control register as a resource Kyle Hendry
2025-02-06 4:30 ` [PATCH 3/4] net: dsa: b53: Add phy_enable(), phy_disable() methods Kyle Hendry
2025-02-06 4:30 ` [PATCH 4/4] net: dsa: b53: mmap: Implement phy_enable for BCM63268 gphy Kyle Hendry
2025-02-06 18:15 ` [PATCH 0/4] net: dsa: b53: Enable internal GPHY on BCM63268 Florian Fainelli
2025-02-06 20:17 ` Andrew Lunn
2025-02-07 1:41 ` Kyle Hendry
2025-02-07 16:44 ` Vladimir Oltean
2025-02-07 16:44 ` Florian Fainelli
2025-02-09 23:30 ` Andrew Lunn [this message]
2025-02-10 17:25 ` Florian Fainelli
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=aa8fefa0-c5ba-4bb0-9e45-6b0ac4cfbacc@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=kuba@kernel.org \
--cc=kylehendrydev@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®