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.

two tlk110 phy problem

Other Parts Discussed in Thread: TLK110, AM3359

I am using am3359 with 2 tlk110, 

I have tested that two phys work fine alone when using it download kernel using tftp .

But in linux  the second tlk110 which is eth1 in my system can not send data out   here is my dump

[ 0.996761] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 1.003285] davinci_mdio davinci_mdio.0: detected phy mask fffffff9
[ 1.011260] davinci_mdio.0: probed
[ 1.014848] phy[1]: device 0:01, driver unknown
[ 1.019656] davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
[ 1.027100] phy[2]: device 0:02, driver unknown
[ 1.031873] davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver unknown

[    1.418661] Detected MACID=0:18:31:e3:10:6

[    1.430667] cpsw: Detected MACID = 00:18:31:e3:10:07

[    1.445155] net eth0: CPSW phy found : id is : 0x2000a211

[    3.437416] PHY: 0:01 - Link is Up - 100/Full

[    3.466756] IP-Config: Guessing netmask 255.255.255.0

[    3.472276] IP-Config: Complete:

[    3.475675]      device=eth0, addr=192.168.1.170, mask=255.255.255.0, gw=255.255.255.255,

[    3.484069]      host=192.168.1.170, domain=, nis-domain=(none)

[    3.490417]      bootserver=255.255.255.255, rootserver=192.168.1.244, rootpath=

[    3.508469] VFS: Mounted root (nfs filesystem) on device 0:14.

[    3.515099] Freeing init memory: 244K

I run ifconfig eth1 192.168.2.112 then the kernel dump these

[   40.715176] net eth1: CPSW phy found : id is : 0x2000a211

[   42.707436] PHY: 0:02 - Link is Up - 100/Full

root@am335x-evm:/etc/network# ifconfig
eth0 Link encap:Ethernet HWaddr 00:18:31:E3:10:06
inet addr:192.168.1.170 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1500 Metric:1
RX packets:15867 errors:0 dropped:1470 overruns:0 frame:0
TX packets:8403 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8068850 (7.6 MiB) TX bytes:1294242 (1.2 MiB)

eth1 Link encap:Ethernet HWaddr 00:18:31:E3:10:07
inet addr:192.168.2.112 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:191 errors:0 dropped:26 overruns:0 frame:0
TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29457 (28.7 KiB) TX bytes:5940 (5.8 KiB)

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:104 errors:0 dropped:0 overruns:0 frame:0
TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10120 (9.8 KiB) TX bytes:10120 (9.8 KiB)

Then I ping  another router 192.168.2.1 , it do not show anything 

root@am335x-evm:/etc/network# ping 192.168.2.1

PING 192.168.2.1 (192.168.2.1): 56 data bytes

My linux bsp version is linux-3.2.0-psp05.06.00.00.

I have add the pinmux in the board file

static struct pinmux_config mii2_pin_mux[] = {
{"gpmc_wpn.mii2_rxerr",OMAP_MUX_MODE1 |AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a0.mii2_txen", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
{"gpmc_a1.mii2_rxdv", OMAP_MUX_MODE1| AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a2.mii2_txd3", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
{"gpmc_a3.mii2_txd2", OMAP_MUX_MODE1| AM33XX_PIN_OUTPUT},
{"gpmc_a4.mii2_txd1", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
{"gpmc_a5.mii2_txd0", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
{"gpmc_a6.mii2_txclk", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
{"gpmc_a7.mii2_rxclk", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a8.mii2_rxd3", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a9.mii2_rxd2", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a10.mii2_rxd1", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a11.mii2_rxd0", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN},
{NULL, 0},
};

Can any one help me ?

  • I have forwarded this to our SW expert. This looks like a driver issue.

  • thanks,I have measured on the scope that there is no pulse on txen and txd[3]  of second  tlk110 when running linux .I measured that they all normal in Uboot.

    And there is   25MHz   on txclk in linux , so I think  the second TLK110 state  is ok in linux,  just  the cpsw  port2  do not work.

  • Liang,
     
    We observed similar behavior (i.e. functional in uboot and non functional in Linux).  Please double check your GEMAC control register in Section 9.3.31 gmii_sel Register.

    The following post may be related. http://e2e.ti.com/support/arm/sitara_arm/f/791/p/262854/938391.aspx#938391

  • Hello Mike:

    the post which  you mentioned  is related to the RMII mode, but I am using the MII mode.

    there is no reference clock  signal on my board

    wangl

  • hello

    we intent to use the second mac eth1 with tlk110 now, but problem still exist

     My  eth1 ip is 192.168.2.22,eth0 ip is 192.168.1.170.Then i use another  PC with ip 192.168.2.244  to ping eth1.

    Then the PC show that the ping fail 100% lost.

    I print the tx data in this function in the driver cpsw:

     static inline int cpsw_tx_packet_submit(struct net_device *ndev,    struct cpsw_priv *priv, struct sk_buff *skb) {

          if (ndev == cpsw_get_slave_ndev(priv, 0))

                return cpdma_chan_submit(priv->txch, skb, skb->data,      

                         skb->len, 1, GFP_KERNEL);  

         else{

                  printk("tx cpdma 2\n");  

                   int i=0;   for(i=0;i<skb->len;i++)printk("0x%x_",*(skb->data+i));

                   return cpdma_chan_submit(priv->txch, skb, skb->data,      

                          skb->len, 2, GFP_KERNEL);  

          }

     }

    then it print this :

    [  112.990988] tx cpdma 2

     [  112.993502]0x0_0x14_0x22_0x9b_0x88_0xa4_0x0_0x18_0x31_0xe3_0x10_0x7_0x8_0x6_0x0_0x1_0x8_0x0_0x6_0x4_0x0_0x2_0x0_0x18_0x31_0xe3_0x10_0x7_0xc0_0xa8_0x2_0x16_0x0_0x14_0x22_0x9b_0x88_0xa4_0xc0_0xa8_0x2_0xf4_

    i run the ifocnfig  then it show eth1  RX bytes:1348 (1.3 KiB)  TX bytes:240 (240.0 B)

    it show the corret respond data which is the arp ack to my PC,it show that the eth1 receive the data from PC

    Because if it do not receive arp packet, the ip layer will not send arp ack data.

    At same time I use the scope test the eth1_tx_en pin,there is no pulse on it .there is also no pulse on the eth1_txd0 pin.

    it seems that transmit do not started !.

    Can any one give me tips?

    thank you .

    Wangl

  • Oh,

    I make a mistake  by correct it like this

    {"gpmc_a6.mii2_txclk",OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN},

    every thing go right.

    For transmition ,the txclk also should be input on am335x, i think it is output in the past.