[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151211084630.GW11966@pengutronix.de>
Date: Fri, 11 Dec 2015 09:46:30 +0100
From: Sascha Hauer <s.hauer@...gutronix.de>
To: Gregory CLEMENT <gregory.clement@...e-electrons.com>
Cc: "David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Nicolas Ferre <nicolas.ferre@...el.com>,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Subject: Re: [PATCH] net/macb: add support for resetting PHY using GPIO
On Thu, Dec 10, 2015 at 04:08:08PM +0100, Gregory CLEMENT wrote:
> Hi Sascha,
>
> On jeu., déc. 10 2015, Sascha Hauer <s.hauer@...gutronix.de> wrote:
>
> > Hi Gregory,
> >
> > On Wed, Dec 09, 2015 at 06:49:43PM +0100, Gregory CLEMENT wrote:
> >> With device tree it is no more possible to reset the PHY at board
> >> level. Furthermore, doing in the driver allow to power down the PHY when
> >> the network interface is no more used.
> >>
> >> The patch introduces a new optional property "phy-reset-gpio" inspired
> >> from the one use for the FEC.
> >
> > I don't think it's a good idea to further extend the usage of this
> > binding. The driver should use the phy-handle property and
> > of_phy_connect() which gives you a proper device node for the phy. Then
> > the phy device node should get the reset gpio. I know it's more work,
>
> So you suggest to pass from this binding:
> macb1: ethernet@...28000 {
> phy-mode = "rmii";
> status = "okay";
> #address-cells = <1>;
> #size-cells = <0>;
> status = "okay";
> phy-reset-gpio = <&pioE 6 GPIO_ACTIVE_HIGH>;
>
> ethernet-phy@1 {
> reg = <0x1>;
> interrupt-parent = <&pioB>;
> interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
>
> };
> };
>
> to this binding
> macb1: ethernet@...28000 {
> phy-mode = "rmii";
> status = "okay";
> #address-cells = <1>;
> #size-cells = <0>;
> status = "okay";
>
> ethernet-phy@1 {
> reg = <0x1>;
> interrupt-parent = <&pioB>;
> interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
> phy-reset-gpio = <&pioE 6 GPIO_ACTIVE_HIGH>;
> };
> };
s/phy-reset-gpio/reset-gpios/, but yes.
I had assumed you do not use a phy description in the device tree at all
since the macb driver doesn't use of_phy_connect(). Apparently there are
other possibilities to connect the phy device nodes with the phys
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists