ARM: dts: imx: Fix Ethernet PHY reset polarity
authorFabio Estevam <fabio.estevam@nxp.com>
Sun, 4 Jun 2017 17:31:15 +0000 (14:31 -0300)
committerShawn Guo <shawnguo@kernel.org>
Mon, 5 Jun 2017 15:24:13 +0000 (23:24 +0800)
The FEC driver ignores the GPIO polarity from 'phy-reset-gpios' and
considers that the Ethernet PHY is active low, unless the
property 'phy-reset-active-high' is present.

Fix the device tree description by explicitly passing the
'GPIO_ACTIVE_LOW' flag to the 'phy-reset-gpios' property.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
32 files changed:
arch/arm/boot/dts/imx25-karo-tx25.dts
arch/arm/boot/dts/imx25-pdk.dts
arch/arm/boot/dts/imx25.dtsi
arch/arm/boot/dts/imx28-cfa10037.dts
arch/arm/boot/dts/imx28-cfa10049.dts
arch/arm/boot/dts/imx28-cfa10057.dts
arch/arm/boot/dts/imx28-cfa10058.dts
arch/arm/boot/dts/imx28-eukrea-mbmx287lc.dts
arch/arm/boot/dts/imx28-evk.dts
arch/arm/boot/dts/imx28-m28cu3.dts
arch/arm/boot/dts/imx50-evk.dts
arch/arm/boot/dts/imx50.dtsi
arch/arm/boot/dts/imx51-apf51.dts
arch/arm/boot/dts/imx53-mba53.dts
arch/arm/boot/dts/imx53-qsb-common.dtsi
arch/arm/boot/dts/imx53-smd.dts
arch/arm/boot/dts/imx53-tx53.dtsi
arch/arm/boot/dts/imx53-voipac-dmm-668.dtsi
arch/arm/boot/dts/imx6dl-riotboard.dts
arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts
arch/arm/boot/dts/imx6q-evi.dts
arch/arm/boot/dts/imx6q-gw5400-a.dts
arch/arm/boot/dts/imx6q-novena.dts
arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi
arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
arch/arm/boot/dts/imx6qdl-sabresd.dtsi
arch/arm/boot/dts/imx6qdl-tx6.dtsi
arch/arm/boot/dts/imx6qdl-wandboard.dtsi
arch/arm/boot/dts/imx6ul-tx6ul-mainboard.dts
arch/arm/boot/dts/imx6ul-tx6ul.dtsi

index 9b31faa96377ad0b5e0e00f30743f90e20ddae1c..30a62d4be8d9063147cced897b3c4df325c47b5d 100644 (file)
@@ -97,7 +97,7 @@
 &fec {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_fec>;
-       phy-reset-gpios = <&gpio3 7 0>;
+       phy-reset-gpios = <&gpio3 7 GPIO_ACTIVE_LOW>;
        phy-mode = "rmii";
        phy-supply = <&reg_fec_phy>;
        status = "okay";
index d921dd2ed6761370ac9250c3ea9f6ce26af86ec1..c52692821fb14beb23408e2297288fd77b751a44 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_fec>;
        phy-supply = <&reg_fec_3v3>;
-       phy-reset-gpios = <&gpio4 8 0>;
+       phy-reset-gpios = <&gpio4 8 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
index 0cdf333336cde8e5276e9de8475a9776618f099d..dfcc8e00cf1c53a753dc753c2c5598b220b480a1 100644 (file)
@@ -9,6 +9,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#include <dt-bindings/gpio/gpio.h>
 #include "imx25-pinfunc.h"
 
 / {
index e5beaa58bb40262fcd42297615f476a9881eff17..3d13b321d27b9897b4b571bdbdffaee24acc822a 100644 (file)
@@ -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";
                };
index a9c347e48bcfc502eee7d959320b73df17552eb1..4cd52d53cf004e4fc1ffe3928a10c6e0dc1d87e4 100644 (file)
                        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";
                };
index 7a80bd686c402a6449bceb3dc35f91da5e1f1d7d..c6067915b238d1726f62a0357c1cb500206bc68d 100644 (file)
                        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";
                };
index f5c6dce34abece85594ce4674af9618d5c879157..70c7bb4a5a0e287ca6ce9a97057d604f10bc943f 100644 (file)
                        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";
                };
index e773144e1e030b9bc5ea36868d3a54971d0467fa..b61fd61eb1c70483a645608e51aec4ec299432b4 100644 (file)
@@ -31,7 +31,7 @@
        phy-mode = "rmii";
        pinctrl-names = "default";
        pinctrl-0 = <&mac1_pins_a>;
-       phy-reset-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio3 27 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
index b88c087f1fea467a49615e9e920c71630fa1dfc7..5309bb90d7d586cbadfc6b61777761595b5d35c8 100644 (file)
                        pinctrl-names = "default";
                        pinctrl-0 = <&mac0_pins_a>;
                        phy-supply = <&reg_fec_3v3>;
-                       phy-reset-gpios = <&gpio4 13 0>;
+                       phy-reset-gpios = <&gpio4 13 GPIO_ACTIVE_LOW>;
                        phy-reset-duration = <100>;
                        status = "okay";
                };
index bb5329479c62fd471d35c57ebc1233f0ca3e9119..9d6c8fe28d746983cbf3934f0a3db3a346d572c7 100644 (file)
                        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";
                };
index dba2d951aa15323be39a717c4f3b4c69cf9ae1aa..98b5faa06e27e4a48f227eb21974f11e661b235f 100644 (file)
@@ -53,7 +53,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";
 };
 
index 2a98afcd8a4e302834596ab40655646c097b3ccc..3747d80104f4530226638a9051e18ba14f457701 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include "imx50-pinfunc.h"
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/clock/imx5-clock.h>
 
 / {
index e88b2a6be079d855a985ca8bb18677895f7a7494..c83ac160032234f55d4f5c9b45cef1e0e8f21ae3 100644 (file)
@@ -36,7 +36,7 @@
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_fec>;
        phy-mode = "mii";
-       phy-reset-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
        phy-reset-duration = <1>;
        status = "okay";
 };
index 2e44d2aba14e08081075769ac1f59325a4db4d00..df705ba48897f87bad941c11dd693150867f9df4 100644 (file)
 };
 
 &fec {
-       phy-reset-gpios = <&gpio7 6 0>;
+       phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
index 40b3e31935d0b765aaaed03d27aa21a71eff0e04..683dcbe27cbd63b6b30a8e20b7dc52d604a84616 100644 (file)
        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";
 };
 
index 472f6f0f55b3802b49f6a17f00b122ac92708a07..33cb64fc8372bbfd8d4f1d17840bd307e0e92a2a 100644 (file)
        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";
 };
index 3a32201419881455a54789a6f76e5efb7a34ecd5..7807c1fa110176b12cfa26f238186da8dcdeafe7 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_fec>;
        phy-mode = "rmii";
-       phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
        phy-handle = <&phy0>;
        mac-address = [000000000000]; /* placeholder; will be overwritten by bootloader */
        status = "okay";
index 524192cf6a0f0de10298e0e75c9db1945620188c..df8dafe2564dd99badafe331cef704dcb6e1c096 100644 (file)
        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";
 };
 
index 2cb72824e8004801526cdbd1b6261ba81b3c3ca3..29b45f2e64e0ad1073a9289588601cbcfb358719 100644 (file)
@@ -94,7 +94,7 @@
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rgmii";
-       phy-reset-gpios = <&gpio3 31 0>;
+       phy-reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
        interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
                              <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
        fsl,err006687-workaround-present;
index f28883bbe7b16db60cbd67bb21b75c94ea5c4626..0c5b2c38214ec2c7f6fd4bd98b7780c4e62d92ae 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rgmii";
-       phy-reset-gpios = <&gpio1 25 0>;
+       phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
        phy-supply = <&vgen2_1v2_eth>;
        status = "okay";
 };
index fd2220aa49e278f6dac12a553a306e62ea296e66..1f0f950dc11efa7ba344fa2ec02f7217b3a3294f 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rgmii";
-       phy-reset-gpios = <&gpio1 25 0>;
+       phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
        interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
                              <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
        fsl,err006687-workaround-present;
index 687ab911c13f9956525c751f2da4b4c088ef828f..9dbeea05a9495f6fc2b5e56b55659508ca1230df 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rgmii-id";
-       phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
index 0fa32b2f3aec92cd175a194047c7fd535b329ae3..c21db67349c49a95e3a9200e20c12d008dd1c69c 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet_novena>;
        phy-mode = "rgmii";
-       phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
        rxc-skew-ps = <3000>;
        rxdv-skew-ps = <0>;
        txc-skew-ps = <3000>;
index b2debc0aa7207f097988bc661c89fff8c9a7c2e6..7d64075204ae5f3a15f4f4e47cc58fb953e7712d 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rmii";
-       phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
index ec68f1cace31c4611c904c053a83b3d4efd89915..ed6a89f724a5150295e5ba19db6c4056174ca9f1 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rgmii";
-       phy-reset-gpios = <&gpio7 18 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio7 18 GPIO_ACTIVE_LOW>;
        txd0-skew-ps = <0>;
        txd1-skew-ps = <0>;
        txd2-skew-ps = <0>;
index a9b207751a02fe2f9cc101f57d436f7a31080e39..900e8c781f9195ef5e08da315e8bb63a4afe734b 100644 (file)
@@ -46,7 +46,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";
 };
 
index 70772ebadd4d438f9620983c559551900e4cdfac..f22e5879340bc41c7f722c9d3314a41935070a11 100644 (file)
        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>;
index 58055ceec6dcf97960a6fe239aa1e1f47b140e60..db705f1cbe379ba14e800e4baa9da73a3587d489 100644 (file)
        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";
 };
 
index a146fe7fdc5a0fe4f4a8108bcbf3c587d09330c9..c6bec97fbeaf567c19046c8b39ec1f6dddbcdd5c 100644 (file)
                 <&clks IMX6QDL_CLK_ENET_REF>;
        clock-names = "ipg", "ahb", "ptp", "enet_out";
        phy-mode = "rmii";
-       phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
        phy-handle = <&etnphy>;
        phy-supply = <&reg_3v3_etn>;
        status = "okay";
index 850ceadbc2cf739d9b509c40e24c4b35bdba4d0b..b4fa7f1d63da1e54b3a09108ff74fc0b80d7ccfb 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rgmii";
-       phy-reset-gpios = <&gpio3 29 0>;
+       phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>;
        interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
                              <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
        fsl,err006687-workaround-present;
index 7c5dd1b316ca1431d5cbc78ad1a5d26a89edc431..28d055e3f3010fef8964f1aad5606cca1824e2e5 100644 (file)
@@ -78,7 +78,7 @@
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet2 &pinctrl_enet2_mdio &pinctrl_etnphy1_rst>;
        phy-mode = "rmii";
-       phy-reset-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
        phy-supply = <&reg_3v3_etn>;
        phy-handle = <&etnphy1>;
        status = "okay";
index 4ccc9e9d2c29882302d1cc0dd9df5d113098318a..ec745eb3b6a853b1aab6eb7faab14c30e68bcdf7 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet1 &pinctrl_enet1_mdio &pinctrl_etnphy0_rst>;
        phy-mode = "rmii";
-       phy-reset-gpios = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio5 6 GPIO_ACTIVE_LOW>;
        phy-supply = <&reg_3v3_etn>;
        phy-handle = <&etnphy0>;
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet2 &pinctrl_etnphy1_rst>;
        phy-mode = "rmii";
-       phy-reset-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
+       phy-reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
        phy-supply = <&reg_3v3_etn>;
        phy-handle = <&etnphy1>;
        status = "disabled";