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.

DM816x - Ethernet Switch EMAC to EMAC connection

DM816x can support 2 GMII Ethernet Port.

I would like to know whether I can connect  EMAC1 of DM816x to  MAC port of Ethernet  Switch directly?  As the below, If yes, could you please let me know how it can

be done? According to Switch datasheet, the connection seem that is right. How to make change to kernel driver to support it.






  • I use RDK 4.0.0.3.  According to this:

    Pass phy id as empty string ("") in davinci emac platform data and select which speed you need or programming the other mac in the following code in davinci_emac.c driver

    1685         } else {
    1686                 /* No PHY , fix the link, speed and duplex settings */
    1687                 dev_notice(emac_dev, "no phy, defaulting to 100/full\n");
    1688                 priv->link = 1;
    1689                 priv->speed = SPEED_100;
    1690                 priv->duplex = DUPLEX_FULL;

    1691                 emac_update_phystatus(priv);
    1692         }

    root@dm816x:~# ifconfig eth1 192.168.15.2
    net eth1: no phy, defaulting to 100/full
    root@dm816x:~#
    root@dm816x:~# ifconfig -a
    eth0      Link encap:Ethernet  HWaddr 84:7E:40:D3:54:72 
              inet addr:192.168.100.2  Bcast:192.168.100.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:7885 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6504 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:6427871 (6.1 MiB)  TX bytes:1517350 (1.4 MiB)
              Interrupt:40 Base address:0x8000

    eth1      Link encap:Ethernet  HWaddr 84:7E:40:D3:54:73 
              inet addr:192.168.15.2  Bcast:192.168.15.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:44

    lo        Link encap:Local Loopback 
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    root@dm816x:~#
    root@dm816x:~#
    root@dm816x:~# ping 192.168.15.2
    PING 192.168.15.2 (192.168.15.2): 56 data bytes
    64 bytes from 192.168.15.2: seq=0 ttl=64 time=0.186 ms
    64 bytes from 192.168.15.2: seq=1 ttl=64 time=0.085 ms
    64 bytes from 192.168.15.2: seq=2 ttl=64 time=0.058 ms

    root@dm816x:~# ping 192.168.15.9
    PING 192.168.15.9 (192.168.15.9): 56 data bytes

    --- 192.168.15.9 ping statistics ---
    7 packets transmitted, 0 packets received, 100% packet loss

     

  • Hi Colin,

    I did not look at the datasheet of this chip but I think there are a couple of pins that configure this chip either in switch mode or PHY mode.

    What you need to do is to configure to PHY mode for it to work.

    pb

  • Hi, I am sure  the port that connected to DM8168 EMAC1 is in PHY mode.  The connection and configure of ksz8864 is right.

    I am not sure how to make EMAC driver change to support  it.

    And I confirm that this switch chip TXC,RXC output 25MHz clock.

    thanks.