Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1288564
| From | Gregory CLEMENT <gregory.clement@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] net/macb: add support for resetting PHY using GPIO |
| Date | 2015-12-10 16:10 +0100 |
| Message-ID | <qEb11-7RF-33@gated-at.bofh.it> (permalink) |
| References | <qDRbY-351-15@gated-at.bofh.it> <qE3Zw-31E-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Sascha,
On jeu., déc. 10 2015, Sascha Hauer <s.hauer@pengutronix.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@fc028000 {
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@fc028000 {
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>;
};
};
> but doing it like this gives you additional goodies like proper handling
> of the max-speed property, a fixed-link if necessary and picking the
Currently there is phy_connect_direct so we can already handle the
preperty of the phy.
> correct phy if there are muliple phys on the bus.
but I agree with this one.
Gregory
>
> 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 |
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-09 19:00 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Andrew Lunn <andrew@lunn.ch> - 2015-12-09 19:20 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Moritz Fischer <moritz.fischer@ettus.com> - 2015-12-09 19:30 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO kbuild test robot <lkp@intel.com> - 2015-12-09 20:20 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Sascha Hauer <s.hauer@pengutronix.de> - 2015-12-10 08:40 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-10 16:10 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Sascha Hauer <s.hauer@pengutronix.de> - 2015-12-11 09:50 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-11 10:50 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Sascha Hauer <s.hauer@pengutronix.de> - 2015-12-11 11:30 +0100
Re: [PATCH] net/macb: add support for resetting PHY using GPIO Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-12-11 11:40 +0100
csiph-web