linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6dl: SolidRun: add phy node with 100Mb/s max-speed
@ 2019-09-10 15:55 tinywrkb
  2019-09-10 16:10 ` Fabio Estevam
                   ` (3 more replies)
  0 siblings, 4 replies; 31+ messages in thread
From: tinywrkb @ 2019-09-10 15:55 UTC (permalink / raw)
  Cc: tinywrkb, Russell King, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list

Cubox-i Solo/DualLite carrier board has 100Mb/s magnetics while the
Atheros AR8035 PHY on the MicroSoM v1.3 CPU module is a 1GbE PHY device.

Since commit 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in
genphy_read_status") ethernet is broken on Cubox-i Solo/DualLite devices.

This adds a phy node to the MicroSoM DTS and a 100Mb/s max-speed limit
to the Cubox-i Solo/DualLite carrier DTS.

Signed-off-by: tinywrkb <tinywrkb@gmail.com>
---
This patch fixes ethernet on my Cubox-i2-300-D which is limited to 100Mb/s,
afaik due to the carrier board  magnetics, and was since commit 5502b218e001
("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")

The AR8035 PHY on the CPU module reports to the driver as 1GbE capable
via MII_BSMR's BMSR_ESTATEN status bit, the auto-negotiation sets the
speed at 1GbE while the carrier board can't support it.
Same behavior with the generic phy_device and the at803x drivers.

While the PHY is on the CPU module board I added the max-speed limit to
the cubox-i carrier DTS as I suspect that if the Solo or DualLite v1.3
MicroSoM will be connected to a 1GbE capable carrier board then it would
work correctly with 1GbE.

I can confirm that this commit doesn't break networking on the my
Cubox-i4Pro Quad (i4P-300-D) with it's 1GbE capable carrier board, and
was tested separately with the generic phy_device and at803x drivers.

 arch/arm/boot/dts/imx6dl-cubox-i.dts  | 4 ++++
 arch/arm/boot/dts/imx6qdl-sr-som.dtsi | 9 +++++++++
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx6dl-cubox-i.dts b/arch/arm/boot/dts/imx6dl-cubox-i.dts
index 2b1b3e193f53..cfc82513c78c 100644
--- a/arch/arm/boot/dts/imx6dl-cubox-i.dts
+++ b/arch/arm/boot/dts/imx6dl-cubox-i.dts
@@ -49,3 +49,7 @@
 	model = "SolidRun Cubox-i Solo/DualLite";
 	compatible = "solidrun,cubox-i/dl", "fsl,imx6dl";
 };
+
+&ethphy {
+	max-speed = <100>;
+};
diff --git a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
index 6d7f6b9035bc..969bc96c3f99 100644
--- a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
@@ -57,6 +57,15 @@
 	phy-reset-duration = <2>;
 	phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
 	status = "okay";
+	phy-handle = <&ethphy>;
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		ethphy: ethernet-phy@0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <0>;
+		};
+	};
 };
 
 &iomuxc {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2019-09-20 13:42 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 15:55 [PATCH] ARM: dts: imx6dl: SolidRun: add phy node with 100Mb/s max-speed tinywrkb
2019-09-10 16:10 ` Fabio Estevam
2019-09-10 16:17 ` Baruch Siach
2019-09-10 16:46 ` Russell King - ARM Linux admin
2019-09-10 18:50 ` Andrew Lunn
2019-09-15  6:30   ` Baruch Siach
2019-09-15 12:29     ` Russell King - ARM Linux admin
2019-09-15 13:56     ` Andrew Lunn
2019-09-15 14:06       ` Russell King - ARM Linux admin
2019-09-15 14:15         ` Russell King - ARM Linux admin
2019-09-15 14:42           ` Andrew Lunn
2019-09-15 14:58             ` Russell King - ARM Linux admin
2019-09-17 12:41       ` tinywrkb
2019-09-17 12:54         ` Andrew Lunn
2019-09-17 13:32           ` tinywrkb
2019-09-17 13:39             ` Russell King - ARM Linux admin
2019-09-17 15:17               ` Russell King - ARM Linux admin
2019-09-17 15:30                 ` Russell King - ARM Linux admin
2019-09-17 16:34                   ` tinywrkb
2019-09-17 17:04                     ` Russell King - ARM Linux admin
2019-09-17 17:19                       ` Russell King - ARM Linux admin
2019-09-17 17:26                         ` Andrew Lunn
2019-09-17 17:37                           ` Russell King - ARM Linux admin
2019-09-17 18:19                             ` Russell King - ARM Linux admin
2019-09-17 18:39                               ` Andrew Lunn
2019-09-20 10:36                                 ` Russell King - ARM Linux admin
2019-09-17 21:42                         ` Russell King - ARM Linux admin
2019-09-20 13:42                           ` Russell King - ARM Linux admin
2019-09-17 22:30             ` Russell King - ARM Linux admin
2019-09-17 22:43               ` Russell King - ARM Linux admin
2019-09-18 14:45                 ` tinywrkb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).