All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Parthiban.Veerasooran@microchip.com>
To: <andrew@lunn.ch>, <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>
Subject: Re: [PATCH net 0/1] phy: microchip_t1s: lan865x rev.b1 support
Date: Mon, 27 May 2024 09:48:10 +0000	[thread overview]
Message-ID: <70c0b4d2-c947-499b-8263-ea7f08f853e3@microchip.com> (raw)
In-Reply-To: <99f56020-9293-4e6b-8c2a-986af8c3dd79@lunn.ch>

Hi Andrew,

On 24/05/24 8:20 pm, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
>> 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...
I completely agree with all your above points. As I told already, I am 
in talk with our design team about this complications by the time this 
Rev.B1 support has been posted. Will try to get the clarity as soon as 
possible. Sorry for the inconvenience.

So I would recommend to go with Rev.B0 support now as "CD disable if 
PLCA is enabled" fix which gives stable performance until we get the 
clarity on B1. So that we can evaluate the TC6 framework (oa_tc6.c) to 
have a initial/basic version in the mainline first.

Best regards,
Parthiban V
> 
>          Andrew
> 


  reply	other threads:[~2024-05-27  9:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24 14:07 [PATCH net 0/1] phy: microchip_t1s: lan865x rev.b1 support 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 ` [PATCH net 0/1] phy: microchip_t1s: lan865x rev.b1 support Andrew Lunn
2024-05-27  9:48   ` Parthiban.Veerasooran [this message]
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=70c0b4d2-c947-499b-8263-ea7f08f853e3@microchip.com \
    --to=parthiban.veerasooran@microchip.com \
    --cc=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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.