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.

DM8148 EMAC Problem

Hello,

I am working on a DM8148 on a custom board and am having problems with the ethernet communication. I have configured the pinmux to enable all the emac[0] and MDIO pins, and am fairly confident that the pinmux is set correctly due to verification of values checked at the uboot terminal and the linux terminal. 

I get a link light on the switch when I plug in the ethernet cable so the auto-negotiation is working. Also, the bootloader recognizes a speed of 1000 mbps when i attempt to ping and mentions selecting the cpsw. I probed the tx data pins and the tx enable pin coming out of the DM8148 and did not see any activity while attempting to ping. I have tried it at the uboot prompt and at the linux prompt with the same result. I am out of options as to what to try and could use some help getting this going. From the linux terminal, everything appears to be working fine, mentions sending 30+ packets, but wireshark sees no traffic on the bus and the data pins show no activity going to the transceiver.

Is there anything I am missing that would enable the ethernet?

  • This is my pinmux configuration from linux:


    Jose E Rodriguez said:

    root@dm814x-evm:/sys/kernel/debug# cat /sys/kernel/debug/omap_mux/gmii0_*
    name: gmii0_col.gmii0_col (0x48140bac/0xbac = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_col | vin1b_d1 | rmii0_rxd0 | NA | NA | NA | NA | gpio3_24
    name: gmii0_crs.gmii0_crs (0x48140bb0/0xbb0 = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_crs | vin1b_d2 | rmii0_rxd1 | NA | NA | NA | NA | gpio3_25
    name: gmii0_gtxclk.gmii0_gtxclk (0x48140be0/0xbe0 = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_gtxclk | NA | NA | NA | gpmc_a_6_mux0 | spi2_d_1_mux2 | NA | NA
    name: gmii0_rxclk.gmii0_rxclk (0x48140bb8/0xbb8 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxclk | vin1b_d4 | rmii0_crs | NA | NA | spi3_cs2 | NA | gpio3_27
    name: gmii0_rxd0.gmii0_rxd0 (0x48140bbc/0xbbc = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxd0 | vin1b_d5 | rmii0_txd0 | NA | NA | NA | NA | gpio3_28
    name: gmii0_rxd1.gmii0_rxd1 (0x48140bc0/0xbc0 = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxd1 | vin1b_d6 | rmii0_txd1 | NA | NA | NA | NA | gpio3_29
    name: gmii0_rxd2.gmii0_rxd2 (0x48140bc4/0xbc4 = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxd2 | vin1b_d7 | rmii0_txen | NA | NA | NA | NA | gpio3_30_mux0
    name: gmii0_rxd3.gmii0_rxd3 (0x48140bc8/0xbc8 = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxd3 | NA | gpmc_a_27_mux1 | gpmc_a_26_mux1 | gpmc_a_0_mux0 | uart5_rxd_mux0 | NA | NA
    name: gmii0_rxd4.gmii0_rxd4 (0x48140bcc/0xbcc = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxd4 | NA | NA | NA | gpmc_a_1_mux0 | uart5_txd_mux0 | NA | NA
    name: gmii0_rxd5.gmii0_rxd5 (0x48140bd0/0xbd0 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxd5 | NA | NA | NA | gpmc_a_2_mux0 | uart5_ctsn_mux0 | NA | NA
    name: gmii0_rxd6.gmii0_rxd6 (0x48140bd4/0xbd4 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxd6 | NA | NA | NA | gpmc_a_3_mux0 | uart5_rtsn_mux0 | NA | NA
    name: gmii0_rxd7.gmii0_rxd7 (0x48140bd8/0xbd8 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxd7 | NA | NA | NA | gpmc_a_4_mux0 | spi2_cs3 | NA | NA
    name: gmii0_rxdv.gmii0_rxdv (0x48140bdc/0xbdc = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxdv | NA | NA | NA | gpmc_a_5_mux0 | spi2_sclk_mux2 | NA | NA
    name: gmii0_rxer.gmii0_rxer (0x48140bb4/0xbb4 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_rxer | vin1b_d3 | rmii0_rxer | NA | NA | NA | NA | gpio3_26
    name: gmii0_txclk.gmii0_txclk (0x48140ba8/0xba8 = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txclk | vin1b_d0 | NA | NA | NA | spi3_cs3 | i2c2_sda_mux3 | gpio3_23
    name: gmii0_txd0.gmii0_txd0 (0x48140be4/0xbe4 = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txd0 | NA | NA | NA | gpmc_a_7_mux0 | spi2_d_0_mux2 | NA | NA
    name: gmii0_txd1.gmii0_txd1 (0x48140be8/0xbe8 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txd1 | NA | NA | NA | gpmc_a_8_mux0 | uart4_rxd_mux1 | NA | NA
    name: gmii0_txd2.gmii0_txd2 (0x48140bec/0xbec = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txd2 | rmii1_rxd0_mux0 | NA | NA | gpmc_a_9_mux0 | uart4_txd_mux1 | NA | NA
    name: gmii0_txd3.gmii0_txd3 (0x48140bf0/0xbf0 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txd3 | rmii1_rxd1_mux0 | NA | NA | gpmc_a_10_mux0 | uart4_ctsn_mux1 | NA | NA
    name: gmii0_txd4.gmii0_txd4 (0x48140bf4/0xbf4 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txd4 | rmii1_rxer_mux0 | NA | NA | gpmc_a_11_mux0 | uart4_rtsn_mux1 | NA | NA
    name: gmii0_txd5.gmii0_txd5 (0x48140bf8/0xbf8 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txd5 | rmii1_crs_mux0 | NA | NA | gpmc_a_12_mux0 | uart1_rxd_mux1 | NA | NA
    name: gmii0_txd6.gmii0_txd6 (0x48140bfc/0xbfc = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txd6 | rmii1_txd0_mux0 | NA | NA | gpmc_a_13_mux0 | uart1_txd_mux1 | NA | NA
    name: gmii0_txd7.gmii0_txd7 (0x48140c00/0xc00 = 0x0001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txd7 | rmii1_txd1_mux0 | NA | NA | gpmc_a_14_mux0 | uart1_ctsn | NA | NA
    name: gmii0_txen.gmii0_txen (0x48140c04/0xc04 = 0x40001), b NA, t NA
    mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
    signals: gmii0_txen | rmii1_txen_mux0 | NA | NA | gpmc_a_15_mux0 | uart1_rtsn | NA | NA
    root@dm814x-evm:/sys/kernel/debug#

  • Jose,

    Are you able to ping the host PC from the DM814x board in uboot?

    Please refer to the below e2e thread:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/353786.aspx

    Regards,
    Pavel

  • Pavel Botev said:
    Are you able to ping the host PC from the DM814x board in uboot?

    I am not able to ping from uboot either.

    Here is my uboot environment variables and my console text from when attempting to ping from within uboot.

    TI8148_EVM#printenv
    bootargs=console=ttyO0,115200n8 root=/dev/mtdblock3 rw rootfstype=jffs2 mem=128M earlyprintk debug ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::eth0:off
    bootcmd=sf probe 0; sf read 0x81000000 0x40000 0x2C0000;bootm 0x81000000
    bootdelay=3
    baudrate=115200
    ethaddr=00:11:22:33:44:55
    ipaddr=192.168.0.251
    serverip=192.168.0.150
    autoload=yes
    gatewayip=192.168.0.150
    netmask=255.255.255.0
    verify=yes
    bootfile=uImage
    ramdisk_file=ramdisk.gz
    loadaddr=0x81000000
    script_addr=0x80900000
    loadbootscript=fatload mmc 0 ${script_addr} boot.scr
    bootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}
    stdin=serial
    stdout=serial
    stderr=serial
    ethact=cpsw
    
    Environment size: 677/8188 bytes
    TI8148_EVM#ping 192.168.0.150
    phy_init cpsw 0
    link up on port 0, speed 1000, full duplex
    Using cpsw device
    ping failed; host 192.168.0.150 is not alive
    TI8148_EVM#
    

  • This is the console text from the linux terminal when bringing the eth0 device up and attempting to ping.

    root@dm814x-evm:~# ifconfig eth0 down
    root@dm814x-evm:~# ifconfig eth0 up
    
    CPSW phy found : id is : 0x1410e80
    PHY 0:01 not found
    ADDRCONF(NETDEV_UP): eth0: link is not ready
    root@dm814x-evm:~# PHY: 0:00 - Link is Up - 1000/Full
    ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    eth0: no IPv6 routers present
    
    root@dm814x-evm:~# ifconfig eth0 192.168.0.141 netmask 255.255.255.0
    root@dm814x-evm:~# ping 192.168.0.150
    PING 192.168.0.150 (192.168.0.150): 56 data bytes
    
    --- 192.168.0.150 ping statistics ---
    8 packets transmitted, 0 packets received, 100% packet loss
    root@dm814x-evm:~#
    

  • I have resolved my problem. The problem was in the default selection of the GMII_SEL register to RGMII in the env.c file and we were using GMII.

  • Hi Jose,

    Can you share the required changes to work with GMII ?

    Thanks,

    Ran