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.

How to ping the host machine

Other Parts Discussed in Thread: TPS65910

Hi Pavel,

The custom board couldn't connect to the host machine.Need your help.

log:

done.
Setting up IP spoofing protection: rp_filter.
Mon Dec 31 10:37:00 UTC 2012
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting telnet daemon.
Starting syslogd/klogd: done
Starting thttpd.

 _____                    _____           _         _  
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_| 
              |___|                    |___|           

Arago Project http://arago-project.org dm814x-evm ttyO0

Arago 2011.09 dm814x-evm ttyO0

dm814x-evm login: root
root@dm814x-evm:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 84:7E:40:EA:5F:6C 
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:52 errors:0 dropped:29 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7429 (7.2 KiB)  TX bytes:1180 (1.1 KiB)
          Interrupt:40

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@dm814x-evm:~#
root@dm814x-evm:~# ifconfig eth0 192.168.5.108
root@dm814x-evm:~# ping 192.168.5.93
PING 192.168.5.93 (192.168.5.93): 56 data bytes

--- 192.168.5.93 ping statistics ---
11 packets transmitted, 0 packets received, 100% packet loss
root@dm814x-evm:~#

B/R

Bob

 

  • Bob,

    bob lee said:

    log:

    done.
    Setting up IP spoofing protection: rp_filter.
    Mon Dec 31 10:37:00 UTC 2012
    INIT: Entering runlevel: 5
    Starting system message bus: dbus.
    Starting telnet daemon.
    Starting syslogd/klogd: done
    Starting thttpd.

     _____                    _____           _         _  
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_| 
                  |___|                    |___|           

    Arago Project http://arago-project.org dm814x-evm ttyO0

    Arago 2011.09 dm814x-evm ttyO0

    Can you provide the full boot log, not just part of it.

    Best regards,
    Pavel

  • Hi Pavel,

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Linux version 2.6.37+ (boblee@javenshen-desktop) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #362 Wed Jul 2 19:03:11 CST 2014
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine: ti8148evm
    bootconsole [earlycon0] enabled
    reserved size = 52428800 at 0x0
    FB: Reserving 52428800 bytes SDRAM for VRAM
    Memory policy: ECC disabled, Data cache writeback
    OMAP chip is TI8148 3.0
    SRAM: Mapped pa 0x402f1000 to va 0xfe400000 size: 0xf000
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 52224
    Kernel command line: mem=256M console=ttyO0,115200n8 earlyprintk root=/dev/ram rw initrd=0x82000000,32MB
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 206MB = 206MB total
    Memory: 170164k/170164k available, 91980k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
        vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
        lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .init : 0xc0008000 - 0xc003b000   ( 204 kB)
          .text : 0xc003b000 - 0xc0510000   (4948 kB)
          .data : 0xc0510000 - 0xc0557800   ( 286 kB)
    SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    NR_IRQS:375
    IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    Total of 128 interrupts on 1 active controller
    GPMC revision 6.0
    Trying to install interrupt handler for IRQ368
    Trying to install interrupt handler for IRQ369
    Trying to install interrupt handler for IRQ370
    Trying to install interrupt handler for IRQ371
    Trying to install interrupt handler for IRQ372
    Trying to install interrupt handler for IRQ373
    Trying to install interrupt handler for IRQ374
    Trying to install type control for IRQ375
    Trying to set irq flags for IRQ375
    OMAP clockevent source: GPTIMER1 at 20000000 Hz
    Console: colour dummy device 80x30
    Calibrating delay loop... 598.01 BogoMIPS (lpj=2990080)
    pid_max: default: 32768 minimum: 301
    Security Framework initialized
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    devtmpfs: initialized
    omap_voltage_early_init: voltage driver support not added
    regulator: core version 0.5
    regulator: dummy:
    NET: Registered protocol family 16
    omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!
    omap_voltage_add_dev: VDD specified does not exist!
    OMAP GPIO hardware version 0.1
    OMAP GPIO hardware version 0.1
    OMAP GPIO hardware version 0.1
    OMAP GPIO hardware version 0.1
    omap_mux_init: Add partition: #1: core, flags: 4
    NOR: Can't request GPMC CS
    Debugfs: Only enabling/disabling deep sleep and wakeup timer is supported now
    registered ti81xx_vpss device
    registered ti81xx_vidout device
    registered ti81xx on-chip HDMI device
    registered ti81xx_fb device
    registered ti81xx_vin device
    bio: create slab <bio-0> at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    USBSS revision 4ea2080b
    registerd cppi-dma Intr @ IRQ 17
    Cppi41 Init Done
    omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
    pcf857x: probe of 1-0021 failed with error -121
    tps65910 1-002d: read from reg 3f failed
    tps65910 1-002d: read from reg 1e failed
    set_machine_constraints: failed to enable VRTC
    tps65910 1-002d: failed to register tps65910-pmic regulator
    tps65910-pmic: probe of tps65910-pmic failed with error -121
    tps65910 1-002d: No interrupt support, no core IRQ
    omap_i2c omap_i2c.3: bus 3 rev4.0 at 100 kHz
    Advanced Linux Sound Architecture Driver Version 1.0.23.
    Switching to clocksource gp timer
    musb-hdrc: version 6.0, host, debug=0
    musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    MUSB controller-0 revision 4ea20800
    musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: MUSB HDRC host driver
    usb usb1: Manufacturer: Linux 2.6.37+ musb-hcd
    usb usb1: SerialNumber: musb-hdrc.0
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.0: USB Host mode controller at d081e000 using DMA, IRQ 18
    musb-hdrc musb-hdrc.1: dma type: dma-cppi41
    MUSB controller-1 revision 4ea20800
    musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: MUSB HDRC host driver
    usb usb2: Manufacturer: Linux 2.6.37+ musb-hcd
    usb usb2: SerialNumber: musb-hdrc.1
    hub 2-0:1.0: USB hub found
    ti81xx_interrupt 909: VBUS error workaround (delay coming)
    hub 2-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.1: USB Host mode controller at d0828800 using DMA, IRQ 19
    NET: Registered protocol family 2
    IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    Trying to unpack rootfs image as initramfs...
    rootfs image is not initramfs (no cpio magic); looks like an initrd
    Freeing initrd memory: 32768K
    NetWinder Floating Point Emulator V0.97 (double precision)
    PMU: registered new PMU device of type 0
    omap-iommu omap-iommu.0: ducati registered
    omap-iommu omap-iommu.1: sys registered
    JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
    msgmni has been set to 396
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
    console [ttyO0] enabled, bootconsole disabled
    console [ttyO0] enabled, bootconsole disabled
    omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    brd: module loaded
    loop: module loaded
    omap2-nand driver initializing
    NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung )
    Creating 6 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000020000 : "U-Boot-min"
    0x000000020000-0x000000260000 : "U-Boot"
    0x000000260000-0x000000280000 : "U-Boot Env"
    0x000000280000-0x0000006c0000 : "Kernel"
    0x0000006c0000-0x00000cee0000 : "File System"
    0x00000cee0000-0x000010000000 : "Reserved"
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    davinci_mdio davinci_mdio.0: detected phy mask fffffff9
    davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
    davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver unknown
    CAN device driver interface
    CAN bus driver for Bosch D_CAN controller 1.0
    d_can d_can: d_can device registered (irq=52, irq_obj=53)
    usbcore: registered new interface driver cdc_ether
    usbcore: registered new interface driver dm9601
    usbcore: registered new interface driver cdc_acm
    cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    mice: PS/2 mouse device common for all mice
    qt602240_ts 1-004a: __qt602240_read_reg: i2c transfer failed
    qt602240_ts: probe of 1-004a failed with error -5
    omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
    i2c /dev entries driver
    Linux video capture interface: v2.00
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (v1.0.0)
    OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    usbcore: registered new interface driver snd-usb-audio
    asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok
    ALSA device list:
      #0: TI81XX EVM
    IPVS: Registered protocols ()
    IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
    IPVS: ipvs loaded.
    TCP cubic registered
    NET: Registered protocol family 17
    can: controller area network core (rev 20090105 abi 8)
    NET: Registered protocol family 29
    can: raw protocol (rev 20090105)
    can: broadcast manager protocol (rev 20090105 t)
    Registering the dns_resolver key type
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    omap_voltage_late_init: Voltage driver support not added
    Power Management for TI81XX.
    Detected MACID=84:7e:40:ea:5f:6c
    omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
    RAMDISK: gzip image found at block 0
    VFS: Mounted root (ext2 filesystem) on device 1:0.
    devtmpfs: mounted
    Freeing init memory: 204K
    INIT: version 2.86 booting
    Error opening /dev/fb0: No such file or directory
    Please wait: booting...
    Starting udev
    WARNING: -e needs -E or -F
    udevd (79): /proc/79/oom_adj is deprecated, please use /proc/79/oom_score_adj instead.
    Remounting root file system...
    Caching udev devnodes
    ALSA: Restoring mixer settings...
    No state is present for card EVM
    Found hardware: "" "" "" "" ""
    Hardware is initialized using a generic method
    No state is present for card EVM
    Configuring e2fsprogs.
    update-alternatives: Error: cannot register alternative chattr to /usr/bin/chattr since it is already registered to /bin/chattr
    update-alternatives: Linking //sbin/uuidd to uuidd.util-linux-ng
    Configuring update-modules.
    Configuring dbus.
     Adding system startup for /etc/init.d/dbus-1.
    Configuring network interfaces...
    CPSW phy found : id is : 0x1cc912

    CPSW phy found : id is : 0x1cc912
    udhcpc (v1.13.2) started
    Sending discover...
    PHY: 0:02 - Link is Up - 0/Half
    PHY: 0:02 - Link is Down
    PHY: 0:01 - Link is Up - 100/Full
    Sending discover...
    Sending discover...
    No lease, forking to background
    done.
    Setting up IP spoofing protection: rp_filter.
    Mon Dec 31 10:37:00 UTC 2012
    INIT: Entering runlevel: 5
    Starting system message bus: dbus.
    Starting telnet daemon.
    Starting syslogd/klogd: done
    Starting thttpd.

     _____                    _____           _         _  
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_| 
                  |___|                    |___|           

    Arago Project http://arago-project.org dm814x-evm ttyO0

    Arago 2011.09 dm814x-evm ttyO0

    dm814x-evm login: root

    root@dm814x-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 84:7E:40:EA:5F:6C 
              UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
              RX packets:209 errors:0 dropped:74 overruns:0 frame:0
              TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:31367 (30.6 KiB)  TX bytes:2950 (2.8 KiB)
              Interrupt:40

    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)

  • Bob,

    Can you first try to ping your host PC from the u-boot:

    This is what I have:

    TI8148_EVM#ping 172.20.2.57
    link up on port 0, speed 100, full duplex
    Using cpsw device
    host 172.20.2.57 is alive

    BR
    Pavel

  • Hi Pavel,

    TI8148_EVM#ping 192.168.5.93
    Auto negotitation failed
    link up on port 0, speed 100, full duplex
    Using cpsw device
    host 192.168.5.93 is alive

    B/R

    Bob Lee

  • Bob,

    bob lee said:
    TI8148_EVM#ping 192.168.5.93
    Auto negotitation failed
    link up on port 0, speed 100, full duplex
    Using cpsw device
    host 192.168.5.93 is alive

    Are you using EMAC0 or EMAC1?

    BR
    Pavel

  • Pavel,

    EMAC0

    B/R

    Bob

  • Bob,

    bob lee said:
    root@dm814x-evm:~# ifconfig eth0 192.168.5.108

    After you set manually the DM814x ip address, what is the output of the ifconfig command?

    This is what I have:

    root@dm814x-evm:~# ifconfig eth0 172.20.2.60
    root@dm814x-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 90:D7:EB:D5:13:96  
              inet addr:172.20.2.60  Bcast:172.20.255.255  Mask:255.255.0.0
              UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
              RX packets:3852 errors:0 dropped:1807 overruns:0 frame:0
              TX packets:168 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:431167 (421.0 KiB)  TX bytes:16880 (16.4 KiB)
              Interrupt:40

    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@dm814x-evm:~#

    Regards,
    Pavel

  • Hi Pavel,

    It's mine:


    root@dm814x-evm:~# ifconfig eth0 192.168.5.108
    root@dm814x-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 84:7E:40:EA:5F:6C 
              inet addr:192.168.5.108  Bcast:192.168.5.255  Mask:255.255.255.0
              UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
              RX packets:1132 errors:0 dropped:440 overruns:0 frame:0
              TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:170478 (166.4 KiB)  TX bytes:13570 (13.2 KiB)
              Interrupt:40

    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@dm814x-evm:~#

    B/R

    Bob

  • Bob,

    bob lee said:
    Bcast:192.168.5.255  Mask:255.255.255.0

    These are different from mine: Bcast:x.x.255.255  Mask:255.255.0.0 I suspect this might be cause your ping fail.

    What do you have when execute the below command?

    root@dm814x-evm:~# ifconfig eth0 down
    root@dm814x-evm:~# ifconfig eth0 up  

    CPSW phy found : id is : 0x4dd074

    CPSW phy found : id is : 0x4dd074
    PHY: 0:00 - Link is Up - 100/Full
    root@dm814x-evm:~#

    Have a look also in the below e2e threads:

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

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

    Regards,
    Pavel

  • Hi Pavel,


    root@dm814x-evm:~#  ifconfig eth0 down
    root@dm814x-evm:~#  ifconfig eth0 up

    CPSW phy found : id is : 0x1cc912

    CPSW phy found : id is : 0x1cc912
    root@dm814x-evm:~# PHY: 0:01 - Link is Up - 100/Full

    B/R

    Bob

  • Bob,

    It seems that your PHYs are mapped to 1 and 2, instead of 0 and 1.

    bob lee said:
    davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
    davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver unknown



    bob lee said:
    Sending discover...
    PHY: 0:02 - Link is Up - 0/Half
    PHY: 0:02 - Link is Down
    PHY: 0:01 - Link is Up - 100/Full
    Sending discover...
    Sending discover...
    No lease, forking to background
    done.
     

    I am not sure if this is the root cause of the ping issue, but can you try map them in 0 and 1 (like in the default linux kernel code) and see if this will fix the issue.

    This is what I have during kernel boot:

    davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
    davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown

    Configuring network interfaces...
    CPSW phy found : id is : 0x4dd074

    CPSW phy found : id is : 0x4dd074
    udhcpc (v1.13.2) started
    Sending discover...
    PHY: 0:01 - Link is Up - 0/Half
    PHY: 0:01 - Link is Down
    PHY: 0:00 - Link is Up - 100/Full
    Sending discover...
    Sending select for 172.20.1.30...
    Lease of 172.20.1.30 obtained, lease time 430662
    adding dns 172.20.0.1
    adding dns 172.18.0.1
    done.

    Regards,
    Pavel

  • Bob,

    The below e2e threads looks also related:

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/182794.aspx

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

    Regards,
    Pavel

  • Hi Pavel,

    We use  phy[1] and  phy[2] for our custom board.

    Thus,is there anything to be  modified to support phy[1] and  phy[2] ?

    B/R

    Bob

  • Hi Pavel,

    I use WireShark to analyse the data packet.But I find that the custom board couldn't send out packet.

    Maybe there are something wrong with the driver for network card.What do you think ?

    B/R

    Bob

  • Bob,

    bob lee said:
    Thus,is there anything to be  modified to support phy[1] and  phy[2] ?

    You need to provide the Phy address to the cpsw platform data in device file, linux-psp/arch/arm/mach-omap2/devices.c

    You need to update phy_id field according to your hardware design.

    BR
    Pavel

  • Bob,

    bob lee said:

    I use WireShark to analyse the data packet.But I find that the custom board couldn't send out packet.

    Maybe there are something wrong with the driver for network card.What do you think ?

    From what I understand, everything works fine from u-boot (dhcp, ping, tftp, nfs), but does not work from the linux/user space. Then the problem should be in the linux kernel part. Please go though the below link:

    http://processors.wiki.ti.com/index.php/TI81xx_PSP_Porting_Guide#PHY_driver_support_in_Linux

    Are you trying to ping the host PC through router/switch? If yes, please try connect the board and the host PC directly (without router/switch) and try ping again.

    Regards,
    Pavel

  • Hi Pavel,

    As you say ,everything works fine from u-boot.Only in the linux system,it couldn't connect the host PC.

    According to your advice,I connect the board and my host PC directly rather than through router,but it still couldn't connect the host PC.

    B/R

    Bob

  • Hi Pavel,

    For farther infor,please refer to below log.

    root@dm814x-evm:/# ls
    bin         etc         linuxrc     mnt         srv         usr
    boot        home        lost+found  proc        sys         var
    dev         lib         media       sbin        tmp
    root@dm814x-evm:/# ifconfig
    eth0      Link encap:Ethernet  HWaddr 84:7E:40:EA:5F:6C 
              inet addr:192.168.5.106  Bcast:192.168.5.255  Mask:255.255.255.0
              UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
              RX packets:98 errors:0 dropped:19 overruns:0 frame:0
              TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:16987 (16.5 KiB)  TX bytes:2950 (2.8 KiB)
              Interrupt:40

    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@dm814x-evm:/# ping 192.168.5.93
    PING 192.168.5.93 (192.168.5.93): 56 data bytes

    After executing ping 192.168.5.93,it stops.

    PS: my host PC IP:192.168.5.93

    B/R

    Bob

  • Bob,

    Are you working with EZSDK 5.05.02.00 / PSP 04.04.00.01?

    The TI DM814x EVM has two RGMII Ethernet port (RGMII0, RGMII1) using a two external PHY AR8031 which is interfaced to the processor via the RGMII interface. What are your PHYs? In which mode, RGMII, RMII or G/MII?


    The below e2e threads report very similar issue as you have:

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

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/178450/733430.aspx#733430

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

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/319590/1112982.aspx#1112982

    Regards,
    Pavel

  • Hi Pavel,

    We use ezsdk_5_05_02_00.

    B/R

    Bob

  • Hi Pavel,

    My custom board is working in RGMII mode.May I modify sth. ?

    B/R

    Bob

  • Bob,

    You can try modify the internal delay.

    BR
    Pavel

  • Hi Pavel,

    Would you please tell me how to modify the internal delay?

    That is to say,I want to know the internal delay in which file.

    Thank you

    B/R

    Bob

  • Bob,

    bob lee said:
    Would you please tell me how to modify the internal delay?

    The RGMII internal delay and how to modify it is explained in the e2e threads, links I have already provide you in this thread. Please have a look again what I have provide you as links to other e2e discussions.

    Below is one more which looks related to your issue:

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/269389.aspx

    Regards,
    Pavel

  • Hi Pavel,

    I'm sorry for disturbing you again.

    I have tried according to your advice,but failed to ping our host PC.

    Now,I want to know how to config the pinmux.
    Do I need to modify something in Devices.c(void ti814x_cpsw_mux(void)) or in Mux814x.c(_TI814X_MUXENTRY)?

     

    Thank you in advance .

    Bob

  • Bob,

    You should configure the EMAC pins according to the mode you are using, refer to the DM814x datasheet about which mode use the corresponding EMAC pins.

    section 3.2.6 EMAC [(R)(G)MII Modes] and MDIO

    EMAC[0] RGMII Mode

    EMAC[1] RGMII Mode

    For how to configure the pinmux in linux kernel, refer to the below wiki page:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_User_Guide#TI814X.2FTI813X

    Regards,
    Pavel

  • Hi Pavel,

    I followed the wiki page you gave me to configure the pinmux,but still couldn't ping our host PC successfully.

    Maybe I don't configure the parameter completely.

    Would you please tell me how to configure the pinmux step by step ?

    Thank you very much.

    Here are the infor for our board .

    pin GPIO GMII0 GMII1 VIN0 VIN1
    L24 GP1[12] EMAC[0]_RGRXC     VIN[1]B_D[0]
    L23 GP3[24] EMAC[0]_RGRXCTL     VIN[1]B_D[1]
    R25 GP3[25] EMAC[0]_RGRXD[2]     VIN[1]B_D[2]
    J26 GP3[26] EMAC[0]_RGTXCTL     VIN[1]B_D[3]
    H27 GP3[27] EMAC[0]_RGTXC     VIN[1]B_D[4]
    G28 GP3[28] EMAC[0]_RGTXD[0]     VIN[1]B_D[5]
    P23 GP3[29] EMAC[0]_RGRXD[0]     VIN[1]B_D[6]
    R23 GP3[30] EMAC[0]_RGRXD[1]     VIN[1]B_D[7]
    J25   EMAC[1]_RGRXCTL      
    T23   EMAC[0]_RGRXD[3]      
    H26   EMAC[0]_RGTXD[3]      
    F28   EMAC[0]_RGTXD[2]      
    G27   EMAC[0]_RGTXD[1]      
    K22   EMAC[1]_RGRXD[1] EMAC[1]    
    K23   EMAC[1]_RGRXC EMAC[1]    
    J24   EMAC[1]_RGRXD[3] EMAC[1]    
    H25   EMAC[1]_RGTXD[1] EMAC[1]    
    H22   EMAC[1]_RGTXCTL EMAC[1]    
    H23   EMAC[1]_RGTXD[0] EMAC[1]    
    G23   EMAC[1]_RGTXD[2] EMAC[1]    
    F27   EMAC[1]_RGTXC EMAC[1]    
    J22   EMAC[1]_RGRXD[0] EMAC[1]    
    H24   EMAC[1]_RGTXD[3] EMAC[1]    
    J23   EMAC[1]_RGRXD[2] EMAC[1]  

     

     

  • Here are the pinmux configure in u-boot.

    4863.mux.h

    8507.pinmux.h

  • Hi Pavel,

    Really need your support and wait for your help.

    Thank you

    B/R

    Bob

  • Bob,

    Often these things are PHY related. U-boot generally has a simpler/fixed configuration whereas Linux does full auto-neg etc.

    Please double check

     - enable pin multiplexing for EMAC and MDIO

    - enable EMAC and MDIO in PRCM and Control Module GMII_SEL register

    - generic PHY driver or custom PHY driver should be used:

    http://processors.wiki.ti.com/index.php/TI81xx_PSP_Porting_Guide#Ethernet_Driver_-_Adding_Custom_Ethernet_Phy

    - phy addresses are correct

    - run ethtool and look for link detected:

    http://e2e.ti.com/support/embedded/linux/f/354/t/354901.aspx

    Regards,
    Pavel

  • Bob,

    For next debugging steps, I would try the following
    • Compare register settings in the working (u-boot) case vs the non-working (linux) case?
      • The pinmux and CPSW of the device (DM814x) to start along with the external PHY register settings.
    • Hook up wireshark on an external node and see if there are any packets at all egressing from the board.
      • If there are then compare working vs non-working.
    • Use mii-tool /ethtool to force the mode rather than auto negotiate.
      • e.g. try 10Mbps vs 100
    Hopefully these will provide more data and clues.
  • Bob,

    bob lee said:
    TI8148_EVM#ping 192.168.5.93
    Auto negotitation failed
    link up on port 0, speed 100, full duplex
    Using cpsw device
    host 192.168.5.93 is alive

    This error message "Auto negotitation failed" is suspicious. Looks to be a PHY interaction/configuration issue. Could you please tell us what is the external PHY that you are using?

    In example, the DM814x EVM use Atheros AR8013, the DM816x EVM use LSI ET1011C.

    Regards,
    Pavel

  • Hi Pavel,

    We are using REALTEK  RTL8211CL.

    B/R

    Bob

  • Hi Pavel,

    There are two RTL82211CL chips mounted on our custom board.

    What is the external PHY on the evm board?

    Is  there any difference?

    B/R

    Bob

  • Hi Pavel,

    Each external PHY has it's id, and all the id are  different .Is it right?

    B/R

    Bob

  • Bob,

    In DM814x EVM we have Atheros AR8031, while in your custom board you have Realtek RTL8211CL. See the below e2e threads which discuss replacing the EVM PHY with other PHY:

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

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

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/182794.aspx

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/230115.aspx

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/280503.aspx

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/200257.aspx

    BR
    Pavel

  • Hi Pavel,

    I have select realtek PHYs in kernel configure,But meet  another situation as below.

    Creating 6 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000020000 : "U-Boot-min"
    0x000000020000-0x000000260000 : "U-Boot"
    0x000000260000-0x000000280000 : "U-Boot Env"
    0x000000280000-0x0000006c0000 : "Kernel"
    0x0000006c0000-0x00000cee0000 : "File System"
    0x00000cee0000-0x000010000000 : "Reserved"
    Fixed MDIO Bus: probed
    ------------[ cut here ]------------
    WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x7c/0x9c()
    sysfs: cannot create duplicate filename '/class/mdio_bus/0'
    Modules linked in:
    Backtrace:
    [<c0049bd0>] (dump_backtrace+0x0/0x110) from [<c03cdd5c>] (dump_stack+0x18/0x1c)
     r7:cc82bd70 r6:c010b5a8 r5:c04a35f2 r4:000001c3
    [<c03cdd44>] (dump_stack+0x0/0x1c) from [<c006d194>] (warn_slowpath_common+0x54/0x6c)
    [<c006d140>] (warn_slowpath_common+0x0/0x6c) from [<c006d250>] (warn_slowpath_fmt+0x38/0x40)
     r9:00000000 r8:cc8a2f30 r7:ffffffef r6:cc82bdc0 r5:ca675e10
    r4:cc813000
    [<c006d218>] (warn_slowpath_fmt+0x0/0x40) from [<c010b5a8>] (sysfs_add_one+0x7c/0x9c)
     r3:cc813000 r2:c04a3601
    [<c010b52c>] (sysfs_add_one+0x0/0x9c) from [<c010c570>] (sysfs_do_create_link+0xfc/0x1c8)
     r7:ca662e48 r6:00000000 r5:ca675e10 r4:ca675d50
    [<c010c474>] (sysfs_do_create_link+0x0/0x1c8) from [<c010c668>] (sysfs_create_link+0x14/0x18)
    [<c010c654>] (sysfs_create_link+0x0/0x18) from [<c0211a64>] (device_add+0x1cc/0x4a0)
    [<c0211898>] (device_add+0x0/0x4a0) from [<c0211d54>] (device_register+0x1c/0x20)
    [<c0211d38>] (device_register+0x0/0x20) from [<c026c350>] (mdiobus_register+0x90/0x17c)
     r5:ca662e04 r4:ca662e00
    [<c026c2c0>] (mdiobus_register+0x0/0x17c) from [<c03ca950>] (davinci_mdio_probe+0x1d4/0x2ac)
     r7:c0514f40 r6:c0515ddc r5:c0514f38 r4:ca676480
    [<c03ca77c>] (davinci_mdio_probe+0x0/0x2ac) from [<c0215000>] (platform_drv_probe+0x20/0x24)
     r7:ca65cf00 r6:c05424a4 r5:c0514f40 r4:c0514f40
    [<c0214fe0>] (platform_drv_probe+0x0/0x24) from [<c0213f6c>] (driver_probe_device+0xd0/0x190)
    [<c0213e9c>] (driver_probe_device+0x0/0x190) from [<c0214094>] (__driver_attach+0x68/0x8c)
     r7:ca65cf00 r6:c05424a4 r5:c0514f74 r4:c0514f40
    [<c021402c>] (__driver_attach+0x0/0x8c) from [<c0213718>] (bus_for_each_dev+0x50/0x84)
     r7:ca65cf00 r6:c05424a4 r5:c021402c r4:00000000
    [<c02136c8>] (bus_for_each_dev+0x0/0x84) from [<c0213d90>] (driver_attach+0x20/0x28)
     r6:c05424a4 r5:c00086b0 r4:c002da70
    [<c0213d70>] (driver_attach+0x0/0x28) from [<c0212ff0>] (bus_add_driver+0xb4/0x234)
    [<c0212f3c>] (bus_add_driver+0x0/0x234) from [<c02143cc>] (driver_register+0xb0/0x13c)
    [<c021431c>] (driver_register+0x0/0x13c) from [<c02154a4>] (platform_driver_register+0x4c/0x60)
     r9:00000000 r8:c0024288 r7:00000013 r6:c007039c r5:c00086b0
    r4:c002da70
    [<c0215458>] (platform_driver_register+0x0/0x60) from [<c002429c>] (davinci_mdio_init+0x14/0x1c)
    [<c0024288>] (davinci_mdio_init+0x0/0x1c) from [<c003b42c>] (do_one_initcall+0xd0/0x1a4)
    [<c003b35c>] (do_one_initcall+0x0/0x1a4) from [<c000874c>] (kernel_init+0x9c/0x154)
    [<c00086b0>] (kernel_init+0x0/0x154) from [<c007039c>] (do_exit+0x0/0x5e4)
     r5:c00086b0 r4:00000000
    ---[ end trace 204a776180f3a48e ]---
    mii_bus 0 failed to register
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    davinci_mdio davinci_mdio.0: detected phy mask fffffff9
    davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver RTL821x Gigabit Ethernet
    davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver RTL821x Gigabit Ethernet

  • It shows "mii_bus 0 failed to register".

    We use rgmii mode and I really don't know how to configure ,so need your help.

    Thank you.

    BR

    Bob

  • Bob,

    The DM814x MDIO has only one bus, which you can use to control two PHYs. You should not register a second mdio bus.

    See the below e2e thread for more info:

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/341297.aspx

    Best regards,
    Pavel

  • Hi Pavel,

    The mdio_bus register is ok now.

    I get some infor about pinmux.Would you please help me check if there are something wrong?

    root@dm814x-evm:/debugfs/omap_mux# ls gmii0*
    gmii0_col     gmii0_rxd1    gmii0_rxd6    gmii0_txd0    gmii0_txd5
    gmii0_crs     gmii0_rxd2    gmii0_rxd7    gmii0_txd1    gmii0_txd6
    gmii0_gtxclk  gmii0_rxd3    gmii0_rxdv    gmii0_txd2    gmii0_txd7
    gmii0_rxclk   gmii0_rxd4    gmii0_rxer    gmii0_txd3    gmii0_txen
    gmii0_rxd0    gmii0_rxd5    gmii0_txclk   gmii0_txd4
    root@dm814x-evm:/debugfs/omap_mux# cat 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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 = 0x40001), 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:/debugfs/omap_mux#

    BR

    Bob 

  • Hi Pavel,

    Maybe I need to modify OMAP_MUX_MODE1 to OMAP_MUX_MODE0.Is it right?

    BR

    Bob

  • Bob,

    I think the pin mux is fine.

    First I try to ping the host and it works:

    root@dm814x-evm:~# ping 172.20.2.57
    PING 172.20.2.57 (172.20.2.57): 56 data bytes
    64 bytes from 172.20.2.57: seq=0 ttl=64 time=5.032 ms
    64 bytes from 172.20.2.57: seq=1 ttl=64 time=0.209 ms
    64 bytes from 172.20.2.57: seq=2 ttl=64 time=0.198 ms
    64 bytes from 172.20.2.57: seq=3 ttl=64 time=0.194 ms
    64 bytes from 172.20.2.57: seq=4 ttl=64 time=0.213 ms

    --- 172.20.2.57 ping statistics ---
    5 packets transmitted, 5 packets received, 0% packet loss

    Then I list the pins as you:

    root@dm814x-evm:~# mount -t debugfs debugfs /sys/kernel/debug

    root@dm814x-evm:~# cd /sys/kernel/debug/omap_mux/

    root@dm814x-evm:/sys/kernel/debug/omap_mux# ls gmii0*
    gmii0_col     gmii0_rxd1    gmii0_rxd6    gmii0_txd0    gmii0_txd5
    gmii0_crs     gmii0_rxd2    gmii0_rxd7    gmii0_txd1    gmii0_txd6
    gmii0_gtxclk  gmii0_rxd3    gmii0_rxdv    gmii0_txd2    gmii0_txd7
    gmii0_rxclk   gmii0_rxd4    gmii0_rxer    gmii0_txd3    gmii0_txen
    gmii0_rxd0    gmii0_rxd5    gmii0_txclk   gmii0_txd4
    root@dm814x-evm:/sys/kernel/debug/omap_mux# cat 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/omap_mux#

  • Hi Pavel,

    I got it.

    Maybe the above infor you gave me is related to the PHY.

    I also know I can configure the registers in below function.But What confuse me is how to configure .

    Do you have any ideas?

    The function:void ti814x_cpsw_mux(void);

    The realtek datasheet:6177.RTL8211C(L)_DataSheet_1.5.pdf

    BR

    Bob

  • Hi Pavel,

    I have configured the pin registers as yours,but it still couldn't work .

    BR

    Bob

  • Hi Pavel,

    I have found it showed "davinci_mdio davinci_mdio.0: detected phy mask fffffff9" ,but the realtek chip's phy_id_mask is 0x001fffff.Does it matter?

    BR

    Bob

  • Bob,

    bob lee said:
    I have found it showed "davinci_mdio davinci_mdio.0: detected phy mask fffffff9" ,but the realtek chip's phy_id_mask is 0x001fffff.Does it matter?

    I think this message "davinci_mdio davinci_mdio.0: detected phy mask fffffff9" is correct, as you use  phy[1] and  phy[2] for your custom board.

    This message comes from the below code:

    linux-psp/drivers/net/davinci_mdio.c

    /* get phy mask from the alive register */
        phy_mask = __raw_readl(&data->regs->alive);
        if (phy_mask) {
            /* restrict mdio bus to live phys only */
            dev_info(data->dev, "detected phy mask %x\n", ~phy_mask);
            phy_mask = ~phy_mask;
        }

    In DM8148 EVM, the phy[0] and phy[1] are used, thus MDIO ALIVE register value is 0x00000003 (~0xfffffffc).

    While in your custom board, as phy[1] and phy[2] are used, the MDIO ALIVE register value should be 0x00000006 (~0xfffffff9).

    I have found two more e2e threads which discuss similar issue as you have:

    http://e2e.ti.com/support/embedded/android/f/509/t/155146.aspx

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

    Regards,
    Pavel

  • Hi Pavel,

    Here are my answers:

    - enable pin multiplexing for EMAC and MDIO

       There are both enabled.

     -enable EMAC and MDIO in PRCM and Control Module GMII_SEL register

    The GMII_SEL register is ok.But I want to know how to enable EMAC and MDIO in PRCM?

    - generic PHY driver or custom PHY driver should be used

     We are using custom PHY and the driver is ok.

    - phy addresses are correct

    It is ok.We use PHY[1] and PHY[2].

    - run ethtool and look for link detected

    After running ethtool,the log is below.

    root@dm814x-evm:~# ethtool eth0
    Settings for eth0:
            Supported ports: [ TP MII ]
            Supported link modes:   10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            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: 100Mb/s
            Duplex: Full
            Port: MII
            PHYAD: 1
            Transceiver: external
            Auto-negotiation: on
            Current message level: 0x00000000 (0)
                                  
            Link detected: yes
    root@dm814x-evm:~# ethtool eth1
    Settings for eth1:
    Cannot get device settings: No such device
    Cannot get wake-on-lan settings: No such device
    Cannot get message level: No such device
    Cannot get link status: No such device
    No data available

    BR

    Bob

     

     

  • Bob,

    Below is what I have:

    root@dm814x-evm:~# ping 172.20.2.57
    PING 172.20.2.57 (172.20.2.57): 56 data bytes
    64 bytes from 172.20.2.57: seq=0 ttl=64 time=4.967 ms
    64 bytes from 172.20.2.57: seq=1 ttl=64 time=0.210 ms
    64 bytes from 172.20.2.57: seq=2 ttl=64 time=0.205 ms
    64 bytes from 172.20.2.57: seq=3 ttl=64 time=0.194 ms
    64 bytes from 172.20.2.57: seq=4 ttl=64 time=0.194 ms

    --- 172.20.2.57 ping statistics ---
    5 packets transmitted, 5 packets received, 0% packet loss
    round-trip min/avg/max = 0.194/1.154/4.967 ms
    root@dm814x-evm:~# ethtool eth0
    Settings for eth0:
        Supported ports: [ TP AUI BNC MII FIBRE ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: on
        Current message level: 0x00000000 (0)
                       
        Link detected: yes
    root@dm814x-evm:~# ethtool eth1
    Settings for eth1:
    Cannot get device settings: No such device
    Cannot get wake-on-lan settings: No such device
    Cannot get message level: No such device
    Cannot get link status: No such device
    No data available
    root@dm814x-evm:~#


    Regards,
    Pavel

  • Hi Pavel,

    I really don't know where is wrong with the eth?

    Do you have any other ideas?

    BR

    Bob

  • Bob,

    I would think, for basic functionality, that the only change would be the PHY address since that is typically decided at the board level with pull-ups/downs. All PHYs have a standard register mapping and interface (MDIO) which should achieve normal operation. Individual PHYs may have some other features but not normally used AFAIK for basic TCP/IP.

    I would recommend you to compare the EVM PHY datasheet with the Realtek PHY datasheet.

    BR
    Pavel