Skip to contentSkip to conversation

imx: set CONFIG_FEC_MXC_PHYADDR to -1

PATCH New Oliver Graute 3 participants 6 messages Jan 31, 2020 – Feb 5, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 imx: set CONFIG_FEC_MXC_PHYADDR to -1

This fix the following issue on the imx8qm_rom7720 board:

Booting from net ...
Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Can't find FEC0 clk rate: -19

This fix is necessary because of the changes introduced by commit:

1f60789602e0d5f5f9a8b507f25737c65b5d8daa.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Simon Glass <[email protected]>
Cc uboot-imx <[email protected]>
---
 include/configs/imx8qm_rom7720.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/imx8qm_rom7720.h +1 -0
index 865863eb7c..d503ddbffe 100644
@@ -171,6 +171,7 @@
 
 /* Networking */
 #define CONFIG_FEC_XCV_TYPE		RGMII
+#define CONFIG_FEC_MXC_PHYADDR		-1
 #define FEC_QUIRK_ENET_MAC
 
 #endif /* __IMX8QM_ROM7720_H */
Signature · 1 line
2.17.1
reviewer
#1 lore raw

PATCH 1/1 imx: set CONFIG_FEC_MXC_PHYADDR to -1

Quoted 30 lines · Oliver Graute

This fix the following issue on the imx8qm_rom7720 board:

Booting from net ...
Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Can't find FEC0 clk rate: -19

This fix is necessary because of the changes introduced by commit:

1f60789602e0d5f5f9a8b507f25737c65b5d8daa.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Simon Glass <[email protected]>
Cc uboot-imx <[email protected]>
---
 include/configs/imx8qm_rom7720.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/imx8qm_rom7720.h +0 -0
index 865863eb7c..d503ddbffe 100644

include/configs/imx8qm_rom7720.h line 174

Quoted 4 lines
include/configs/imx8qm_rom7720.h +1 -0
@@ -171,6 +171,7 @@
 
 /* Networking */
 #define CONFIG_FEC_XCV_TYPE            RGMII
+#define CONFIG_FEC_MXC_PHYADDR         -1

Shouldn't the Ethernet PHY address be retrieved from the device tree instead?

#2 lore raw

PATCH 1/1 imx: set CONFIG_FEC_MXC_PHYADDR to -1

Quoted 33 lines · Fabio Estevam
Quoted 31 lines · Oliver Graute

This fix the following issue on the imx8qm_rom7720 board:

Booting from net ...
Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Could not get PHY for FEC0: addr 0 Can't find FEC0 clk rate: -19

This fix is necessary because of the changes introduced by commit:

1f60789602e0d5f5f9a8b507f25737c65b5d8daa.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Simon Glass <[email protected]>
Cc uboot-imx <[email protected]>
---
 include/configs/imx8qm_rom7720.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/imx8qm_rom7720.h +0 -0
index 865863eb7c..d503ddbffe 100644
@@ -171,6 +171,7 @@
 
Quoted 5 lines

include/configs/imx8qm_rom7720.h line 174

Quoted 3 lines
include/configs/imx8qm_rom7720.h +1 -0
 /* Networking */
 #define CONFIG_FEC_XCV_TYPE            RGMII
+#define CONFIG_FEC_MXC_PHYADDR         -1

Shouldn't the Ethernet PHY address be retrieved from the device tree instead?

Yes, but phy addr 0 is currently not working that way for me. So I tried to solve it by autodetecting the phy. Please see this thread:

https://lists.denx.de/pipermail/u-boot/2019-December/393969.html

Best Regards,

Oliver

reviewer
#3 lore raw

PATCH 1/1 imx: set CONFIG_FEC_MXC_PHYADDR to -1

Quoted 2 lines · Oliver Graute

Yes, but phy addr 0 is currently not working that way for me. So I tried to solve it by autodetecting the phy. Please see this thread:

Looking at your other patch, it looks like you have:

+ ethphy0: ethernet-phy at 0 {

+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <6>;
+                       at803x,eee-disabled;
+                       at803x,vddio-1p8v;

+ };

which shows a mismatch between the @0 and the reg field. Building with W=1 should have warned you about that.

So it seems you need to fix your dts.

#4 lore raw

PATCH 1/1 imx: set CONFIG_FEC_MXC_PHYADDR to -1

Quoted 14 lines · Fabio Estevam
Quoted 2 lines · Oliver Graute

Yes, but phy addr 0 is currently not working that way for me. So I tried to solve it by autodetecting the phy. Please see this thread:

Looking at your other patch, it looks like you have:

(quoted diff) +6 -0
+               ethphy0: ethernet-phy at 0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <6>;
+                       at803x,eee-disabled;
+                       at803x,vddio-1p8v;
+               };
Quoted 4 lines

which shows a mismatch between the @0 and the reg field. Building with W=1 should have warned you about that.

So it seems you need to fix your dts.

thx, I'll fix that on the congatec cgtqmx8 board dts file. The phy issue here was on the advantech imx8qm-rom7720 board.

Best regards,

Oliver

reviewer
#5 lore raw

PATCH 1/1 imx: set CONFIG_FEC_MXC_PHYADDR to -1

Hi Oliver,

Quoted 2 lines · Oliver Graute

thx, I'll fix that on the congatec cgtqmx8 board dts file. The phy issue here was on the advantech imx8qm-rom7720 board.

imx8qm-rom7720-a1.dts seems to properly describe the PHY addresses.

I haven't followed the whole discussion you pointed out earlier, but it seems to my that setting:
#define CONFIG_FEC_MXC_PHYADDR -1

goes in the opposite direction of moving things to DM as we have a way to pass the PHY address via devicetree.

Tom, Joe? Any comments?