AnsweredAssumed Answered

P4080 RGMII Port don't connecting with external PHY

Question asked by Paramahansa Polo on Dec 7, 2016

Hello folks,

 I'm doing the board "bring up" with linux on a customized QorIQ P4080 revision 3 board. And, I'm using QorIQ SDK v2.0
 I'm having a hard time trying to figure it out the right configuration of the DTS in order to enable the connection between the MAC on FMAN1 dTSEC1 and an external Marvel Alaska 1GB PHY (RGMII).  When linux boots up it seems to recognize the MAC just fine.  I can set an IP and ping to it, but no packets go out nor in.  Counters on the interface, shown using 'ifconfig', remain the same all the time (ie, no traffic).

 Also, the led on the cards on both sides (target and host) react properly when I plug or unplg the RJ45 cable; signaling there is an L1 link established.

 Any help would be very much appreciated.

 Details follow below:
 --------------------

 - I don't use u-boot but an old bootloader based on vxWorks ancient code.
 - .DTS in attachments
 - External PHY is:  RGMII Used as the Management Interface Marvell Alaska 88E1512, 1GB
   The MAC is supposed to be connected directly to the PHY (no MUX).


 On boot linux kernel messages:
 -----------------------------
Reserved memory: initialized node qman-pfdr, compatible id fsl,qman-pfdr
Reserved memory: initialized node qman-fqd, compatible id fsl,qman-fqd
Reserved memory: initialized node bman-fbpr, compatible id fsl,bman-fbpr
Reserved memory: initialized node pme-pdsr, compatible id fsl,pme-pdsr
Reserved memory: initialized node pme-sre, compatible id fsl,pme-sre
Using CoreNet Generic machine description
Memory CAM mapping: 256/256/256 Mb, residual: 1280Mb
Linux version 4.1.8-rt8+gbd51baf (ppolo@localhost.localdomain) (gcc version 4.9.2 (GCC) ) #34 SMP Wed Nov 23 10:58:51 IST 2016
Found initrd at 0xc1001000:0xc2dc85b5
CPU maps initialized for 1 thread per core
bootconsole [udbg0] enabled
setup_arch: initmem
CoreNet Generic board
arch: exit
Zone ranges:
  DMA      [mem 0x0000000000000000-0x000000002fffffff]
  Normal   empty
  HighMem  [mem 0x0000000030000000-0x000000007fffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x000000007fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
MMU: Allocated 1088 bytes of context maps for 255 contexts
PERCPU: Embedded 12 pages/cpu @eef1f000 s19148 r8192 d21812 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
Kernel command line: root=/dev/ram rw ramdisk_size=10000000 log_buf_len=128K mem=2G console=ttyS0,115200n8
log_buf_len: 131072 bytes
early log buf free: 13304(81%)
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Sorting __ex_table...
Memory: 1887812K/2097152K available (7316K kernel code, 356K rwdata, 2200K rodata, 312K init, 458K bss, 209340K reserved, 0K cma-reserved, 1226752K highmem)
Kernel virtual memory layout:
  * 0xfff5f000..0xfffff000  : fixmap
  * 0xffc00000..0xffe00000  : highmem PTEs
  * 0xffbfd000..0xffc00000  : early ioremap
  * 0xf1000000..0xffbfd000  : vmalloc & ioremap
Hierarchical RCU implementation.
 RCU debugfs-based tracing is enabled.
 Additional per-CPU info printed with stalls.
NR_IRQS:512 nr_irqs:512 16
mpic: Setting up MPIC " OpenPIC  " version 1.2 at 190040000, max 8 CPUs
mpic: ISU size: 512, shift: 9, mask: 1ff
mpic: Initializing for 512 sources
clocksource timebase: mask: 0xffffffffffffffff max_cycles: 0x8a60dd6a9, max_idle_ns: 440795204056 ns
clocksource: timebase mult[1aaaaaab] shift[24] registered
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
e500 family performance monitor hardware support registered
smp: smp_85xx_start_cpu: timeout waiting for cpu 1 to reset
smp: failed starting cpu 1 (rc -11)
smp: smp_85xx_start_cpu: timeout waiting for cpu 2 to reset
smp: failed starting cpu 2 (rc -11)
smp: smp_85xx_start_cpu: timeout waiting for cpu 3 to reset
smp: failed starting cpu 3 (rc -11)
smp: smp_85xx_start_cpu: timeout waiting for cpu 4 to reset
smp: failed starting cpu 4 (rc -11)
smp: smp_85xx_start_cpu: timeout waiting for cpu 5 to reset
smp: failed starting cpu 5 (rc -11)
smp: smp_85xx_start_cpu: timeout waiting for cpu 6 to reset
smp: failed starting cpu 6 (rc -11)
smp: smp_85xx_start_cpu: timeout waiting for cpu 7 to reset
smp: failed starting cpu 7 (rc -11)
Brought up 1 CPUs
devtmpfs: initialized
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
NET: Registered protocol family 16
Bman ver:0a02,01,00
qman-fqd addr 0x7d800000 size 0x800000
qman-pfdr addr 0x7e000000 size 0x2000000
Qman ver:0a01,01,02,00
            
PCI: Probing PCI hardware
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
bman-fbpr addr 0x7c000000 size 0x1000000
Bman err interrupt handler present
Bman portal (shared) initialised, cpu 0
Bman portal (slave) initialised, cpu 1
Bman portal (slave) initialised, cpu 2
Bman portal (slave) initialised, cpu 3
Bman portal (slave) initialised, cpu 4
Bman portal (slave) initialised, cpu 5
Bman portal (slave) initialised, cpu 6
Bman portal (slave) initialised, cpu 7
Bman portals initialised
Qman err interrupt handler present
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@4000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@8000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@c000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@10000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@14000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@18000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@20000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@24000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@1c000' has 0x0101
Revision=0x0102, but portal '/qman-portals@194200000/qman-portal@0' has 0x0101
Qman portal (shared) initialised, cpu 0
Qman portal (slave) initialised, cpu 1
Qman portal (slave) initialised, cpu 2
Qman portal (slave) initialised, cpu 3
Qman portal (slave) initialised, cpu 4
Qman portal (slave) initialised, cpu 5
Qman portal (slave) initialised, cpu 6
Qman portal (slave) initialised, cpu 7
Qman portals initialised
Bman: BPID allocator includes range 32:32
Qman: FQID allocator includes range 256:256
Qman: FQID allocator includes range 32768:32768
Qman: CGRID allocator includes range 0:256
Qman: pool channel allocator includes range 33:15
No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
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: 30492K (c1001000 - c2dc8000)
futex hash table entries: 2048 (order: 5, 131072 bytes)
audit: initializing netlink subsys (disabled)
audit: type=2000 audit(0.684:1): initialized
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 256 MB page size, pre-allocated 0 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
ntfs: driver 2.1.32 [Flags: R/O].
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
console [ttyS0] disabled
serial8250.0: ttyS0 at MMIO 0x19011c500 (irq = 36, base_baud = 18750000) is a 16550A
console [ttyS0] enabled
console [ttyS0] enabled
bootconsole [udbg0] disabled
bootconsole [udbg0] disabled
serial8250.0: ttyS1 at MMIO 0x19011c600 (irq = 36, base_baud = 18750000) is a 16550A
serial8250.0: ttyS2 at MMIO 0x19011d500 (irq = 37, base_baud = 18750000) is a 16550A
serial8250.0: ttyS3 at MMIO 0x19011d600 (irq = 37, base_baud = 18750000) is a 16550A
ePAPR hypervisor byte channel driver
Generic non-volatile memory driver v1.1
brd: module loaded
loop: module loaded
st: Version 20101219, fixed bufsize 32768, s/g segs 256
libphy: Fixed MDIO Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
Freescale FM module, FMD API version 21.1.0
Freescale FM Ports module
fsl_mac: fsl_mac: FSL FMan MAC API based driver
fsl_mac 1904e0000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac 1904e0000.ethernet: FMan MAC address: 00:04:9f:02:1f:bb
fsl_mac 1904e2000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac 1904e2000.ethernet: FMan MAC address: 00:04:9f:02:1f:bc
fsl_mac 1905e0000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac 1905e0000.ethernet: FMan MAC address: 00:04:9f:02:1f:c0
fsl_mac 1905e2000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac 1905e2000.ethernet: FMan MAC address: 00:04:9f:02:1f:c1
fsl_mac 1905e4000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac 1905e4000.ethernet: FMan MAC address: 00:04:9f:02:1f:c2
fsl_dpa: FSL DPAA Ethernet driver
fsl_dpa: fsl_dpa: Probed interface eth0
fsl_dpa: fsl_dpa: Probed interface eth1
fsl_advanced: FSL DPAA Advanced drivers:
fsl_proxy: FSL DPAA Proxy initialization driver
fsl_dpa_shared: FSL DPAA Shared Ethernet driver
fsl_dpa_macless: FSL DPAA MACless Ethernet driver
fsl_oh: FSL FMan Offline Parsing port driver
e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
e1000: Copyright (c) 1999-2006 Intel Corporation.
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
CSLIP: code copyright 1989 Regents of the University of California.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
mpc-i2c 190118000.i2c: timeout 1000000 us
mpc-i2c 190118100.i2c: timeout 1000000 us
mpc-i2c 190119000.i2c: timeout 1000000 us
mpc-i2c 190119100.i2c: timeout 1000000 us
lm90 1-004c: Register 0x4 read failed (-6)
lm90 1-004c: Failed to read convrate register!
lm90 1-004c: Register 0x3 read failed (-6)
lm90 1-004c: Initialization failed!
Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software
EDAC MC0: Giving out device to module MPC85xx_edac controller mpc85xx_mc_err: DEV mpc85xx_mc_err (INTERRUPT)
MPC85xx_edac acquired irq 490 for MC
MPC85xx_edac MC err registered
EDAC MC1: Giving out device to module MPC85xx_edac controller mpc85xx_mc_err: DEV mpc85xx_mc_err (INTERRUPT)
MPC85xx_edac acquired irq 489 for MC
MPC85xx_edac MC err registered
qoriq_cpufreq: Freescale QorIQ CPU frequency scaling driver
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-esdhc 190114000.sdhc: No vmmc regulator found
sdhci-esdhc 190114000.sdhc: No vqmmc regulator found
mmc0: SDHCI controller on 190114000.sdhc [190114000.sdhc] using DMA
platform caam_qi.0: Linux CAAM Queue I/F driver initialised
caam 190300000.crypto: device ID = 0x0a10030000000000 (Era 2)
caam 190300000.crypto: job rings = 4, qi = 1
caam_jr 190301000.jr: failed to flush job ring 0
caam_jr: probe of 190301000.jr failed with error -5
caam_jr 190302000.jr: failed to flush job ring 1
caam_jr: probe of 190302000.jr failed with error -5
caam_jr 190303000.jr: failed to flush job ring 2
caam_jr: probe of 190303000.jr failed with error -5
caam_jr 190304000.jr: failed to flush job ring 3
caam_jr: probe of 190304000.jr failed with error -5
caam algorithms registered in /proc/crypto
platform caam_qi.0: fsl,sec-v4.0 algorithms registered in /proc/crypto
Job Ring Device allocation for transform failed
caam 190300000.crypto: fsl,sec-v4.0 algorithms registered in /proc/crypto
Freescale USDPAA process driver
fsl-usdpaa: no region found
Freescale USDPAA process IRQ driver
fsl-pme 190316000.pme: ver: 0x00100201
Freescale pme2 db driver
Freescale pme2 scan driver
fsl-pme2-scan: device pme_scan registered
Freescale hypervisor management driver
fsl-hv: no hypervisor found
ipip: IPv4 over IPv4 tunneling driver
Initializing XFRM netlink socket
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
Key type dns_resolver registered
libphy: mdio_mux: probed
libphy: mdio_mux: probed
libphy: mdio_mux: probed
libphy: mdio_mux: probed
mdio-mux-gpio mdio-mux-emi1: Version 1.0
libphy: mdio_mux: probed
libphy: mdio_mux: probed
mdio-mux-gpio mdio-mux-emi2: Version 1.0
fsl_generic: FSL DPAA Generic Ethernet driver
hctosys: unable to open rtc device (rtc0)
RAMDISK: gzip image found at block 0
mmc0: MAN_BKOPS_EN bit is not set
mmc0: new high speed MMC card at address 0001
mmcblk0: mmc0:0001 MMC16G 14.5 GiB
mmcblk0boot0: mmc0:0001 MMC16G partition 1 16.0 MiB
mmcblk0boot1: mmc0:0001 MMC16G partition 2 16.0 MiB
 mmcblk0: p1
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 312K (c094e000 - c099c000)
INIT: version 2.88 booting
Starting udev
udevd[1041]: starting version 182
fsl_dpa fsl,dpaa:ethernet@0 fm1-gb0: renamed from eth0
fsl_dpa fsl,dpaa:ethernet@1 fm1-gb1: renamed from eth1
udevd[1047]: renamed network interface eth0 to fm1-gb0
udevd[1048]: renamed network interface eth1 to fm1-gb1
bootlogd: cannot allocate pseudo tty: No such file or directory
random: dd urandom read with 12 bits of entropy available
Populating dev cache
hwclock: can't open '/dev/misc/rtc': No such file or directory
Sun Jun  5 08:11:01 UTC 2016
hwclock: can't open '/dev/misc/rtc': No such file or directory
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
Running postinst /etc/rpm-postinsts/101-inetutils-inetd...
Running postinst /etc/rpm-postinsts/102-inetutils-ftpd...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
 Removing any system startup links for run-postinsts ...
  /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... done.
Starting OpenBSD Secure Shell server: sshd
  generating ssh RSA key...
  generating ssh ECDSA key...
  generating ssh DSA key...
  generating ssh ED25519 key...
done.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting network benchmark server: netserver.
Starting system log daemon...0
Starting kernel log daemon...0
Starting internet superserver: xinetd.

QorIQ SDK (FSL Reference Distro) 2.0 p4080ds /dev/ttyS0

p4080ds login:

----------------------------------------------------------------


root@p4080ds:~# ifconfig -a
fm1-gb0   Link encap:Ethernet  HWaddr 00:04:9f:02:1f:bb 
          BROADCAST 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)
          Memory:904e0000-904e0fff

fm1-gb1   Link encap:Ethernet  HWaddr 00:04:9f:02:1f:bc 
          BROADCAST 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)
          Memory:904e2000-904e2fff

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  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)

sit0      Link encap:UNSPEC  HWaddr 00-00-00-00-89-40-00-00-00-00-00-00-00-00-00-00 
          NOARP  MTU:1480  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)

tunl0     Link encap:IPIP Tunnel  HWaddr  
          NOARP  MTU:1480  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@p4080ds:~# ifconfig fm1-gb0 10.10.10.13 netmask 255.255.255.0 up
root@p4080ds:~# random: nonblocking pool is initialized

root@p4080ds:~# ifconfig fm1-gb0
fm1-gb0   Link encap:Ethernet  HWaddr 00:04:9f:02:1f:bb 
          inet addr:10.10.10.13  Bcast:10.10.10.255  Mask:255.255.255.0
          inet6 addr: fe80::204:9fff:fe02:1fbb/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:418 (418.0 B)
          Memory:904e0000-904e0fff

root@p4080ds:~#
root@p4080ds:~# ping 10.10.10.13
PING 10.10.10.13 (10.10.10.13) 56(84) bytes of data.
64 bytes from 10.10.10.13: icmp_seq=1 ttl=64 time=0.097 ms
64 bytes from 10.10.10.13: icmp_seq=2 ttl=64 time=0.054 ms
^C
--- 10.10.10.13 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.054/0.075/0.097/0.023 ms
root@p4080ds:~#
root@p4080ds:~# ping 10.10.10.200
PING 10.10.10.200 (10.10.10.200) 56(84) bytes of data.
From 10.10.10.13 icmp_seq=1 Destination Host Unreachable
From 10.10.10.13 icmp_seq=2 Destination Host Unreachable
From 10.10.10.13 icmp_seq=3 Destination Host Unreachable
^C
--- 10.10.10.200 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4022ms
pipe 3
root@p4080ds:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.10.10.0      0.0.0.0         255.255.255.0   U     0      0        0 fm1-gb0
root@p4080ds:~#

----------------------------------------------------------------

root@p4080ds:~# ethtool fm1-gb0
Settings for fm1-gb0:
 Supported ports: [ MII ]
 Supported link modes:   Not reported
 Supported pause frame use: Symmetric Receive-only
 Supports auto-negotiation: No
 Advertised link modes:  Not reported
 Advertised pause frame use: Symmetric Receive-only
 Advertised auto-negotiation: No
 Speed: 10Mb/s
 Duplex: Half
 Port: MII
 PHYAD: 0
 Transceiver: external
 Auto-negotiation: on
 Supports Wake-on: d
 Wake-on: d
 Current message level: 0xffffffff (-1)
          drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol 0xffff8000
 Link detected: no

----------------------------------------------------------------

 Many thanks in advance,

 -Paramahansa

Original Attachment has been moved to: p4080_target_v8.dts.zip

Outcomes