This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux: Ethernet issue on custom board

Other Parts Discussed in Thread: DP83867IR

Tool/software: Linux

Hi,

We have custom board based on Tda2Px Eve board. RGMII1 interface  use PHY DP83867IR . The PHY address is correct. I found that the value in CTRL_CORE_PAD_VIN2A_D23 was set to the wrong value.

It can recognize the address but the link is not detected.

This is part of device-tree file:

&cpsw_emac0 {
    phy_id = <&davinci_mdio>, <2>;
    phy-mode = "rgmii-id";
    dual_emac_res_vlan = <1>;
};

&cpsw_emac1 {
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "rgmii-id";
    dual_emac_res_vlan = <2>;
};

&davinci_mdio {
    dp83867_0: ethernet-phy@2 {
        reg = <2>;
        ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
        ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
        ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
        ti,min-output-impedance;
        ti,dp83867-rxctrl-strap-quirk;
    };

    dp83867_1: ethernet-phy@0 {
        reg = <0>;
        ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
        ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
        ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
        ti,min-output-impedance;
        ti,dp83867-rxctrl-strap-quirk;
    };
};

ethtool eth1 shows:

Settings for eth1:

Supported ports: [ TP MII ]

Supported link modes:    10baseT/Half 10baseT/Full

                                             100baseT/Half 100baseT/Full

                                             1000baseT/Half 1000baseT/Full

Supported pause frame use: No

Supports auto-negotiation: Yes

Advertised link modes:     10baseT/Half 10baseT/Full

                                              100baseT/Half 100baseT/Full

                                              1000baseT/Half 1000baseT/Full

Advertised pause frame use: No

Advertised auto-negotiation: Yes

Speed: 10Mb/s

Duplex: Half

Port: MII

PHYAD: 0

Transceiver: external

Auto-negotiation: on

Supports Wake-on: d

Wake-on: d

Current message level: 0x00000000 (0)

Link detected: no

dmesg | grep eth :

[ 1.975495] cpsw 48484000.ethernet: Detected MACID = f4:84:4c:10:63:ac

[ 1.982143] cpsw 48484000.ethernet: cpts: overflow check period 800

[ 1.989136] cpsw 48484000.ethernet: cpsw: Detected MACID = f4:84:4c:10:63:ad

[ 12.049585] net eth1: initializing cpsw version 1.15 (0)

[ 12.077369] net eth0: initialized cpsw ale version 1.4

[ 12.099079] net eth0: ALE Table size 1024

[ 12.299595] net eth1: phy found : id is : 0x2000a231

[ 12.353035] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready

[ 12.384578] net eth0: initializing cpsw version 1.15 (0)

[ 12.434998] net eth0: phy "48485000.mdio:02" not found on slave 0, err -19

[ 12.469853] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[ 1.953208] davinci_mdio 48485000.mdio: davinci mdio revision 1.6

[ 1.966517] davinci_mdio 48485000.mdio: phy[0]: device 48485000.mdio:00, driver TI DP83867

[ 2.228746] davinci-mcasp 48464000.mcasp: DAI is shared

[ 2.234852] davinci-mcasp 48474000.mcasp: DAI is shared

Could you please provide me any reference to solve this issue?

Regards, Nevena

  • Hi
    When you are using uboot the pin mux is configured from bootloader - please review the pin mux configuration accordingly.
    Are there any other changes on the Custom board aside of a direct replacement of the PHY, have reviewed the hookup in comparison with the TI EVM
  • Hi,

    could you please take a look at our rgmii shematic. According to this shemtic PHY address is 0x0. I checked out registers from user-space and seems that all values are correct. Do you have ideas what can cause the issue Link detected: no ?

    Regards,

    Nevena

  • Hi Nevena,

    Sorry for some stupid questions, but it wasn't clear to me:

    - Do you have some network device connected? Ethernet Switch or PC?

    - Do you see 'link LED' to light up? Activity LED?

    - Does this PHY has an ability to change MDIO address? I didn't see any pins and I wasn't able to  download the datasheet yet.

    - Do MDIO CLK and DATA have pullups?

    Regards,

    Stan

  • Looks like address is strapped on pins RX_D0, RX_D2, RX_D4 in a 4-level manner. RX_D4 is open therefore already latches 0. Remains to check that RX_D0, RX_D2 are not driven (or pulled down) by SoC, long enough, so they latch zeroes as well.

    Also, there was a command line MDIO utility which can scan all 32 addresses, I don't remember details unfortunately.
  • Hi,

    -Yes, it's connected through ethernet switch but the LED link has no activity.

    -MDIO CLK and DATA are directly connected to SOC and according to data sheet:

                               BALL    |    BALL NAME  |   BALL_RESET_STATE   | PULL UP/DOWN  TYPE

    MDIO CLK :      D3        |    vin2a_d10      |                 PD                       |              PU/PD              

    DATA:                F4         |   vin2a_d11       |                 PD                       |              PU/PD

    RX_D0:             A4         |   vin2a_d23       |                 PD                       |              PU/PD

    RX_D2:             B4         |   vin2a_d21       |                 PD                       |              PU/PD

    mdio list gives this output:

    ethernet@48484000:

    0 - TI DP83867 <--> ethernet@48484000

    Regards,

    Nevena

  • Hi,

    just to add this to previous comment.

    In data-sheet I found that RX_DV/RX_CTRL requires to be strapped:

    In our case RX_DV/RX_CTRL are not strapped and we got MODE 1 .

    When I type ethtool eth1 I got : auto-negotiation: Yes.

    Can you clarify this?

    Regards,

    Nevena

  • Hi Nevena,
    Looks like PHY takes address 0x0 and no issue with it.
    - Then, can you please read registers at addresses 0x0 and 0x1, a or do a complete PHY register dump?
    - Can you tell the product ID of the RJ45 connector?

    Thanks,
    Stan
  • That was my next comment. This pin needs strap pins explicitly, since mode 1 [00] is reserved . This looks like mandatory requirement, but I can't confirm, since I'm not expert of this PHY.
    More globally, I would recommend to re-visit all settings that strap pins latch are meeting your requirements. Most of them can be re-set later by registers, so this task becomes somewhat more complex.
  • Hi,

    with mdio read dev addr I got:

    => mdio read ethernet@48484000 0x0

    Reading from bus ethernet@48484000

    PHY at address 0:

    0 - 0x1140

    => mdio read ethernet@48484000 0x1

    Reading from bus ethernet@48484000

    PHY at address 0:

    1 - 0x7949

    => mdio read ethernet@48484000 0x2

    Reading from bus ethernet@48484000

    PHY at address 0:

    2 - 0x2000

    => mdio read ethernet@48484000 0x3

    Reading from bus ethernet@48484000

    PHY at address 0:

    3 - 0xa231

    => mdio read ethernet@48484000 0x4

    Reading from bus ethernet@48484000

    PHY at address 0:

    4 - 0x1e1

    => mdio read ethernet@48484000 0x5

    Reading from bus ethernet@48484000

    PHY at address 0:

    5 - 0x0

    => mdio read ethernet@48484000 0x6

    Reading from bus ethernet@48484000

    PHY at address 0:

    6 - 0x64

    => mdio read ethernet@48484000 0x7

    Reading from bus ethernet@48484000

    PHY at address 0:

    7 - 0x2001

    => mdio read ethernet@48484000 0x8

    Reading from bus ethernet@48484000

    PHY at address 0:

    8 - 0x0

    => mdio read ethernet@48484000 0x9

    Reading from bus ethernet@48484000

    PHY at address 0:

    9 - 0x300

    => mdio read ethernet@48484000 0x10

    Reading from bus ethernet@48484000

    PHY at address 0:

    16 - 0xc040

    => mdio read ethernet@48484000 0x11

    Reading from bus ethernet@48484000

    PHY at address 0:

    17 - 0x302

    => mdio read ethernet@48484000 0x12

    Reading from bus ethernet@48484000

    PHY at address 0:

    18 - 0x0

    => mdio read ethernet@48484000 0x13

    Reading from bus ethernet@48484000

    PHY at address 0:

    19 - 0x40

    => mdio read ethernet@48484000 0x14

    Reading from bus ethernet@48484000

    PHY at address 0:

    20 - 0x29c7

    => mdio read ethernet@48484000 0x15

    Reading from bus ethernet@48484000

    PHY at address 0:

    21 - 0x0

    => mdio read ethernet@48484000 0x16

    Reading from bus ethernet@48484000

    PHY at address 0:

    22 - 0x0

    => mdio read ethernet@48484000 0x17

    Reading from bus ethernet@48484000

    PHY at address 0:

    23 - 0x40

    => mdio read ethernet@48484000 0x18

    Reading from bus ethernet@48484000

    PHY at address 0:

    24 - 0x6150

     

    -Product ID of the RJ45:  MagJack S1-61001-F

     


    Regards,

    Nevena

  • Nevena,
    Can you try to de-solder L33 (that powers CT pin of RJ45)?
  • Hi,

    before we de-solder L33 could you explain the reason ?

    Regards.
  • Hi,

    We de-solder L33 and finally the link is detected, but the orange led is blinking all time and link is getting up/down:

    [ 69.730827] cpsw 48484000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 73.739784] cpsw 48484000.ethernet eth0: Link is Down
    [ 75.750834] cpsw 48484000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 88.759792] cpsw 48484000.ethernet eth0: Link is Down

    Regards.
  • Reasons:
    - section 9.2.1.1 Cable Line Driver in PHY datasheet [SNLS484E –FEBRUARY 2015–REVISED MARCH 2017]
    - J6eco EVM, TDA3 EVM
    or in other words, if PHY has internal terminations, then CT is not required to tie to 2V5/3V3.

    I'm sorry, I'm out of ideas for now.
  • Hi,

    We want to disable auto-negotiation because we thing that that might cause the problem (RX_CTRL strap).

    But we can not read from any address higher than 0x20.

    According to data sheet we have to clear bit 7 in  RGMIICTL register at address 0x0031 .

    We tried command mdio read device 0x0031 but we got an error.

    Any idea how can we clear that bit?

    Regards,

    Nevena

  • Hi
    You can manually disable (after startup) auto-negotiation on a ethernet port by using the "ethtool" command.
    Please lookup at the man page for usage instructions