Skip to contentSkip to conversation

dt-bindings: fec: Make the phy-reset-gpio polarity explicit

PATCH Applied Fabio Estevam 3 participants 3 messages Dec 8, 2017 – Dec 11, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: fec: Make the phy-reset-gpio polarity explicit

From: Fabio Estevam <[email protected]>

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.

---
 Documentation/devicetree/bindings/net/fsl-fec.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/net/fsl-fec.txt +2 -2
index f0dc944..2d41fb9 100644
@@ -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 = <&reg_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 = <&reg_fec_supply>;
 	phy-handle = <&ethphy>;
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw

From: Fabio Estevam <[email protected]> Sent: Friday, December 08, 2017 10:12 PM

Quoted 9 lines

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.

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.

Quoted 29 lines

---
Documentation/devicetree/bindings/net/fsl-fec.txt | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/net/fsl-fec.txt +2 -3
index f0dc944..2d41fb9 100644
@@ -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 = <&reg_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 = <&reg_fec_supply>;
 	phy-handle = <&ethphy>;
--

2.7.4

maintainer Applied
#2 lore raw
In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>
Date: Fri, 8 Dec 2017 12:11:33 -0200

Quoted 5 lines

From: Fabio Estevam <[email protected]>

The GPIO polarity passed to phy-reset-gpio is ignored by the FEC driver and it is assumed to be active low.

Quoted 8 lines

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.

Applied to net-next.