Skip to contentSkip to conversation

ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6DL

PATCH Applied Jagan Teki 6 participants 9 messages Dec 30, 2019 – Jan 22, 2020

Subsystems (3)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v2 1/3 ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6DL

The EDIMM STARTER KIT i.Core 1.5 MIPI Evaluation is based on the 1.5 version of the i.Core MX6 cpu module. The 1.5 version differs from the original one for a few details, including the ethernet PHY interface clock provider.

With this commit, the ethernet interface works properly:
SMSC LAN8710/LAN8720 2188000.ethernet-1:00: attached PHY driver

While before using the 1.5 version, ethernet failed to startup do to un-clocked PHY interface:
fec 2188000.ethernet eth0: could not attach to PHY

Similar fix has merged for i.Core MX6Q but missed to update for DL.

Fixes a8039f2dd089 ("ARM: dts: imx6dl: Add Engicam i.CoreM6 1.5 Quad/Dual MIPI starter kit support")
Cc Jacopo Mondi <[email protected]>

---
Changes for v2:
- Add Michael s-o-b

 arch/arm/boot/dts/imx6dl-icore-mipi.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6dl-icore-mipi.dts +1 -1
index e43bccb78ab2..d8f3821a0ffd 100644
@@ -8,7 +8,7 @@
 /dts-v1/;
 
 #include "imx6dl.dtsi"
-#include "imx6qdl-icore.dtsi"
+#include "imx6qdl-icore-1.5.dtsi"
 
 / {
 	model = "Engicam i.CoreM6 DualLite/Solo MIPI Starter Kit";
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#1 lore raw

PATCH v2 2/3 ARM: dts: imx6qdl-icore-1.5: Remove duplicate phy reset methods

From: Michael Trimarchi <[email protected]>

Engicam i.CoreM6 1.5 Quad/Dual MIPI dtsi is reusing fec node from Engicam i.CoreM6 dtsi but have sampe copy of phy-reset-gpio and phy-mode properties.

So, drop this phy reset methods from imx6qdl-icore-1.5 dsti file.

---
Changes for v2:
- new patch.

 arch/arm/boot/dts/imx6qdl-icore-1.5.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm/boot/dts/imx6qdl-icore-1.5.dtsi +0 -2
index d91d46b5898f..0fd7f2e24d9c 100644
@@ -25,10 +25,8 @@
 &fec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet>;
-	phy-reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
 	clocks = <&clks IMX6QDL_CLK_ENET>,
 		 <&clks IMX6QDL_CLK_ENET>,
 		 <&clks IMX6QDL_CLK_ENET_REF>;
-	phy-mode = "rmii";
 	status = "okay";
 };
Signature · 1 line
2.18.0.321.gffc6fa0e3
Tested-by on v2 2/3
#2 lore raw

Re: [PATCH v2 2/3] ARM: dts: imx6qdl-icore-1.5: Remove duplicate phy reset methods

Hi Jagan,
small detail, this should come -after= 3/3 in the series, am I wrong ?

Quoted 11 lines · Jagan Teki

From: Michael Trimarchi <[email protected]>

Engicam i.CoreM6 1.5 Quad/Dual MIPI dtsi is reusing fec node from Engicam i.CoreM6 dtsi but have sampe copy of phy-reset-gpio and phy-mode properties.

So, drop this phy reset methods from imx6qdl-icore-1.5 dsti file.

Anyway, I've tested on my iCore 1.5 Quad starter kit and things are still working.

Pending acceptance of 3/3, which seem correct to me but I cannot really judge knowing very few things about net:

Thanks
j

Quoted 25 lines

---
Changes for v2:
- new patch.

 arch/arm/boot/dts/imx6qdl-icore-1.5.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm/boot/dts/imx6qdl-icore-1.5.dtsi +0 -3
index d91d46b5898f..0fd7f2e24d9c 100644
@@ -25,10 +25,8 @@
 &fec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet>;
-	phy-reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
 	clocks = <&clks IMX6QDL_CLK_ENET>,
 		 <&clks IMX6QDL_CLK_ENET>,
 		 <&clks IMX6QDL_CLK_ENET_REF>;
-	phy-mode = "rmii";
 	status = "okay";
 };
--

2.18.0.321.gffc6fa0e3

author
#3 lore raw

PATCH v2 3/3 ARM: dts: imx6qdl-icore: Add fec phy-handle

In reply to Jagan Teki

From: Michael Trimarchi <[email protected]>

LAN8720 needs a reset of every clock enable. The reset needs to be done at device level, due the flag PHY_RST_AFTER_CLK_EN.

So, add phy-handle by creating mdio child node inside fec. This will eventually move the phy-reset-gpio which is defined in fec node.

---
Changes for v2:
- new patch.

 arch/arm/boot/dts/imx6qdl-icore.dtsi | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-icore.dtsi +14 -1
index 7814f1ef0804..756f3a9f1b4f 100644
@@ -150,10 +150,23 @@
 &fec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet>;
-	phy-reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
 	clocks = <&clks IMX6QDL_CLK_ENET>, <&clks IMX6QDL_CLK_ENET>, <&rmii_clk>;
 	phy-mode = "rmii";
+	phy-handle = <&eth_phy>;
 	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		eth_phy: ethernet-phy@0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <0>;
+			reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <4000>;
+			reset-deassert-us = <4000>;
+		};
+	};
 };
 
 &gpmi {
Signature · 1 line
2.18.0.321.gffc6fa0e3
Reviewed-by on v2 1/3
#4 lore raw
In reply to Jagan Teki

Hi Jagan,

Quoted 30 lines · Jagan Teki

The EDIMM STARTER KIT i.Core 1.5 MIPI Evaluation is based on the 1.5 version of the i.Core MX6 cpu module. The 1.5 version differs from the original one for a few details, including the ethernet PHY interface clock provider.

With this commit, the ethernet interface works properly:
SMSC LAN8710/LAN8720 2188000.ethernet-1:00: attached PHY driver

While before using the 1.5 version, ethernet failed to startup do to un-clocked PHY interface:
fec 2188000.ethernet eth0: could not attach to PHY

Similar fix has merged for i.Core MX6Q but missed to update for DL.

Fixes a8039f2dd089 ("ARM: dts: imx6dl: Add Engicam i.CoreM6 1.5 Quad/Dual MIPI starter kit support")
Cc Jacopo Mondi <[email protected]>

---
Changes for v2:
- Add Michael s-o-b

 arch/arm/boot/dts/imx6dl-icore-mipi.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6dl-icore-mipi.dts +0 -0
index e43bccb78ab2..d8f3821a0ffd 100644

arch/arm/boot/dts/imx6dl-icore-mipi.dts line 14

Quoted 8 lines
arch/arm/boot/dts/imx6dl-icore-mipi.dts +1 -1
@@ -8,7 +8,7 @@
 /dts-v1/;
 
 #include "imx6dl.dtsi"
-#include "imx6qdl-icore.dtsi"
+#include "imx6qdl-icore-1.5.dtsi"
 
 / {
 	model = "Engicam i.CoreM6 DualLite/Solo MIPI Starter Kit";

In
09ad741b7ece ("ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6")>

I also changed this line to
- model = "Engicam i.CoreM6 Quad/Dual MIPI Starter Kit";
+ model = "Engicam i.CoreM6 1.5 Quad/Dual MIPI Starter Kit";

Maybe you want the same here.

With or without this change:

Thanks
j

Quoted 2 lines

--
2.18.0.321.gffc6fa0e3

Applied
#5 lore raw
In reply to Jagan Teki
Quoted 12 lines · Jagan Teki

The EDIMM STARTER KIT i.Core 1.5 MIPI Evaluation is based on the 1.5 version of the i.Core MX6 cpu module. The 1.5 version differs from the original one for a few details, including the ethernet PHY interface clock provider.

With this commit, the ethernet interface works properly:
SMSC LAN8710/LAN8720 2188000.ethernet-1:00: attached PHY driver

While before using the 1.5 version, ethernet failed to startup do to un-clocked PHY interface:
fec 2188000.ethernet eth0: could not attach to PHY

Quoted 6 lines

Similar fix has merged for i.Core MX6Q but missed to update for DL.

Fixes a8039f2dd089 ("ARM: dts: imx6dl: Add Engicam i.CoreM6 1.5 Quad/Dual MIPI starter kit support")
Cc Jacopo Mondi <[email protected]>

Applied all 3, thanks.

#6 lore raw

The following dtbs build error noticed for arm build on stable rc 4.19 branch.

# make -sk KBUILD_BUILD_USER=KernelCI -C/linux ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc O=build dtbs
 #
 ../arch/arm/boot/dts/imx6dl-icore-mipi.dts:11:10: fatal error:
imx6qdl-icore-1.5.dtsi: No such file or directory
    11 | #include "imx6qdl-icore-1.5.dtsi"
       |          ^~~~~~~~~~~~~~~~~~~~~~~~
 compilation terminated.
 make[2]: *** [scripts/Makefile.lib:294:
arch/arm/boot/dts/imx6dl-icore-mipi.dtb] Error 1
Quoted 22 lines · Shawn Guo
Quoted 12 lines · Jagan Teki

The EDIMM STARTER KIT i.Core 1.5 MIPI Evaluation is based on the 1.5 version of the i.Core MX6 cpu module. The 1.5 version differs from the original one for a few details, including the ethernet PHY interface clock provider.

With this commit, the ethernet interface works properly:
SMSC LAN8710/LAN8720 2188000.ethernet-1:00: attached PHY driver

While before using the 1.5 version, ethernet failed to startup do to un-clocked PHY interface:
fec 2188000.ethernet eth0: could not attach to PHY

Quoted 6 lines

Similar fix has merged for i.Core MX6Q but missed to update for DL.

Fixes a8039f2dd089 ("ARM: dts: imx6dl: Add Engicam i.CoreM6 1.5 Quad/Dual MIPI starter kit support")
Cc Jacopo Mondi <[email protected]>

Applied all 3, thanks.

#7 lore raw

Hello!

Quoted 12 lines · Naresh Kamboju

The following dtbs build error noticed for arm build on stable rc 4.19 branch.

# make -sk KBUILD_BUILD_USER=KernelCI -C/linux ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc O=build dtbs
 #
 ../arch/arm/boot/dts/imx6dl-icore-mipi.dts:11:10: fatal error:
imx6qdl-icore-1.5.dtsi: No such file or directory
    11 | #include "imx6qdl-icore-1.5.dtsi"
       |          ^~~~~~~~~~~~~~~~~~~~~~~~
 compilation terminated.
 make[2]: *** [scripts/Makefile.lib:294:
arch/arm/boot/dts/imx6dl-icore-mipi.dtb] Error 1

This failed again on the latest 4.19.98-rc1 from linux-stable-rc/4.19.y. Looks like it's missing 37c045d25e900 ("ARM:
dts: imx6qdl: Add Engicam i.Core 1.5 MX6") from mainline.

Greetings!

Daniel Díaz
[email protected]

Quoted 23 lines · Shawn Guo
Quoted 22 lines · Jagan Teki
Quoted 12 lines

The EDIMM STARTER KIT i.Core 1.5 MIPI Evaluation is based on the 1.5 version of the i.Core MX6 cpu module. The 1.5 version differs from the original one for a few details, including the ethernet PHY interface clock provider.

With this commit, the ethernet interface works properly:
SMSC LAN8710/LAN8720 2188000.ethernet-1:00: attached PHY driver

While before using the 1.5 version, ethernet failed to startup do to un-clocked PHY interface:
fec 2188000.ethernet eth0: could not attach to PHY

Quoted 6 lines

Similar fix has merged for i.Core MX6Q but missed to update for DL.

Fixes a8039f2dd089 ("ARM: dts: imx6dl: Add Engicam i.CoreM6 1.5 Quad/Dual MIPI starter kit support")
Cc Jacopo Mondi <[email protected]>

Applied all 3, thanks.

#8 lore raw
Quoted 16 lines · Daniel Díaz

Hello!

Quoted 12 lines · Naresh Kamboju

The following dtbs build error noticed for arm build on stable rc 4.19 branch.

# make -sk KBUILD_BUILD_USER=KernelCI -C/linux ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc O=build dtbs
 #
 ../arch/arm/boot/dts/imx6dl-icore-mipi.dts:11:10: fatal error:
imx6qdl-icore-1.5.dtsi: No such file or directory
    11 | #include "imx6qdl-icore-1.5.dtsi"
       |          ^~~~~~~~~~~~~~~~~~~~~~~~
 compilation terminated.
 make[2]: *** [scripts/Makefile.lib:294:
arch/arm/boot/dts/imx6dl-icore-mipi.dtb] Error 1
Quoted 3 lines

This failed again on the latest 4.19.98-rc1 from linux-stable-rc/4.19.y. Looks like it's missing 37c045d25e900 ("ARM:
dts: imx6qdl: Add Engicam i.Core 1.5 MX6") from mainline.

Now fixed up, thanks.

greg k-h