* [PATCH] dt-bindings: fec: Make the phy-reset-gpio polarity explicit
@ 2017-12-08 14:11 Fabio Estevam
2017-12-11 1:19 ` Andy Duan
2017-12-11 16:27 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2017-12-08 14:11 UTC (permalink / raw)
To: davem; +Cc: fugang.duan, robh+dt, netdev, Fabio Estevam
From: Fabio Estevam <fabio.estevam@nxp.com>
The GPIO polarity passed to phy-reset-gpio is ignored by the FEC
driver and it is assumed to be active low.
It can be active high only when the 'phy-reset-active-high' property
is present.
The current examples pass active high polarity and work fine, but
in order to improve the documentation make it explicit what the real
polarity is.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Documentation/devicetree/bindings/net/fsl-fec.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
index f0dc944..2d41fb9 100644
--- a/Documentation/devicetree/bindings/net/fsl-fec.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
@@ -59,7 +59,7 @@ ethernet@83fec000 {
reg = <0x83fec000 0x4000>;
interrupts = <87>;
phy-mode = "mii";
- phy-reset-gpios = <&gpio2 14 0>; /* GPIO2_14 */
+ phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; /* GPIO2_14 */
local-mac-address = [00 04 9F 01 1B B9];
phy-supply = <®_fec_supply>;
};
@@ -71,7 +71,7 @@ ethernet@83fec000 {
reg = <0x83fec000 0x4000>;
interrupts = <87>;
phy-mode = "mii";
- phy-reset-gpios = <&gpio2 14 0>; /* GPIO2_14 */
+ phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; /* GPIO2_14 */
local-mac-address = [00 04 9F 01 1B B9];
phy-supply = <®_fec_supply>;
phy-handle = <ðphy>;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] dt-bindings: fec: Make the phy-reset-gpio polarity explicit
2017-12-08 14:11 [PATCH] dt-bindings: fec: Make the phy-reset-gpio polarity explicit Fabio Estevam
@ 2017-12-11 1:19 ` Andy Duan
2017-12-11 16:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andy Duan @ 2017-12-11 1:19 UTC (permalink / raw)
To: Fabio Estevam, davem@davemloft.net
Cc: robh+dt@kernel.org, netdev@vger.kernel.org, Fabio Estevam
From: Fabio Estevam <festevam@gmail.com> Sent: Friday, December 08, 2017 10:12 PM
>The GPIO polarity passed to phy-reset-gpio is ignored by the FEC driver and it
>is assumed to be active low.
>
>It can be active high only when the 'phy-reset-active-high' property is present.
>
>The current examples pass active high polarity and work fine, but in order to
>improve the documentation make it explicit what the real polarity is.
>
>Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Since driver don't take care the flag, it doesn't matter what the value for the gpio polarity flag.
But the change look like explicit for user.
Acked-by: Fugang Duan <fugang.duan@nxp.com>
>---
> Documentation/devicetree/bindings/net/fsl-fec.txt | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt
>b/Documentation/devicetree/bindings/net/fsl-fec.txt
>index f0dc944..2d41fb9 100644
>--- a/Documentation/devicetree/bindings/net/fsl-fec.txt
>+++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
>@@ -59,7 +59,7 @@ ethernet@83fec000 {
> reg = <0x83fec000 0x4000>;
> interrupts = <87>;
> phy-mode = "mii";
>- phy-reset-gpios = <&gpio2 14 0>; /* GPIO2_14 */
>+ phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; /* GPIO2_14 */
> local-mac-address = [00 04 9F 01 1B B9];
> phy-supply = <®_fec_supply>;
> };
>@@ -71,7 +71,7 @@ ethernet@83fec000 {
> reg = <0x83fec000 0x4000>;
> interrupts = <87>;
> phy-mode = "mii";
>- phy-reset-gpios = <&gpio2 14 0>; /* GPIO2_14 */
>+ phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; /* GPIO2_14 */
> local-mac-address = [00 04 9F 01 1B B9];
> phy-supply = <®_fec_supply>;
> phy-handle = <ðphy>;
>--
>2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: fec: Make the phy-reset-gpio polarity explicit
2017-12-08 14:11 [PATCH] dt-bindings: fec: Make the phy-reset-gpio polarity explicit Fabio Estevam
2017-12-11 1:19 ` Andy Duan
@ 2017-12-11 16:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-12-11 16:27 UTC (permalink / raw)
To: festevam; +Cc: fugang.duan, robh+dt, netdev, fabio.estevam
From: Fabio Estevam <festevam@gmail.com>
Date: Fri, 8 Dec 2017 12:11:33 -0200
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> The GPIO polarity passed to phy-reset-gpio is ignored by the FEC
> driver and it is assumed to be active low.
>
> It can be active high only when the 'phy-reset-active-high' property
> is present.
>
> The current examples pass active high polarity and work fine, but
> in order to improve the documentation make it explicit what the real
> polarity is.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-11 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08 14:11 [PATCH] dt-bindings: fec: Make the phy-reset-gpio polarity explicit Fabio Estevam
2017-12-11 1:19 ` Andy Duan
2017-12-11 16:27 ` David Miller
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).