linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: "Voon, Weifeng" <weifeng.voon@intel.com>,
	"David S . Miller" <davem@davemloft.net>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	"Ong, Boon Leong" <boon.leong.ong@intel.com>
Subject: RE: [RFC,net-next,v1, 1/1] net: stmmac: Enable SERDES power up/down sequence
Date: Mon, 23 Mar 2020 08:53:28 +0000	[thread overview]
Message-ID: <BN8PR12MB326606DE1FEB055B7361A939D3F00@BN8PR12MB3266.namprd12.prod.outlook.com> (raw)
In-Reply-To: <BYAPR11MB27575EF05D65A8AA9AF4128488F00@BYAPR11MB2757.namprd11.prod.outlook.com>

From: Voon, Weifeng <weifeng.voon@intel.com>
Date: Mar/23/2020, 08:16:29 (UTC+00:00)

> > > This patch is to enable Intel SERDES power up/down sequence. The
> > > SERDES converts 8/10 bits data to SGMII signal. Below is an example of
> > > HW configuration for SGMII mode. The SERDES is located in the PHY IF
> > > in the diagram below.
> > >
> > > <-----------------GBE Controller---------->|<--External PHY chip-->
> > > +----------+         +----+            +---+           +----------+
> > > |   EQoS   | <-GMII->| DW | < ------ > |PHY| <-SGMII-> | External |
> > > |   MAC    |         |xPCS|            |IF |           | PHY      |
> > > +----------+         +----+            +---+           +----------+
> > >        ^               ^                 ^                ^
> > >        |               |                 |                |
> > >        +---------------------MDIO-------------------------+
> > >
> > > PHY IF configuration and status registers are accessible through mdio
> > > address 0x15 which is defined as intel_adhoc_addr. During D0, The
> > > driver will need to power up PHY IF by changing the power state to P0.
> > > Likewise, for D3, the driver sets PHY IF power state to P3.
> > 
> > I don't think this is the right approach.
> > 
> > You could just add a new "mdio-intel-serdes" to phy/ folder just like I
> > did with XPCS because this is mostly related with PHY settings rather
> > than EQoS.
> I am taking this approach to put it in stmmac folder rather than phy folder
> as a generic mdio-intel-serdes as this is a specific Intel serdes architecture which
> would only pair with DW EQos and DW xPCS HW. Since this serdes will not able to
> pair other MAC or other non-Intel platform, I would like you to reconsider this
> approach. I am open for discussion. 
> Thanks Jose for the fast response.

OK, then I think we should use the BSP init/exit functions that are 
already available for platform setups (.init and .exit callback of 
plat_stmmacenet_data struct). We just need to extend this to PCI based 
setups.

You can take a look at stmmac_platform.c and check what's done. 
Basically:
	- Call priv->plat->init() at probe() and resume()
	- Call priv->plat->exit() at remove() and suspend()

---
Thanks,
Jose Miguel Abreu

  reply	other threads:[~2020-03-23  8:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22 13:23 [RFC,net-next,v1, 0/1] Enable SERDES power up/down Voon Weifeng
2020-03-22 13:23 ` [RFC,net-next,v1, 1/1] net: stmmac: Enable SERDES power up/down sequence Voon Weifeng
2020-03-23  7:46   ` Jose Abreu
2020-03-23  8:16     ` Voon, Weifeng
2020-03-23  8:53       ` Jose Abreu [this message]
2020-03-23 15:52         ` Voon, Weifeng
2020-04-01 14:23           ` Voon, Weifeng
2020-04-02  8:47             ` Jose Abreu

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=BN8PR12MB326606DE1FEB055B7361A939D3F00@BN8PR12MB3266.namprd12.prod.outlook.com \
    --to=jose.abreu@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=weifeng.voon@intel.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).