Skip to contentSkip to conversation

ARM: dts: phycore-imx6: refactor fec nodes

PATCH Applied Stefan Lengfeld 2 participants 4 messages Nov 28, 2016 – Dec 7, 2016

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

PATCH 1/3 ARM: dts: phycore-imx6: refactor fec nodes

Refactor the common settings for device tree node 'fec' into the generic phycore i.MX6 device tree file. This avoid redundant settings and makes common fixes easier. Our kernel device tree files have the same layout.

---
 arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts | 17 ++++-------------
 arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts | 17 ++++-------------
 arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts  | 17 ++++-------------
 arch/arm/dts/imx6q-phytec-phycore-som-nand.dts  | 17 ++++-------------
 arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi    | 13 +++++++++++++
 5 files changed, 29 insertions(+), 52 deletions(-)
arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts +4 -13
index fc153a6..bffee5f 100644
@@ -29,21 +29,12 @@
 	status = "okay";
 };
 
+&ethphy {
+	max-speed = <100>;
+};
+
 &fec {
 	status = "okay";
-	phy-handle = <&ethphy>;
-	phy-mode = "rgmii";
-	phy-reset-gpios = <&gpio1 14 1>;
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		ethphy: ethernet-phy@3 {
-			reg = <3>;
-			max-speed = <100>;
-		};
-	};
 };
 
 &flash {
arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts +4 -13
index 3f2f1c7..1b66fda 100644
@@ -24,21 +24,12 @@
 	status = "okay";
 };
 
+&ethphy {
+	max-speed = <100>;
+};
+
 &fec {
 	status = "okay";
-	phy-handle = <&ethphy>;
-	phy-mode = "rgmii";
-	phy-reset-gpios = <&gpio1 14 1>;
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		ethphy: ethernet-phy@3 {
-			reg = <3>;
-			max-speed = <100>;
-		};
-	};
 };
 
 &gpmi {
arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts +4 -13
index 74bc09b..ecc5aa3 100644
@@ -28,21 +28,12 @@
 	status = "okay";
 };
 
+&ethphy {
+	max-speed = <1000>;
+};
+
 &fec {
 	status = "okay";
-	phy-handle = <&ethphy>;
-	phy-mode = "rgmii";
-	phy-reset-gpios = <&gpio1 14 1>;
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		ethphy: ethernet-phy@3 {
-			reg = <3>;
-			max-speed = <1000>;
-		};
-	};
 };
 
 &flash {
arch/arm/dts/imx6q-phytec-phycore-som-nand.dts +4 -13
index aa2c94a..9ad7eda 100644
@@ -29,21 +29,12 @@
 	status = "okay";
 };
 
+&ethphy {
+	max-speed = <1000>;
+};
+
 &fec {
 	status = "okay";
-	phy-handle = <&ethphy>;
-	phy-mode = "rgmii";
-	phy-reset-gpios = <&gpio1 14 1>;
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		ethphy: ethernet-phy@3 {
-			reg = <3>;
-			max-speed = <1000>;
-		};
-	};
 };
 
 &flash {
arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi +13 -0
index d446a5e..9649817 100644
@@ -10,6 +10,7 @@
  */
 
 #include "imx6qdl.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	chosen {
@@ -76,7 +77,19 @@
 &fec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet>;
+	phy-handle = <&ethphy>;
+	phy-mode = "rgmii";
+	phy-reset-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 	status = "disabled";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethphy: ethernet-phy@3 {
+			reg = <3>;
+		};
+	};
 };
 
 &gpmi {
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 2/3 ARM: dts: phycore-imx6: fix missing ?xc-skew-ps settings for ethphy

Add the missing txc-skew-ps and rxc-skew-ps settings for the Micrel PHY. I have seen problems with 1GBit ethernet on a phyCORE-i.MX6 Solo. Oddly enough the missing skew values are no problems for all our other modules.

---
 arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi +2 -0
index 9649817..76777e8 100644
@@ -88,6 +88,8 @@
 
 		ethphy: ethernet-phy@3 {
 			reg = <3>;
+			txc-skew-ps = <1680>;
+			rxc-skew-ps = <1860>;
 		};
 	};
 };
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 3/3 ARM: dts: phycore-imx6: remove unnecessary include

In reply to Stefan Lengfeld

The file 'imx6qdl.dtsi' is already included by DualLite/Solo and Dual/Quad specific files 'imx6dl.dtsi' and 'imx6q.dtsi'. So the include is not needed here.

---
 arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi +0 -1
index 76777e8..1e04ce1 100644
@@ -9,7 +9,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "imx6qdl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 
 / {
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#3 lore raw
In reply to Stefan Lengfeld
Quoted 4 lines · Stefan Lengfeld

Refactor the common settings for device tree node 'fec' into the generic phycore i.MX6 device tree file. This avoid redundant settings and makes common fixes easier. Our kernel device tree files have the same layout.

Quoted 8 lines
---
 arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts | 17 ++++-------------
 arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts | 17 ++++-------------
 arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts  | 17 ++++-------------
 arch/arm/dts/imx6q-phytec-phycore-som-nand.dts  | 17 ++++-------------
 arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi    | 13 +++++++++++++
 5 files changed, 29 insertions(+), 52 deletions(-)

Applied, thanks

Sascha

Quoted 162 lines
arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts +4 -13
index fc153a6..bffee5f 100644
@@ -29,21 +29,12 @@
 	status = "okay";
 };
 
+&ethphy {
+	max-speed = <100>;
+};
+
 &fec {
 	status = "okay";
-	phy-handle = <&ethphy>;
-	phy-mode = "rgmii";
-	phy-reset-gpios = <&gpio1 14 1>;
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		ethphy: ethernet-phy@3 {
-			reg = <3>;
-			max-speed = <100>;
-		};
-	};
 };
 
 &flash {
arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts +4 -13
index 3f2f1c7..1b66fda 100644
@@ -24,21 +24,12 @@
 	status = "okay";
 };
 
+&ethphy {
+	max-speed = <100>;
+};
+
 &fec {
 	status = "okay";
-	phy-handle = <&ethphy>;
-	phy-mode = "rgmii";
-	phy-reset-gpios = <&gpio1 14 1>;
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		ethphy: ethernet-phy@3 {
-			reg = <3>;
-			max-speed = <100>;
-		};
-	};
 };
 
 &gpmi {
arch/arm/dts/imx6q-phytec-phycore-som-emmc.dts +4 -13
index 74bc09b..ecc5aa3 100644
@@ -28,21 +28,12 @@
 	status = "okay";
 };
 
+&ethphy {
+	max-speed = <1000>;
+};
+
 &fec {
 	status = "okay";
-	phy-handle = <&ethphy>;
-	phy-mode = "rgmii";
-	phy-reset-gpios = <&gpio1 14 1>;
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		ethphy: ethernet-phy@3 {
-			reg = <3>;
-			max-speed = <1000>;
-		};
-	};
 };
 
 &flash {
arch/arm/dts/imx6q-phytec-phycore-som-nand.dts +4 -13
index aa2c94a..9ad7eda 100644
@@ -29,21 +29,12 @@
 	status = "okay";
 };
 
+&ethphy {
+	max-speed = <1000>;
+};
+
 &fec {
 	status = "okay";
-	phy-handle = <&ethphy>;
-	phy-mode = "rgmii";
-	phy-reset-gpios = <&gpio1 14 1>;
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		ethphy: ethernet-phy@3 {
-			reg = <3>;
-			max-speed = <1000>;
-		};
-	};
 };
 
 &flash {
arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi +13 -0
index d446a5e..9649817 100644
@@ -10,6 +10,7 @@
  */
 
 #include "imx6qdl.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	chosen {
@@ -76,7 +77,19 @@
 &fec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet>;
+	phy-handle = <&ethphy>;
+	phy-mode = "rgmii";
+	phy-reset-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 	status = "disabled";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethphy: ethernet-phy@3 {
+			reg = <3>;
+		};
+	};
 };
 
 &gpmi {
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox