AnsweredAssumed Answered

I'm porting DM8806 L2switch to LS1021a IOT based board, I'd like anyone to give me an answer, hint or tip. I've some problem.

Question asked by Y.S. Kim on Jul 12, 2016
Latest reply on Jul 18, 2016 by Y.S. Kim

I'm porting DM8806 L2 switch to LS1021a IOT based board in u-boot.

 

Here's my porting list.

1. eTSEC1, eTSEC2 : MII

2. changed proper phy address

3. serdes is disabled

4. ncw related to SRDS_PRTCL_S1(bit 128 - 135) is set to 0x00  to prevent eTSEC->ecntrl register from being set SGMII.

and so on.

 

The result is

1. MDIO/MDC communication is good.

2. ethernet link is done.

3. ping Tx/Rx is not working.

 

u-boot serial log

=> ping 192.168.1.150

ecntrl init = 0x2d10020 : 0x1000 : 0x1000

maccfg2 init = 0x2d10504 : 0x7105 : 0x7105

priv->interface = 0x0

phy_read: addr = 0x2, devad = 0xffffffff, regnum = 0x1

phy_read: addr = 0x2, devad = 0xffffffff, regnum = 0x1

phy_read: addr = 0x2, devad = 0xffffffff, regnum = 0x4

phy_read: addr = 0x2, devad = 0xffffffff, regnum = 0x5

eTSEC1: link.

adjust_link() ecntrl = 0x2d10020 : 0x1000

Speed: 100, full duplex

Using eTSEC1 device

eTSEC1: tsec: tx error

eTSEC1: tsec: tx buffers full

ping failed; host 192.168.1.150 is not alive

=>

 

The debug result is

TXBD_READY(named R bit) bit is NOT cleared in Transmit data buffer descriptors (TxBD) : LS1021ARM.pdf, page1494

static int tsec_send(struct eth_device *dev, void *packet, int length)
{
......

    /* Wait for buffer to be transmitted */
    for (i = 0; in_be16(&txbd[tx_idx].status) & TXBD_READY; i++) { ==> not cleared
        if (i >= TOUT_LOOP) {
            debug("%s: tsec: tx error\n", dev->name);
            return result;
        }
    }

    tx_idx = (tx_idx + 1) % TX_BUF_CNT;
    result = in_be16(&txbd[tx_idx].status) & TXBD_STATS;

    return result;
}

 

thanks for reading. waiting some helpful answer...

Outcomes