From: Andrew Lunn <andrew@lunn.ch>
To: Kyle Switch <kyle.switch@motor-comm.com>
Cc: Frank.Sae@motor-comm.com, hkallweit1@gmail.com,
linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jianmin.wang@motor-comm.com,
ming.xu@motor-comm.com, xiaolin.xu@motor-comm.com,
jie.han@motor-comm.com
Subject: Re: [PATCH] net: phy: Add driver for Motorcomm Quad 2.5GbE phy
Date: Wed, 15 Jul 2026 15:09:29 +0200 [thread overview]
Message-ID: <7f1b935d-732d-4d2f-a2c3-a0517c9301d7@lunn.ch> (raw)
In-Reply-To: <47b67113-2903-49b5-a25e-84e704ac017d@motor-comm.com>
On Wed, Jul 15, 2026 at 07:59:55PM +0800, Kyle Switch wrote:
>
>
> On 7/15/26 05:46, Andrew Lunn wrote:
> >> +static inline int ytphy_top_write(struct phy_device *phydev, u32 regnum,
> >> + u16 val)
> >> +{
> >> + struct yt8521_priv *priv = phydev->priv;
> >> + struct mii_bus *bus = phydev->mdio.bus;
> >> +
> >> + return bus->write(bus, priv->top_phy_addr, regnum, val);
> >> +}
> >
> > Please could you explain the architecture in detail. It seems like you
> > are accessing registers of some other device on the bus.
> >
> > Maybe you need to use the code in phy_package.c?
>
> Ans: YT8824 contains top extend reg space, and the addr is fixed, for
> internal phy8824 the value is 9, and external phy8824 is (baseaddr + 4).
Does the "top extend reg space" have values in the ID registers, 2 and
3? Is Linux trying to probe this address space?
Anyway, it does sound like you need to use phy_package. That will give
you a better API for accessing the registers in the other address
space.
Andrew
next prev parent reply other threads:[~2026-07-15 13:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 11:12 [PATCH] net: phy: Add driver for Motorcomm Quad 2.5GbE phy Kyle Switch
2026-07-14 21:43 ` Andrew Lunn
2026-07-15 11:56 ` Kyle Switch
2026-07-14 21:46 ` Andrew Lunn
2026-07-15 11:59 ` Kyle Switch
2026-07-15 13:09 ` Andrew Lunn [this message]
2026-07-17 3:47 ` Kyle Switch
2026-08-05 12:26 ` kernel test robot
2026-08-05 22:28 ` kernel test robot
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=7f1b935d-732d-4d2f-a2c3-a0517c9301d7@lunn.ch \
--to=andrew@lunn.ch \
--cc=Frank.Sae@motor-comm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jianmin.wang@motor-comm.com \
--cc=jie.han@motor-comm.com \
--cc=kuba@kernel.org \
--cc=kyle.switch@motor-comm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ming.xu@motor-comm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xiaolin.xu@motor-comm.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