Hello,
I have a problem with the configuration of LAN8720A with STM32MP151. My log looks good, but I have a problem when I plug in the wire to the RJ45 port, I get 'Link is down', and vice versa when I plug it out, 'Link is up'.
Here is part of my DTS
ðernet0 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <ð1_pins_mx>;
	pinctrl-1 = <ð1_sleep_pins_mx>;
	status = "okay";
	/* USER CODE BEGIN ethernet0 */
	phy-mode = "rmii";
	st,eth_ref_clk_sel;
	max-speed = <100>;
	phy-handle = <&phy1>;
	nvmem-cells = <ðernet_mac_address>;
	nvmem-cell-names = "mac-address";
	u-boot,dm-pre-reloc;
	mdio0 {
		u-boot,dm-pre-reloc;
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "snps,dwmac-mdio";
		phy1: ethernet-phy@0 {
			u-boot,dm-pre-reloc;
			reg = <0>;
			/*compatible = "ethernet-phy-ieee802.3-c22";*/
			compatible = "ethernet-phy-id0007.c0f1";
			/*compatible = "ethernet-phy-ieee802.3-c45";*/
			reset-gpios = <&gpioh 2 GPIO_ACTIVE_LOW>;
			reset-assert-us = <15000>;
			reset-deassert-us = <50000>;
		};
	};
	/* USER CODE END ethernet0 */
};I have a quartz 25MHz connected to phy, and PA1 is ref clk input, no interrupt connection. Log looks like
Spoiler  (Highlight to read) 4.635142] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found
4.635142] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found[ 4.731956] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID: 0x42[ 4.737574] stm32-dwmac 5800a000.ethernet: DWMAC4/5[ 4.751926] stm32-dwmac 5800a000.ethernet: DMA HW capability register supported[ 4.757794] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Engine supported[ 4.771910] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported[ 4.777370] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported[ 4.802115] stm32-dwmac 5800a000.ethernet: TSO supported[ 4.805976] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW Watchdog Timer[ 4.821934] stm32-dwmac 5800a000.ethernet: device MAC address a2:8e:c8:e4:69:5e[ 4.827807] stm32-dwmac 5800a000.ethernet: Enabled L3L4 Flow TC (entries=2)[ 4.848522] stm32-dwmac 5800a000.ethernet: Enabled RFS Flow TC (entries=10)[ 4.857649] stm32-dwmac 5800a000.ethernet: TSO feature enabled[ 4.862229] stm32-dwmac 5800a000.ethernet: Using 32/32 bits DMA host/device width[ 23.282465] stm32-dwmac 5800a000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0[ 23.511774] stm32-dwmac 5800a000.ethernet eth0: PHY [stmmac-0:00] driver [SMSC LAN8710/LAN8720] (irq=PO)[ 23.609398] stm32-dwmac 5800a000.ethernet eth0: No Safety Features support found[ 23.749180] stm32-dwmac 5800a000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported[ 23.846147] stm32-dwmac 5800a000.ethernet eth0: registered PTP clock[ 23.889579] stm32-dwmac 5800a000.ethernet eth0: configuring for phy/rmii link mode
Log looks normally. What can be a problem?
Thanks for any hints
BR Michal