From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: Florian Fainelli From: Florian Fainelli To: Jason Gunthorpe Subject: Re: [PATCH 5/5] mv643xx_eth: convert to use the Marvell Orion MDIO driver Date: Tue, 29 Jan 2013 21:41:03 +0100 References: <1359473048-26551-1-git-send-email-florian@openwrt.org> <1359473048-26551-6-git-send-email-florian@openwrt.org> <20130129181306.GF25646@obsidianresearch.com> In-Reply-To: <20130129181306.GF25646@obsidianresearch.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Message-Id: <201301292141.03931.florian@openwrt.org> Cc: Thomas Petazzoni , Andrew Lunn , Russell King , Jason Cooper , linux-doc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, Rob Herring , Greg Kroah-Hartman , Paul Mackerras , Lennert Buytenhek , Rob Landley , netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Le mardi 29 janvier 2013 19:13:06, Jason Gunthorpe a =E9crit : > On Tue, Jan 29, 2013 at 04:24:08PM +0100, Florian Fainelli wrote: > > This patch converts the Marvell MV643XX ethernet driver to use the > > Marvell Orion MDIO driver. As a result, PowerPC and ARM platforms > > registering the Marvell MV643XX ethernet driver are also updated to > > register a Marvell Orion MDIO driver. This driver voluntarily overlaps > > with the Marvell Ethernet shared registers because it will use a subset > > of this shared register (shared_base + 0x4 - shared_base + 0x84). The > > Ethernet driver is also updated to look up for a PHY device using the > > Orion MDIO bus driver. >=20 > Can you finish off this job by making the mv643xx_eth driver accept > the standard phy-handle OF property instead of using a phy address? I can certainly do that, at the same time we need to continue supporting th= e=20 "old" platform device style registration without breaking them (PowerPC in= =20 particular, and the hopefully yet to be converted orion5x). So the phy_scan= ()=20 as I modified it will probably still be there. >=20 > Ie the end result should be something like: >=20 > smi0: mdio@72000 { > device_type =3D "mdio"; > compatible =3D "marvell,orion-mdio"; > reg =3D <0x72004 0x4>; >=20 > #address-cells =3D <1>; > #size-cells =3D <0>; > PHY1: ethernet-phy@1 { > reg =3D <1>; > device_type =3D "ethernet-phy"; > phy-id =3D <0x01410e90>; > }; > }; >=20 > egiga0 { > device_type =3D "network"; > compatible =3D "marvell,mv643xx-eth"; > reg =3D <0x72000 0x4000>; > port_number =3D <0>; > phy-handle =3D <&PHY1>; > interrupts =3D <11>; > local-mac-address =3D [000000000002]; /* Filled = by > boot loader */ }; >=20 > Regards, > Jason =2D-=20 =46lorian From mboxrd@z Thu Jan 1 00:00:00 1970 From: florian@openwrt.org (Florian Fainelli) Date: Tue, 29 Jan 2013 21:41:03 +0100 Subject: [PATCH 5/5] mv643xx_eth: convert to use the Marvell Orion MDIO driver In-Reply-To: <20130129181306.GF25646@obsidianresearch.com> References: <1359473048-26551-1-git-send-email-florian@openwrt.org> <1359473048-26551-6-git-send-email-florian@openwrt.org> <20130129181306.GF25646@obsidianresearch.com> Message-ID: <201301292141.03931.florian@openwrt.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Le mardi 29 janvier 2013 19:13:06, Jason Gunthorpe a ?crit : > On Tue, Jan 29, 2013 at 04:24:08PM +0100, Florian Fainelli wrote: > > This patch converts the Marvell MV643XX ethernet driver to use the > > Marvell Orion MDIO driver. As a result, PowerPC and ARM platforms > > registering the Marvell MV643XX ethernet driver are also updated to > > register a Marvell Orion MDIO driver. This driver voluntarily overlaps > > with the Marvell Ethernet shared registers because it will use a subset > > of this shared register (shared_base + 0x4 - shared_base + 0x84). The > > Ethernet driver is also updated to look up for a PHY device using the > > Orion MDIO bus driver. > > Can you finish off this job by making the mv643xx_eth driver accept > the standard phy-handle OF property instead of using a phy address? I can certainly do that, at the same time we need to continue supporting the "old" platform device style registration without breaking them (PowerPC in particular, and the hopefully yet to be converted orion5x). So the phy_scan() as I modified it will probably still be there. > > Ie the end result should be something like: > > smi0: mdio at 72000 { > device_type = "mdio"; > compatible = "marvell,orion-mdio"; > reg = <0x72004 0x4>; > > #address-cells = <1>; > #size-cells = <0>; > PHY1: ethernet-phy at 1 { > reg = <1>; > device_type = "ethernet-phy"; > phy-id = <0x01410e90>; > }; > }; > > egiga0 { > device_type = "network"; > compatible = "marvell,mv643xx-eth"; > reg = <0x72000 0x4000>; > port_number = <0>; > phy-handle = <&PHY1>; > interrupts = <11>; > local-mac-address = [000000000002]; /* Filled by > boot loader */ }; > > Regards, > Jason -- Florian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH 5/5] mv643xx_eth: convert to use the Marvell Orion MDIO driver Date: Tue, 29 Jan 2013 21:41:03 +0100 Message-ID: <201301292141.03931.florian@openwrt.org> References: <1359473048-26551-1-git-send-email-florian@openwrt.org> <1359473048-26551-6-git-send-email-florian@openwrt.org> <20130129181306.GF25646@obsidianresearch.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20130129181306.GF25646@obsidianresearch.com> Sender: linux-doc-owner@vger.kernel.org To: Jason Gunthorpe Cc: davem@davemloft.net, Thomas Petazzoni , Andrew Lunn , Russell King , Jason Cooper , linux-doc@vger.kernel.org, Benjamin Herrenschmidt , devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, Rob Herring , Grant Likely , netdev@vger.kernel.org, Paul Mackerras , linux-arm-kernel@lists.infradead.org, Rob Landley , Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, Lennert Buytenhek List-Id: devicetree@vger.kernel.org Le mardi 29 janvier 2013 19:13:06, Jason Gunthorpe a =E9crit : > On Tue, Jan 29, 2013 at 04:24:08PM +0100, Florian Fainelli wrote: > > This patch converts the Marvell MV643XX ethernet driver to use the > > Marvell Orion MDIO driver. As a result, PowerPC and ARM platforms > > registering the Marvell MV643XX ethernet driver are also updated to > > register a Marvell Orion MDIO driver. This driver voluntarily overl= aps > > with the Marvell Ethernet shared registers because it will use a su= bset > > of this shared register (shared_base + 0x4 - shared_base + 0x84). T= he > > Ethernet driver is also updated to look up for a PHY device using t= he > > Orion MDIO bus driver. >=20 > Can you finish off this job by making the mv643xx_eth driver accept > the standard phy-handle OF property instead of using a phy address? I can certainly do that, at the same time we need to continue supportin= g the=20 "old" platform device style registration without breaking them (PowerPC= in=20 particular, and the hopefully yet to be converted orion5x). So the phy_= scan()=20 as I modified it will probably still be there. >=20 > Ie the end result should be something like: >=20 > smi0: mdio@72000 { > device_type =3D "mdio"; > compatible =3D "marvell,orion-mdio"; > reg =3D <0x72004 0x4>; >=20 > #address-cells =3D <1>; > #size-cells =3D <0>; > PHY1: ethernet-phy@1 { > reg =3D <1>; > device_type =3D "ethernet-phy"; > phy-id =3D <0x01410e90>; > }; > }; >=20 > egiga0 { > device_type =3D "network"; > compatible =3D "marvell,mv643xx-eth"; > reg =3D <0x72000 0x4000>; > port_number =3D <0>; > phy-handle =3D <&PHY1>; > interrupts =3D <11>; > local-mac-address =3D [000000000002]; /* Fil= led by > boot loader */ }; >=20 > Regards, > Jason --=20 =46lorian