All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Pramod Kumar <pramod.kumar@broadcom.com>,
	Rob Herring <robh+dt@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Chen-Yu Tsai <wens@csie.org>, Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	netdev@vger.kernel.org, Punit Agrawal <punit.agrawal@arm.com>,
	linux-kernel@vger.kernel.org,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	linux-arm-kernel@lists.infradead.org,
	Anup Patel <anup.patel@broadcom.com>,
	Kishon Vijay Abraham I <kishon@ti.com>
Subject: Re: [PATCH 1/6] bus: Add shared MDIO bus framework
Date: Tue, 26 Apr 2016 19:53:39 +0200	[thread overview]
Message-ID: <5167289.0a4LBoWhyX@wuerfel> (raw)
In-Reply-To: <571FA3F6.7000903@gmail.com>

On Tuesday 26 April 2016 10:23:02 Florian Fainelli wrote:
> On 26/04/16 05:13, Andrew Lunn wrote:
> >> 4. Apart from these, by using MDIO mux framework we are making our
> >> non-ethernet PHYs dependent on Linux network drivers which is not
> >> acceptable. What if some product line does not need network subsystem at
> >> all?
> > 
> > This is your only valid point. However, does Broadcom have a product
> > line which does not include networking? Is not Broadcom a network SoC
> > vendor?
> 
> But even with that, there is no reason why we could not decouple the
> PHYLIB MDIO framework from PHYLIB and make it available as a more
> standalone subsystem which can be utilized when you have a mix of MDIO
> devices like here.

[adding Kishon Vijay Abraham]

We should also consider how this fits in with drivers/phy/, which is
the generic framework for all PHY devices that are not for ethernet.

The most straightforward way that you mention would be to allow
generic PHY devices to be probed on an MIO bus or mux. This should
just work using mdio_module_driver(), as Andrew already explained.

A more complex problem would be having a PHY driver for a device
that can be either an ethernet phy or some other phy. With today's
frameworks that would require two separate drivers, one in drivers/phy
and one in drivers/net/phy/. If that turns out to be a common problem,
we might want to come up with a way to nest one on top of the other,
or merge two two device structures (struct phy_device and struct phy).

> I am not clear on how common a shared MDIO bus is on other SoCs, but the
> other Broadcom SoCs I am familiar with have dedicated MDIO buses
> instances per type of PHY (PCIe, BUSB, Ethernet), thus making the split
> a ton easier.

I think most commonly, the other PHYs are not on MDIO at all, but are
integrated inside of the SoC as an MMIO based device.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>, Andrew Lunn <andrew@lunn.ch>,
	Punit Agrawal <punit.agrawal@arm.com>,
	Anup Patel <anup.patel@broadcom.com>,
	Pawel Moll <pawel.moll@arm.com>,
	devicetree@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Will Deacon <will.deacon@arm.com>, Chen-Yu Tsai <wens@csie.org>,
	linux-kernel@vger.kernel.org,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Pramod Kumar <pramod.kumar@broadcom.com>,
	Rob Herring <robh+dt@kernel.org>,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	netdev@vger.kernel.org, Kishon Vijay Abraham I <kishon@ti.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/6] bus: Add shared MDIO bus framework
Date: Tue, 26 Apr 2016 19:53:39 +0200	[thread overview]
Message-ID: <5167289.0a4LBoWhyX@wuerfel> (raw)
In-Reply-To: <571FA3F6.7000903@gmail.com>

On Tuesday 26 April 2016 10:23:02 Florian Fainelli wrote:
> On 26/04/16 05:13, Andrew Lunn wrote:
> >> 4. Apart from these, by using MDIO mux framework we are making our
> >> non-ethernet PHYs dependent on Linux network drivers which is not
> >> acceptable. What if some product line does not need network subsystem at
> >> all?
> > 
> > This is your only valid point. However, does Broadcom have a product
> > line which does not include networking? Is not Broadcom a network SoC
> > vendor?
> 
> But even with that, there is no reason why we could not decouple the
> PHYLIB MDIO framework from PHYLIB and make it available as a more
> standalone subsystem which can be utilized when you have a mix of MDIO
> devices like here.

[adding Kishon Vijay Abraham]

We should also consider how this fits in with drivers/phy/, which is
the generic framework for all PHY devices that are not for ethernet.

The most straightforward way that you mention would be to allow
generic PHY devices to be probed on an MIO bus or mux. This should
just work using mdio_module_driver(), as Andrew already explained.

A more complex problem would be having a PHY driver for a device
that can be either an ethernet phy or some other phy. With today's
frameworks that would require two separate drivers, one in drivers/phy
and one in drivers/net/phy/. If that turns out to be a common problem,
we might want to come up with a way to nest one on top of the other,
or merge two two device structures (struct phy_device and struct phy).

> I am not clear on how common a shared MDIO bus is on other SoCs, but the
> other Broadcom SoCs I am familiar with have dedicated MDIO buses
> instances per type of PHY (PCIe, BUSB, Ethernet), thus making the split
> a ton easier.

I think most commonly, the other PHYs are not on MDIO at all, but are
integrated inside of the SoC as an MMIO based device.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] bus: Add shared MDIO bus framework
Date: Tue, 26 Apr 2016 19:53:39 +0200	[thread overview]
Message-ID: <5167289.0a4LBoWhyX@wuerfel> (raw)
In-Reply-To: <571FA3F6.7000903@gmail.com>

On Tuesday 26 April 2016 10:23:02 Florian Fainelli wrote:
> On 26/04/16 05:13, Andrew Lunn wrote:
> >> 4. Apart from these, by using MDIO mux framework we are making our
> >> non-ethernet PHYs dependent on Linux network drivers which is not
> >> acceptable. What if some product line does not need network subsystem at
> >> all?
> > 
> > This is your only valid point. However, does Broadcom have a product
> > line which does not include networking? Is not Broadcom a network SoC
> > vendor?
> 
> But even with that, there is no reason why we could not decouple the
> PHYLIB MDIO framework from PHYLIB and make it available as a more
> standalone subsystem which can be utilized when you have a mix of MDIO
> devices like here.

[adding Kishon Vijay Abraham]

We should also consider how this fits in with drivers/phy/, which is
the generic framework for all PHY devices that are not for ethernet.

The most straightforward way that you mention would be to allow
generic PHY devices to be probed on an MIO bus or mux. This should
just work using mdio_module_driver(), as Andrew already explained.

A more complex problem would be having a PHY driver for a device
that can be either an ethernet phy or some other phy. With today's
frameworks that would require two separate drivers, one in drivers/phy
and one in drivers/net/phy/. If that turns out to be a common problem,
we might want to come up with a way to nest one on top of the other,
or merge two two device structures (struct phy_device and struct phy).

> I am not clear on how common a shared MDIO bus is on other SoCs, but the
> other Broadcom SoCs I am familiar with have dedicated MDIO buses
> instances per type of PHY (PCIe, BUSB, Ethernet), thus making the split
> a ton easier.

I think most commonly, the other PHYs are not on MDIO at all, but are
integrated inside of the SoC as an MMIO based device.

	Arnd

  parent reply	other threads:[~2016-04-26 17:54 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21  9:18 [PATCH 0/6] Add Shared MDIO framework for iProc based SoCs Pramod Kumar
2016-04-21  9:18 ` Pramod Kumar
2016-04-21  9:18 ` Pramod Kumar
2016-04-21  9:18 ` [PATCH 1/6] bus: Add shared MDIO bus framework Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-24 18:18   ` David Miller
2016-04-24 18:18     ` David Miller
2016-04-24 18:18     ` David Miller
2016-04-25  4:09     ` Pramod Kumar
2016-04-25  4:09       ` Pramod Kumar
2016-04-25 20:56   ` Andrew Lunn
2016-04-25 20:56     ` Andrew Lunn
2016-04-25 20:56     ` Andrew Lunn
2016-04-26  8:33     ` Pramod Kumar
2016-04-26  8:33       ` Pramod Kumar
2016-04-26 12:13       ` Andrew Lunn
2016-04-26 12:13         ` Andrew Lunn
2016-04-26 12:13         ` Andrew Lunn
2016-04-26 16:26         ` David Miller
2016-04-26 16:26           ` David Miller
2016-04-26 16:26           ` David Miller
2016-04-26 17:23         ` Florian Fainelli
2016-04-26 17:23           ` Florian Fainelli
2016-04-26 17:45           ` Andrew Lunn
2016-04-26 17:45             ` Andrew Lunn
2016-04-26 17:53           ` Arnd Bergmann [this message]
2016-04-26 17:53             ` Arnd Bergmann
2016-04-26 17:53             ` Arnd Bergmann
2016-04-26 18:23             ` Andrew Lunn
2016-04-26 18:23               ` Andrew Lunn
2016-04-26 19:24               ` Arnd Bergmann
2016-04-26 19:24                 ` Arnd Bergmann
2016-04-26 19:41                 ` Andrew Lunn
2016-04-26 19:41                   ` Andrew Lunn
2016-04-27  4:46                   ` Anup Patel
2016-04-27  4:46                     ` Anup Patel
2016-04-27  9:28                     ` Arnd Bergmann
2016-04-27  9:28                       ` Arnd Bergmann
2016-04-27  9:28                       ` Arnd Bergmann
2016-04-21  9:18 ` [PATCH 2/6] Documentation: DT binding doc for iProc Shared MDIO Controller Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-22 20:10   ` Rob Herring
2016-04-22 20:10     ` Rob Herring
2016-04-25  4:27     ` Pramod Kumar
2016-04-25  4:27       ` Pramod Kumar
2016-04-25  4:27       ` Pramod Kumar
2016-04-25 15:33   ` Andrew Lunn
2016-04-25 15:33     ` Andrew Lunn
2016-04-25 15:33     ` Andrew Lunn
2016-04-21  9:18 ` [PATCH 3/6] bus: Add platform driver for iProc shared " Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-21  9:18 ` [PATCH 4/6] dt: Add Shared MDIO Controller node for NS2 Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-21  9:18 ` [PATCH 5/6] Documentation: Binding doc for ethernet master in NS2 Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-22 20:13   ` Rob Herring
2016-04-22 20:13     ` Rob Herring
2016-04-22 20:13     ` Rob Herring
2016-04-25  4:43     ` Pramod Kumar
2016-04-25  4:43       ` Pramod Kumar
2016-04-25  4:43       ` Pramod Kumar
2016-04-21  9:18 ` [PATCH 6/6] net:phy: Add Ethernet Master for iProc Shared MDIO Controller Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-21  9:18   ` Pramod Kumar
2016-04-25 15:20 ` [PATCH 0/6] Add Shared MDIO framework for iProc based SoCs Andrew Lunn
2016-04-25 15:20   ` Andrew Lunn
2016-04-25 15:20   ` Andrew Lunn

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=5167289.0a4LBoWhyX@wuerfel \
    --to=arnd@arndb.de \
    --cc=andrew@lunn.ch \
    --cc=anup.patel@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=pramod.kumar@broadcom.com \
    --cc=punit.agrawal@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=wens@csie.org \
    --cc=will.deacon@arm.com \
    --cc=yamada.masahiro@socionext.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 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.