cancel
Showing results for 
Search instead for 
Did you mean: 

stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1

ASkri.1
Senior

Hi!

Could you please give me exact details of following eth PHY error:

[  95.822137] stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1

[  95.826911] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)

Why it searches addr -1?

I'm using LAN8720 PHY on custom board. Here is kernel device tree:

eth1_pins_mx: eth1_mx-0 {

pins1 {

pinmux = <STM32_PINMUX('A', 1, AF11)>, // ETH1_RX_CLK **

<STM32_PINMUX('A', 7, AF11)>, // ETH1_RX_CTL **

<STM32_PINMUX('C', 4, AF11)>, // ETH1_RXD0 

<STM32_PINMUX('C', 5, AF11)>; // ETH1_RXD1 

bias-disable;

};

pins2 {

pinmux = <STM32_PINMUX('A', 2, AF11)>; // ETH1_MDIO 

bias-disable;

drive-push-pull;

slew-rate = <0>;

};

pins3 {

pinmux = <STM32_PINMUX('B', 11, AF11)>, // ETH1_TX_CTL 

<STM32_PINMUX('C', 1, AF11)>,  // ETH1_MDC 

/// <STM32_PINMUX('C', 2, AF11)>,  // ETH1_TXD2

/// <STM32_PINMUX('E', 2, AF11)>,  // ETH1_TXD3

/// <STM32_PINMUX('G', 4, AF11)>,  // ETH1_GTX_CLK 

/// <STM32_PINMUX('G', 5, AF11)>,  // ETH1_CLK125 

<STM32_PINMUX('B', 12, AF11)>, // ETH1_TXD0 !!!

<STM32_PINMUX('G', 14, AF11)>; // ETH1_TXD1 

bias-disable;

drive-push-pull;

slew-rate = <2>;

};

};

&ethernet0 {

  status = "okay";

pinctrl-0 = <&eth1_pins_mx>;

pinctrl-1 = <&eth1_sleep_pins_mx>;

  pinctrl-names = "default", "sleep";

  phy-mode = "rmii";

  max-speed = <100>;

  phy-handle = <&phy0>;

  mdio0 {

      #address-cells = <1>;

      #size-cells = <0>;

      compatible = "snps,dwmac-mdio";

      reset-gpios = <&gpiob 15 GPIO_ACTIVE_LOW>;

      reset-duration = <200>;   

      reg = <1>;

      phy0: ethernet-phy@1 {

          reg = <1>;

      };

  };

};

Thank you in advance

Looking forward for your reply

1 ACCEPTED SOLUTION

Accepted Solutions
ASkri.1
Senior

There was a problem with PHY's crystal. Aftrer replacing evetything is ok 🙂

View solution in original post

1 REPLY 1
ASkri.1
Senior

There was a problem with PHY's crystal. Aftrer replacing evetything is ok 🙂