devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Leitner <richard.leitner@skidata.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	"David S . Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4.1] phylib: Add device reset GPIO support
Date: Mon, 4 Dec 2017 17:20:13 +0100	[thread overview]
Message-ID: <b95b046c-ee37-5ec1-01c1-763fb1e307e2@skidata.com> (raw)
In-Reply-To: <1512390905-28094-1-git-send-email-geert+renesas@glider.be>


On 12/04/2017 01:35 PM, Geert Uytterhoeven wrote:
> From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> The PHY devices sometimes do have their reset signal (maybe even power
> supply?) tied to some GPIO and sometimes it also does happen that a boot
> loader does not leave it deasserted. So far this issue has been attacked
> from (as I believe) a wrong angle: by teaching the MAC driver to manipulate
> the GPIO in question; that solution, when applied to the device trees, led
> to adding the PHY reset GPIO properties to the MAC device node, with one
> exception: Cadence MACB driver which could handle the "reset-gpios" prop
> in a PHY device subnode. I believe that the correct approach is to teach
> the 'phylib' to get the MDIO device reset GPIO from the device tree node
> corresponding to this device -- which this patch is doing...
> 
> Note that I had to modify the AT803x PHY driver as it would stop working
> otherwise -- it made use of the reset GPIO for its own purposes...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Acked-by: Rob Herring <robh@kernel.org>
> [geert: Propagate actual errors from fwnode_get_named_gpiod()]
> [geert: Avoid destroying initial setup]
> [geert: Consolidate GPIO descriptor acquiring code]
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Successfully tested this patch on a i.MX6SOLO based board containing a
LAN8710 PHY:

Tested-by: Richard Leitner <richard.leitner@skidata.com>

  reply	other threads:[~2017-12-04 16:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 10:34 [PATCH v4 0/4] Teach phylib hard-resetting devices Geert Uytterhoeven
2017-12-04 10:34 ` [PATCH v4 1/4] phylib: Add device reset GPIO support Geert Uytterhoeven
2017-12-04 12:35   ` [PATCH v4.1] " Geert Uytterhoeven
2017-12-04 16:20     ` Richard Leitner [this message]
2017-12-07 17:20     ` Sergei Shtylyov
     [not found]       ` <69fe9a6d-4039-6f80-b80d-7dc0de31e5bf-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2017-12-07 17:40         ` Sergei Shtylyov
2017-12-08  9:53       ` Geert Uytterhoeven
     [not found]         ` <CAMuHMdWv6CiCihjFHn-k2=3PC+-bRQaKMsZcsx51MYpynTLO4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-08 17:20           ` Sergei Shtylyov
2017-12-04 10:34 ` [PATCH v4 2/4] macb: Kill PHY reset code Geert Uytterhoeven
2017-12-04 10:34 ` [PATCH v4 3/4] arm64: dts: renesas: salvator-common: Add EthernetAVB PHY reset Geert Uytterhoeven
     [not found] ` <1512383692-14009-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2017-12-04 10:34   ` [PATCH v4 4/4] arm64: dts: renesas: ulcb: " Geert Uytterhoeven
2017-12-05 17:51 ` [PATCH v4 0/4] Teach phylib hard-resetting devices David Miller
2017-12-11  7:04 ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b95b046c-ee37-5ec1-01c1-763fb1e307e2@skidata.com \
    --to=richard.leitner@skidata.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).