From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next 6/8] MIPS: mscc: Add switch to ocelot Date: Fri, 23 Mar 2018 23:06:57 +0100 Message-ID: <20180323220657.GY24361@lunn.ch> References: <20180323201117.8416-1-alexandre.belloni@bootlin.com> <20180323201117.8416-7-alexandre.belloni@bootlin.com> <20180323212230.GA12808@piout.net> <20180323213344.GV24361@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Florian Fainelli Cc: Alexandre Belloni , "David S . Miller" , Allan Nielsen , razvan.stefanescu@nxp.com, po.liu@nxp.com, Thomas Petazzoni , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, James Hogan List-Id: devicetree@vger.kernel.org > > That is the trade off of having a standalone MDIO bus driver. Maybe > > add a phandle to the internal MDIO bus? The switch driver could then > > follow the phandle, and direct connect the internal PHYs? > > This is more or less what patch 7 does, right? Patch 7 does it in DT. I'm suggesting it could be done in C. It is hard wired, so there is no need to describe it in DT. Use the phandle to get the mdio bus, mdiobus_get_phy(, port) to get the phydev and then use phy_connect(). Andrew