Skip to contentSkip to conversation

ARM: dts: imx6qdl-sabresd: Add an mdio node

PATCH Applied Fabio Estevam 3 participants 5 messages Jul 13, 2020 – Jul 20, 2020

Subsystems (2)

v2 of 3 Applied Latest is v3 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v2 1/2 ARM: dts: imx6qdl-sabresd: Add an mdio node

imx6qdl-sabresd has an Atheros AR8031 Ethernet PHY at address 1.

The AR8031 provides a 125MHz clock to the ENET_REF_CLK i.MX6 pin.

Improve the Ethernet representation by adding an mdio node with such information.

An advantage of adding the mdio node is that the AR8031 initialization code in the mx6sabresd board file in U-Boot can totally be removed.

---
Changes since v1:
- None. Only inverted the order of the patches

 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +11 -0
index 28b35ccb3757..6524ad4b0010 100644
@@ -203,9 +203,20 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet>;
 	phy-mode = "rgmii-id";
+	phy-handle = <&phy>;
 	phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
 	fsl,magic-packet;
 	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		phy: ethernet-phy@1 {
+			reg = <1>;
+			qca,clk-out-frequency = <125000000>;
+		};
+	};
 };
 
 &hdmi {
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#1 lore raw

PATCH v2 2/2 ARM: dts: imx6qdl-sabresd: Pass reset-assert-us

According to the AR8031 datasheet:

"When using crystal, clock is generated internally after the power is stable. In order to get reliable power-on-reset, it is recommended to keep asserting the reset low signal long enough (10 ms) to ensure the clock is stable and clock-to-reset (1 ms) requirement is satisfied."

Pass the 'reset-assert-us' property to describe such requirement.

While at it, use the 'reset-gpios' property inside the the mdio node instead of the deprecated usage of 'phy-reset-gpios'.

---
Changes since v1:
- Use reset-gpios and reset-assert-us inside the mdio node instead of the deprecated usage of phy-reset-gpios (Soeren)

 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +2 -1
index 6524ad4b0010..5597d45fffda 100644
@@ -204,7 +204,6 @@
 	pinctrl-0 = <&pinctrl_enet>;
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy>;
-	phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
 	fsl,magic-packet;
 	status = "okay";
 
@@ -215,6 +214,8 @@
 		phy: ethernet-phy@1 {
 			reg = <1>;
 			qca,clk-out-frequency = <125000000>;
+			reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
 		};
 	};
 };
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] ARM: dts: imx6qdl-sabresd: Pass reset-assert-us

Quoted 7 lines · Fabio Estevam

According to the AR8031 datasheet:

"When using crystal, clock is generated internally after the power is stable. In order to get reliable power-on-reset, it is recommended to keep asserting the reset low signal long enough (10 ms) to ensure the clock is stable and clock-to-reset (1 ms) requirement is satisfied."

Quoted 6 lines

Pass the 'reset-assert-us' property to describe such requirement.

While at it, use the 'reset-gpios' property inside the the mdio node instead of the deprecated usage of 'phy-reset-gpios'.

Thanks,
Soeren

Quoted 21 lines

---
Changes since v1:
- Use reset-gpios and reset-assert-us inside the mdio node instead of the deprecated usage of phy-reset-gpios (Soeren)

 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -1
index 6524ad4b0010..5597d45fffda 100644
@@ -204,7 +204,6 @@
 	pinctrl-0 = <&pinctrl_enet>;
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy>;
-	phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
 	fsl,magic-packet;
 	status = "okay";
 

arch/arm/boot/dts/imx6qdl-sabresd.dtsi line 221

Quoted 8 lines
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +2 -0
@@ -215,6 +214,8 @@
 		phy: ethernet-phy@1 {
 			reg = <1>;
 			qca,clk-out-frequency = <125000000>;
+			reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
 		};
 	};
 };

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Reviewed-by on v2 1/2
#3 lore raw
In reply to Fabio Estevam
Quoted 11 lines · Fabio Estevam

imx6qdl-sabresd has an Atheros AR8031 Ethernet PHY at address 1.

The AR8031 provides a 125MHz clock to the ENET_REF_CLK i.MX6 pin.

Improve the Ethernet representation by adding an mdio node with such information.

An advantage of adding the mdio node is that the AR8031 initialization code in the mx6sabresd board file in U-Boot can totally be removed.

Thanks,
Soeren

Quoted 22 lines

---
Changes since v1:
- None. Only inverted the order of the patches

 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +4 -0
index 28b35ccb3757..6524ad4b0010 100644
@@ -203,9 +203,20 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet>;
 	phy-mode = "rgmii-id";
+	phy-handle = <&phy>;
 	phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
 	fsl,magic-packet;
 	status = "okay";
+
+	mdio {
+		#address-cells = <1>;

arch/arm/boot/dts/imx6qdl-sabresd.dtsi line 222

Quoted 10 lines
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +7 -0
+		#size-cells = <0>;
+
+		phy: ethernet-phy@1 {
+			reg = <1>;
+			qca,clk-out-frequency = <125000000>;
+		};
+	};
 };
 
 &hdmi {

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Applied
#4 lore raw
In reply to Fabio Estevam
Quoted 11 lines · Fabio Estevam

imx6qdl-sabresd has an Atheros AR8031 Ethernet PHY at address 1.

The AR8031 provides a 125MHz clock to the ENET_REF_CLK i.MX6 pin.

Improve the Ethernet representation by adding an mdio node with such information.

An advantage of adding the mdio node is that the AR8031 initialization code in the mx6sabresd board file in U-Boot can totally be removed.

Applied both, thanks.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel