From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753373AbcDZTlS (ORCPT ); Tue, 26 Apr 2016 15:41:18 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:46699 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752946AbcDZTlN (ORCPT ); Tue, 26 Apr 2016 15:41:13 -0400 Date: Tue, 26 Apr 2016 21:41:02 +0200 From: Andrew Lunn To: Arnd Bergmann Cc: Florian Fainelli , Pramod Kumar , Rob Herring , Catalin Marinas , Will Deacon , Masahiro Yamada , Chen-Yu Tsai , Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Suzuki K Poulose , netdev@vger.kernel.org, Punit Agrawal , linux-kernel@vger.kernel.org, BCM Kernel Feedback , linux-arm-kernel@lists.infradead.org, Anup Patel , Kishon Vijay Abraham I Subject: Re: [PATCH 1/6] bus: Add shared MDIO bus framework Message-ID: <20160426194102.GF30107@lunn.ch> References: <1461230323-27891-1-git-send-email-pramod.kumar@broadcom.com> <5167289.0a4LBoWhyX@wuerfel> <20160426182335.GE30107@lunn.ch> <9424602.Vqb0FY56gH@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9424602.Vqb0FY56gH@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 26, 2016 at 09:24:34PM +0200, Arnd Bergmann wrote: > On Tuesday 26 April 2016 20:23:35 Andrew Lunn wrote: > > > A more complex problem would be having a PHY driver for a device > > > that can be either an ethernet phy or some other phy. > > > > I doubt that ever happens. You can have up to 32 different devices on > > an MDIO bus. Since an Ethernet PHY and a "some other sort of PHY" are > > completely different things, why would a hardware engineer place them > > on the same address? It is like saying your ATA controller and VGA > > controller share the same slot on the PCI bus... > > To clarify: what I meant is a device that is designed as a PHY for > similar hardware (e.g. SATA, USB3 and PCIe) and that has a common > register set and a single driver, but that driver can operate > in multiple modes. You typically have multiple instances of > such hardware, with each instance linked to exactly one host > device, but one driver for all of them. > > See Documentation/devicetree/bindings/phy/apm-xgene-phy.txt > and drivers/phy/phy-xgene.c for one such example. Interesting. Also, that this lists SGMII. I assume this is a phy in the MAC in order to talk to the Ethernet PHY. I still don't see it being a big problem if a phy driver implements an Ethernet PHY. It just needs to call phy_device_create() and phy_device_register(). Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 From: andrew@lunn.ch (Andrew Lunn) Date: Tue, 26 Apr 2016 21:41:02 +0200 Subject: [PATCH 1/6] bus: Add shared MDIO bus framework In-Reply-To: <9424602.Vqb0FY56gH@wuerfel> References: <1461230323-27891-1-git-send-email-pramod.kumar@broadcom.com> <5167289.0a4LBoWhyX@wuerfel> <20160426182335.GE30107@lunn.ch> <9424602.Vqb0FY56gH@wuerfel> Message-ID: <20160426194102.GF30107@lunn.ch> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Apr 26, 2016 at 09:24:34PM +0200, Arnd Bergmann wrote: > On Tuesday 26 April 2016 20:23:35 Andrew Lunn wrote: > > > A more complex problem would be having a PHY driver for a device > > > that can be either an ethernet phy or some other phy. > > > > I doubt that ever happens. You can have up to 32 different devices on > > an MDIO bus. Since an Ethernet PHY and a "some other sort of PHY" are > > completely different things, why would a hardware engineer place them > > on the same address? It is like saying your ATA controller and VGA > > controller share the same slot on the PCI bus... > > To clarify: what I meant is a device that is designed as a PHY for > similar hardware (e.g. SATA, USB3 and PCIe) and that has a common > register set and a single driver, but that driver can operate > in multiple modes. You typically have multiple instances of > such hardware, with each instance linked to exactly one host > device, but one driver for all of them. > > See Documentation/devicetree/bindings/phy/apm-xgene-phy.txt > and drivers/phy/phy-xgene.c for one such example. Interesting. Also, that this lists SGMII. I assume this is a phy in the MAC in order to talk to the Ethernet PHY. I still don't see it being a big problem if a phy driver implements an Ethernet PHY. It just needs to call phy_device_create() and phy_device_register(). Andrew