Skip to contentSkip to conversation

arm64: dts: added basic DTS for qmx8 congatec board

RFC PATCH In review Oliver Graute 3 participants 7 messages Oct 29, 2019 – Nov 29, 2019

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

cover arm64: dts: added basic DTS for qmx8 congatec board

This patch is ontop of Aisheng Dongs clock driver and imx8 changes for the imx8qm.
https://patchwork.kernel.org/patch/11143321/
https://patchwork.kernel.org/patch/11138099/

I observe random crashes with this devicetree like this:

[  676.355973] fec 5b040000.ethernet eth0: MDIO read timeout
[  676.361455] ------------[ cut here ]------------
[  676.366087] WARNING: CPU: 0 PID: 208 at drivers/net/phy/phy.c:708 phy_error+0x10/0x58
[  676.373924] Modules linked in:
[  676.376984] CPU: 0 PID: 208 Comm: kworker/u8:2 Not tainted 5.3.0-rc7-next-20190904-00034-gdc1fd1a2104b #5
[  676.386553] Hardware name: Congatec QMX8 Qseven series (DT)
[  676.392128] Workqueue: events_power_efficient phy_state_machine
[  676.398049] pstate: 60000005 (nZCv daif -PAN -UAO)
[  676.402842] pc : phy_error+0x10/0x58
[  676.406413] lr : phy_state_machine+0xa8/0x168
[  676.410765] sp : ffff80001217bd60
[  676.414083] x29: ffff80001217bd60 x28: 0000000000000000
[  676.419399] x27: ffff0008f6b64338 x26: ffff800011073b98
[  676.424715] x25: 0000000000000000 x24: 00000000ffffff92
[  676.430032] x23: ffff0008f70c1000 x22: ffff0008f70c13e0
[  676.435348] x21: 0000000000000004 x20: ffff0008f70c1438
[  676.440665] x19: ffff0008f70c1000 x18: 0000000000000010
[  676.445973] x17: 0000000000000000 x16: 0000000000000000
[  676.451290] x15: ffffffffffffffff x14: ffff8000117398c8
[  676.456607] x13: ffff80009217b8b7 x12: ffff80001217b8bf
[  676.461923] x11: ffff800011752000 x10: ffff80001217b840
[  676.467240] x9 : 00000000ffffffd0 x8 : ffff800010698408
[  676.472557] x7 : 0000000000000151 x6 : 000000015f8c5440
[  676.477874] x5 : ffff0008f8341db0 x4 : ffff0008f6500000
[  676.483190] x3 : ffff0008f70c1438 x2 : 0000000000000000
[  676.488507] x1 : 0000000000000000 x0 : ffff0008f70c1000
[  676.493827] Call trace:
[  676.496273]  phy_error+0x10/0x58
[  676.499499]  phy_state_machine+0xa8/0x168
[  676.503510]  process_one_work+0x1e0/0x350
[  676.507518]  worker_thread+0x40/0x480
[  676.511179]  kthread+0x120/0x128
[  676.514413]  ret_from_fork+0x10/0x18
[  676.517990] ---[ end trace 919aac09d207cb93 ]---
[  676.522931] fec 5b040000.ethernet eth0: Link is Down

Some hints how to fix this?

Oliver Graute (1):
arm64: dts: added basic DTS for qmx8 congatec board

 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../boot/dts/freescale/imx8qm-cgt-qmx8.dts    | 391 ++++++++++++++++++
 2 files changed, 392 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts
Signature · 7 lines
2.17.1


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

RFC PATCH 1/1 arm64: dts: added basic DTS for qmx8 congatec board

Add basic dts support for a Congatec iMX8QM Qseven Board

Product Page: https://www.congatec.com/de/produkte/qseven/conga-qmx8x.html

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../boot/dts/freescale/imx8qm-cgt-qmx8.dts    | 391 ++++++++++++++++++
 2 files changed, 392 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
index 5f7e4aa0da60..a3639654c567 100644
@@ -31,6 +31,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mq-nitrogen.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-pico-pi.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-rmb3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-zest.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8qm-cgt-qmx8.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-ai_ml.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb
 
arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts new file +391 -0

391 lines not on this page · raw message

Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#3 lore raw
In reply to Oliver Graute

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts line 90

Quoted 9 lines · Oliver Graute

+&fec1 {

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts new file +8 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec1>;
+	phy-mode = "rgmii";
+	phy-handle = <&ethphy0>;
+	fsl,magic-packet;
+	fsl,rgmii_txc_dly;
+	fsl,rgmii_rxc_dly;
+	status = "okay";

The two fsl,rgmii* properties do not exist in mainline. I suppose there were copied from downstream?

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts line 103

Quoted 13 lines
arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts new file +13 -0
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethphy0: ethernet-phy@0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <6>;
+			at803x,eee-disabled;
+			at803x,vddio-1p8v;
+		};
+	};
+};

Regards.

#4 lore raw
Quoted 14 lines · Marc Gonzalez

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts line 90

Quoted 9 lines · Oliver Graute

+&fec1 {

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts new file +8 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec1>;
+	phy-mode = "rgmii";
+	phy-handle = <&ethphy0>;
+	fsl,magic-packet;
+	fsl,rgmii_txc_dly;
+	fsl,rgmii_rxc_dly;
+	status = "okay";

The two fsl,rgmii* properties do not exist in mainline. I suppose there were copied from downstream?

you are right, I'll remove them.

thx for your feedback.

Best regards,

Oliver

#5 lore raw
Quoted 17 lines · Oliver Graute
Quoted 14 lines · Marc Gonzalez

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts line 90

Quoted 9 lines · Oliver Graute

+&fec1 {

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts new file +8 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec1>;
+	phy-mode = "rgmii";
+	phy-handle = <&ethphy0>;
+	fsl,magic-packet;
+	fsl,rgmii_txc_dly;
+	fsl,rgmii_rxc_dly;
+	status = "okay";

The two fsl,rgmii* properties do not exist in mainline. I suppose there were copied from downstream?

Quoted 1 line

you are right, I'll remove them.

You should first check what the downstream driver does for them. And check if there is an equivalent action in mainline. These delays tend to be required for the PHY to work at all.

Regards.

#6 lore raw
Quoted 19 lines · Marc Gonzalez
Quoted 17 lines · Oliver Graute
Quoted 14 lines · Marc Gonzalez

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts line 90

Quoted 9 lines · Oliver Graute

+&fec1 {

arch/arm64/boot/dts/freescale/imx8qm-cgt-qmx8.dts new file +8 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec1>;
+	phy-mode = "rgmii";
+	phy-handle = <&ethphy0>;
+	fsl,magic-packet;
+	fsl,rgmii_txc_dly;
+	fsl,rgmii_rxc_dly;
+	status = "okay";

The two fsl,rgmii* properties do not exist in mainline. I suppose there were copied from downstream?

Quoted 5 lines
Quoted 1 line

you are right, I'll remove them.

You should first check what the downstream driver does for them. And check if there is an equivalent action in mainline. These delays tend to be required for the PHY to work at all.

ok as far as I see there is currently no equilant action in mainline. Downstream linux-imx use rgmii_txc_dly and rgmii_rxc_dly in fec_probe() and fec_restart() for some imx8qm-fec and imx8mq-fec PHY delay quirks. Perhaps this missing quirks are related to the random crashes in that driver I have with imx8qm.

[  129.211959] fec 5b040000.ethernet eth0: rcv is not +last
[  129.217300] fec 5b040000.ethernet eth0: rcv is not +last
[  129.222647] fec 5b040000.ethernet eth0: rcv is not +last
[  129.227966] fec 5b040000.ethernet eth0: rcv is not +last
[  129.233282] fec 5b040000.ethernet eth0: rcv is not +last

Best regards,

Oliver