devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tomer Maimon <tmaimon77@gmail.com>,
	davem@davemloft.net, avifishman70@gmail.com, venture@google.com,
	openbmc@lists.ozlabs.org, robh+dt@kernel.org,
	tali.perry1@gmail.com, mcoquelin.stm32@gmail.com,
	edumazet@google.com, joabreu@synopsys.com, joel@jms.id.au,
	krzysztof.kozlowski+dt@linaro.org, peppe.cavallaro@st.com,
	j.neuschaefer@gmx.net, netdev@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org, benjaminfair@google.com
Subject: Re: [Linux-stm32] [PATCH v1 2/2] net: stmmac: Add NPCM support
Date: Thu, 30 Nov 2023 21:34:41 +0100	[thread overview]
Message-ID: <20231130213441.032a661c@device.home> (raw)
In-Reply-To: <xvy2coamb6cl3wcbkl32f6w7kksoxfocyd63t7k7bz4pne2gyx@lktivhqovy7p>

Hello,

On Thu, 30 Nov 2023 22:59:32 +0300
Serge Semin <fancer.lancer@gmail.com> wrote:

> On Thu, Nov 30, 2023 at 06:26:13PM +0100, Andrew Lunn wrote:
> > > I will check with the xpcs maintainer how can we add indirect access
> > > to the xpcs module.  
> > 
> > https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c#L449
> > 
> > It creates a regmap for the memory range. On top of that it creates an
> > MDIO bus. You can then access the PCS in the normal way.  
> 
> Actually Synopsys DW XPCS can be synthesized with two types of the CSR
> interfaces:
> 1. MDIO: device looks as a normal MDIO device. This option is currently
>    supported by the STMMAC MDIO driver.
> 2. MCI/APB3: device MMD CSRs are directly (all CSRs are visible) or
>    indirectly (paged-base access) accessible over the system memory bus.
> 
> In addition to the above XPCS device can be equipped with separate
> clock sources (at least to feed the MCI or APB3 interface) and may
> have dedicated IRQ line to signal various events like link
> establishing, failures, etc. From that perspective XPCS in both cases
> looks as a normal platform device for which would be better to have a
> special DT-node defined with all those resources supplied. Then the
> XPCS DT-node could be passed to the DW MAC DT-node via the already
> standardized "pcs-handle" DT-property.

To my understanding, this should work, there's another PCS that works
this way : 
https://elixir.bootlin.com/linux/v6.7-rc3/source/drivers/net/pcs/pcs-rzn1-miic.c

Are you still able to use the mdio-regmap glue that Andrew mentioned,
to avoid the duplication between the mdio and mmio register accesses ?

Maxime

  reply	other threads:[~2023-11-30 20:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 15:17 [PATCH v1 0/2] net: stmmac: add NPCM dwmac support Tomer Maimon
2023-11-21 15:17 ` [PATCH v1 1/2] dt-bindings: net: Add support NPCM dwmac Tomer Maimon
2023-11-21 17:21   ` Krzysztof Kozlowski
2023-11-21 15:17 ` [PATCH v1 2/2] net: stmmac: Add NPCM support Tomer Maimon
2023-11-21 15:45   ` Russell King (Oracle)
2023-11-22 17:23     ` Tomer Maimon
2023-11-27 15:58       ` Russell King (Oracle)
2023-11-30 17:15         ` Tomer Maimon
2023-11-21 16:00   ` Andrew Lunn
2023-11-22 17:50     ` Tomer Maimon
2023-11-22 18:45       ` Andrew Lunn
2023-11-23 13:50         ` Tomer Maimon
2023-11-27 15:19           ` Tomer Maimon
2023-11-28 23:31             ` Andrew Lunn
2023-11-30 17:17               ` Tomer Maimon
2023-11-30 17:26                 ` Andrew Lunn
2023-11-30 18:25                   ` Tomer Maimon
2023-11-30 19:59                   ` Serge Semin
2023-11-30 20:34                     ` Maxime Chevallier [this message]
2023-12-01 16:25                       ` [Linux-stm32] " Serge Semin
2023-11-22  2:11   ` kernel test robot
2023-11-22  4:45   ` 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=20231130213441.032a661c@device.home \
    --to=maxime.chevallier@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=fancer.lancer@gmail.com \
    --cc=j.neuschaefer@gmx.net \
    --cc=joabreu@synopsys.com \
    --cc=joel@jms.id.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=peppe.cavallaro@st.com \
    --cc=robh+dt@kernel.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.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).