ARM: imx: Explicitly pass the active level of the PHY reset
Subsystems (2)
Fabio Estevam
reviewerPATCH 1/1 ARM: imx: Explicitly pass the active level of the PHY reset
From: Fabio Estevam <[email protected]>
Since commit 7a399e3a2e (fec: Do not assume that PHY reset is active low), we no longer assume that the PHY reset is active low.
Now we need to retrieve this information from the device tree instead.
Passing '0' as the phy-reset-gpios means 'active high' according to the definition from include/dt-bindings/gpio/gpio.h:
#define GPIO_ACTIVE_HIGH 0
#define GPIO_ACTIVE_LOW 1
, so in order to keep things working as before we need to explicitly pass GPIO_ACTIVE_LOW as the flag.
---
Shawn,
This is needed for 3.13 as 7a399e3a2e (fec: Do not assume that PHY reset is active low) already reached mainline.
arch/arm/boot/dts/imx28-apf28.dts | 2 +- arch/arm/boot/dts/imx28-apf28dev.dts | 2 +- arch/arm/boot/dts/imx28-cfa10037.dts | 2 +- arch/arm/boot/dts/imx28-cfa10049.dts | 2 +- arch/arm/boot/dts/imx28-cfa10057.dts | 2 +- arch/arm/boot/dts/imx28-cfa10058.dts | 2 +- arch/arm/boot/dts/imx28-duckbill.dts | 2 +- arch/arm/boot/dts/imx28-evk.dts | 2 +- arch/arm/boot/dts/imx28-m28cu3.dts | 2 +- arch/arm/boot/dts/imx28.dtsi | 1 + arch/arm/boot/dts/imx50-evk.dts | 2 +- arch/arm/boot/dts/imx50.dtsi | 1 + arch/arm/boot/dts/imx53-evk.dts | 2 +- arch/arm/boot/dts/imx53-mba53.dts | 2 +- arch/arm/boot/dts/imx53-qsb.dts | 2 +- arch/arm/boot/dts/imx53-smd.dts | 2 +- arch/arm/boot/dts/imx53-voipac-dmm-668.dtsi | 2 +- arch/arm/boot/dts/imx53.dtsi | 1 + arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 2 +- arch/arm/boot/dts/imx6q-gw5400-a.dts | 2 +- arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw51xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 2 +- arch/arm/boot/dts/imx6qdl.dtsi | 1 + 30 files changed, 30 insertions(+), 26 deletions(-)
arch/arm/boot/dts/imx28-apf28.dts +1 -1
@@ -78,7 +78,7 @@ phy-mode = "rmii"; pinctrl-names = "default"; pinctrl-0 = <&mac0_pins_a>; - phy-reset-gpios = <&gpio4 13 0>; + phy-reset-gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; status = "okay"; }; };
arch/arm/boot/dts/imx28-apf28dev.dts +1 -1
@@ -155,7 +155,7 @@ phy-mode = "rmii"; pinctrl-names = "default"; pinctrl-0 = <&mac1_pins_a>; - phy-reset-gpios = <&gpio0 23 0>; + phy-reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; status = "okay"; }; };
arch/arm/boot/dts/imx28-cfa10037.dts +1 -1
@@ -64,7 +64,7 @@ pinctrl-names = "default"; pinctrl-0 = <&mac0_pins_a &mac0_pins_cfa10037>; - phy-reset-gpios = <&gpio2 21 0>; + phy-reset-gpios = <&gpio2 21 GPIO_ACTIVE_LOW>; phy-reset-duration = <100>; status = "okay"; };
arch/arm/boot/dts/imx28-cfa10049.dts +1 -1
@@ -327,7 +327,7 @@ pinctrl-names = "default"; pinctrl-0 = <&mac0_pins_a &mac0_pins_cfa10049>; - phy-reset-gpios = <&gpio2 21 0>; + phy-reset-gpios = <&gpio2 21 GPIO_ACTIVE_LOW>; phy-reset-duration = <100>; status = "okay"; };
arch/arm/boot/dts/imx28-cfa10057.dts +1 -1
@@ -162,7 +162,7 @@ phy-mode = "rmii"; pinctrl-names = "default"; pinctrl-0 = <&mac0_pins_a>; - phy-reset-gpios = <&gpio2 21 0>; + phy-reset-gpios = <&gpio2 21 GPIO_ACTIVE_LOW>; phy-reset-duration = <100>; status = "okay"; };
arch/arm/boot/dts/imx28-cfa10058.dts +1 -1
@@ -129,7 +129,7 @@ phy-mode = "rmii"; pinctrl-names = "default"; pinctrl-0 = <&mac0_pins_a>; - phy-reset-gpios = <&gpio2 21 0>; + phy-reset-gpios = <&gpio2 21 GPIO_ACTIVE_LOW>; phy-reset-duration = <100>; status = "okay"; };
arch/arm/boot/dts/imx28-duckbill.dts +1 -1
@@ -82,7 +82,7 @@ pinctrl-names = "default"; pinctrl-0 = <&mac0_pins_a>; phy-supply = <®_3p3v>; - phy-reset-gpios = <&gpio4 13 0>; + phy-reset-gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; phy-reset-duration = <100>; status = "okay"; };
arch/arm/boot/dts/imx28-evk.dts +1 -1
@@ -264,7 +264,7 @@ pinctrl-names = "default"; pinctrl-0 = <&mac0_pins_a>; phy-supply = <®_fec_3v3>; - phy-reset-gpios = <&gpio4 13 0>; + phy-reset-gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; phy-reset-duration = <100>; status = "okay"; };
arch/arm/boot/dts/imx28-m28cu3.dts +1 -1
@@ -189,7 +189,7 @@ phy-mode = "rmii"; pinctrl-names = "default"; pinctrl-0 = <&mac0_pins_a>; - phy-reset-gpios = <&gpio4 13 0>; + phy-reset-gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; phy-reset-duration = <100>; status = "okay"; };
arch/arm/boot/dts/imx28.dtsi +1 -0
@@ -9,6 +9,7 @@ * http://www.gnu.org/copyleft/gpl.html */ +#include <dt-bindings/gpio/gpio.h> #include "skeleton.dtsi" #include "imx28-pinfunc.h"
arch/arm/boot/dts/imx50-evk.dts +1 -1
@@ -54,7 +54,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec>; phy-mode = "rmii"; - phy-reset-gpios = <&gpio4 12 0>; + phy-reset-gpios = <&gpio4 12 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx50.dtsi +1 -0
@@ -14,6 +14,7 @@ #include "skeleton.dtsi" #include "imx50-pingrp.h" #include <dt-bindings/clock/imx5-clock.h> +#include <dt-bindings/gpio/gpio.h> / { aliases {
arch/arm/boot/dts/imx53-evk.dts +1 -1
@@ -145,6 +145,6 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec>; phy-mode = "rmii"; - phy-reset-gpios = <&gpio7 6 0>; + phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx53-mba53.dts +1 -1
@@ -183,7 +183,7 @@ }; &fec { - phy-reset-gpios = <&gpio7 6 0>; + phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx53-qsb.dts +1 -1
@@ -338,7 +338,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec>; phy-mode = "rmii"; - phy-reset-gpios = <&gpio7 6 0>; + phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx53-smd.dts +1 -1
@@ -217,6 +217,6 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec>; phy-mode = "rmii"; - phy-reset-gpios = <&gpio7 6 0>; + phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx53-voipac-dmm-668.dtsi +1 -1
@@ -101,7 +101,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec>; phy-mode = "rmii"; - phy-reset-gpios = <&gpio4 2 0>; + phy-reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx53.dtsi +1 -0
@@ -13,6 +13,7 @@ #include "skeleton.dtsi" #include "imx53-pingrp.h" #include <dt-bindings/clock/imx5-clock.h> +#include <dt-bindings/gpio/gpio.h> / { aliases {
arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts +1 -1
@@ -64,7 +64,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio3 23 0>; + phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6q-gw5400-a.dts +1 -1
@@ -153,7 +153,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio1 30 0>; + phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi +1 -1
@@ -174,7 +174,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio3 23 0>; + phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>; status = "disabled"; };
arch/arm/boot/dts/imx6qdl-gw51xx.dtsi +1 -1
@@ -91,7 +91,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio1 30 0>; + phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +1 -1
@@ -138,7 +138,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio1 30 0>; + phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +1 -1
@@ -147,7 +147,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio1 30 0>; + phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +1 -1
@@ -137,7 +137,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio1 30 0>; + phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi +1 -1
@@ -16,7 +16,7 @@ pinctrl-0 = <&pinctrl_microsom_enet_ar8035>; phy-mode = "rgmii"; phy-reset-duration = <2>; - phy-reset-gpios = <&gpio4 15 0>; + phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +1 -1
@@ -152,7 +152,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio1 27 0>; + phy-reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; txen-skew-ps = <0>; txc-skew-ps = <3000>; rxdv-skew-ps = <0>;
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +1 -1
@@ -132,7 +132,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio1 25 0>; + phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl-wandboard.dtsi +1 -1
@@ -142,7 +142,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; - phy-reset-gpios = <&gpio3 29 0>; + phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl.dtsi +1 -0
@@ -10,6 +10,7 @@ * http://www.gnu.org/copyleft/gpl.html */ +#include <dt-bindings/gpio/gpio.h> #include "skeleton.dtsi" / {
Signature · 1 line
1.8.1.2
PATCH 1/1 ARM: imx: Explicitly pass the active level of the PHY reset
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Since commit
7a399e3a2e(fec: Do not assume that PHY reset is active low), we no longer assume that the PHY reset is active low.Now we need to retrieve this information from the device tree instead.
Quoted 8 lines
Passing '0' as the phy-reset-gpios means 'active high' according to the definition from
include/dt-bindings/gpio/gpio.h:#define
GPIO_ACTIVE_HIGH0
#defineGPIO_ACTIVE_LOW1, so in order to keep things working as before we need to explicitly pass
GPIO_ACTIVE_LOWas the flag.
So it sounds like we have a git bisect issue here.
Quoted 7 lines
Signed-off-by Fabio Estevam <[email protected]>---
Shawn,This is needed for 3.13 as
7a399e3a2e(fec: Do not assume that PHY reset is active low) already reached mainline.
If this is needed for 3.13, you should generate the patch against the mainline where the fec change is in place rather than my for-next branch. And for those dts files that can only be patched against my for-next branch, we need another patch.
Shawn
Fabio Estevam
reviewerPATCH 1/1 ARM: imx: Explicitly pass the active level of the PHY reset
Hi Shawn,
Quoted 4 lines · Shawn Guo
If this is needed for 3.13, you should generate the patch against the mainline where the fec change is in place rather than my for-next branch. And for those dts files that can only be patched against my for-next branch, we need another patch.
If this patch goes via your for-next there will be no harm to your tree, since the fec driver will just ignore the gpio flag and the behaviour will be the same as before.
If you are not happy with it, then I will have to generate the patch against mainline and ask davem to apply it.
Regards,
Fabio Estevam
PATCH 1/1 ARM: imx: Explicitly pass the active level of the PHY reset
Quoted 4 lines · Fabio Estevam
Hi Shawn,
On Fri, Jan 3, 2014 at 1:22 AM, Shawn Guo <[email protected]> wrote:
Quoted 8 lines
Quoted 4 lines
If this is needed for 3.13, you should generate the patch against the mainline where the fec change is in place rather than my for-next branch. And for those dts files that can only be patched against my for-next branch, we need another patch.
If this patch goes via your for-next there will be no harm to your tree, since the fec driver will just ignore the gpio flag and the behaviour will be the same as before.
You need to know that my for-next branch target is v3.14-rc not v3.13.
Quoted 3 lines
If you are not happy with it, then I will have to generate the patch against mainline and ask davem to apply it.
You have to generate a patch against mainline, and we can send it via arm-soc tree.
Shawn
Fabio Estevam
reviewerPATCH 1/1 ARM: imx: Explicitly pass the active level of the PHY reset
Quoted 5 lines · Shawn Guo
Quoted 3 lines
If this patch goes via your for-next there will be no harm to your tree, since the fec driver will just ignore the gpio flag and the behaviour will be the same as before.
You need to know that my for-next branch target is v3.14-rc not v3.13.
Yes, you are right.
Quoted 6 lines
Quoted 3 lines
If you are not happy with it, then I will have to generate the patch against mainline and ask davem to apply it.
You have to generate a patch against mainline, and we can send it via arm-soc tree.
Understood. Will send it soon.
Thanks,
Fabio Estevam