From: Andrew Lunn <andrew@lunn.ch>
To: "Ramón Nordin Rodriguez" <ramon.nordin.rodriguez@ferroamp.se>
Cc: 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,
parthiban.veerasooran@microchip.com
Subject: Re: [PATCH net 0/1] phy: microchip_t1s: lan865x rev.b1 support
Date: Fri, 24 May 2024 16:50:45 +0200 [thread overview]
Message-ID: <99f56020-9293-4e6b-8c2a-986af8c3dd79@lunn.ch> (raw)
In-Reply-To: <20240524140706.359537-1-ramon.nordin.rodriguez@ferroamp.se>
> Far as I can tell the phy-driver cannot access some of the regs necessary
> for probing the hardware and performing the init/fixup without going
> over the spi interface.
> The MMDCTRL register (used with indirect access) can address
>
> * PMA - mms 3
> * PCS - mms 2
> * Vendor specific / PLCA - mms 4
>
> This driver needs to access mms (memory map seleector)
> * mac registers - mms 1,
> * vendor specific / PLCA - mms 4
> * vencor specific - mms 10
In general, a MAC should not be touching the PHY, and the PHY should
not be touching the MAC. This rule is because you should not assume
you have a specific MAC+PHY pair. However, this is one blob of
silicon, so we can relax that a bit if needed.
So it sounds like Microchip have mixed up the register address spaces
:-(
I guess this also means there is no discrete version of this PHY,
because where would these registers be?
Do any of the registers in the wrong address space need to be poked at
runtime? By that i mean config_aneg(), read_status(). Or are they only
needed around the time the PHY is probed?
How critical is the ordering? Could we have the Microchip MAC driver
probe. It instantiates the TC6 framework which registers the MDIO bus
and probes the PHY. Can the MAC driver then complete the PHY setup
using the registers in the wrong address space? Does it need to access
any PHY registers in the correct address space? The MAC driver should
be able to do this before phy_start()
Does MMS 0 register 1 "PHY Identification Register" give enough
information to know it is a B1 PHY? The standard suggests it is a
straight copy of PHY registers 2 and 3. So the MAC driver does not
need to touch PHY registers, we are not totally violating the
layering...
Andrew
next prev parent reply other threads:[~2024-05-24 14:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 14:07 Ramón Nordin Rodriguez
2024-05-24 14:07 ` [PATCH 1/1] net: phy: microchip_t1s: enable lan865x revb1 Ramón Nordin Rodriguez
2024-05-24 15:11 ` Russell King (Oracle)
2024-05-27 5:37 ` [EXTERNAL] " Sai Krishna Gajula
2024-05-24 14:50 ` Andrew Lunn [this message]
2024-05-27 9:48 ` [PATCH net 0/1] phy: microchip_t1s: lan865x rev.b1 support Parthiban.Veerasooran
2024-05-24 15:30 ` Russell King (Oracle)
2024-05-27 9:54 ` Parthiban.Veerasooran
2024-05-27 8:21 ` Parthiban.Veerasooran
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=99f56020-9293-4e6b-8c2a-986af8c3dd79@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parthiban.veerasooran@microchip.com \
--cc=ramon.nordin.rodriguez@ferroamp.se \
/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®