Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎03-30-2016

Directly mac-to-mac between zynq7000 and marvell 6176 through RGMII interface

I got almost the same problems with this topic in xilinx forums. The link is

According to the zynq7000 soc zc702 evaluation board, we replace 88e1111 with 88e6176 switch.

 I'm using zynq7000 with marvell 88e6176 through the RGMII interface. Port5 of 88e6176 is directly attached to cpu ethernet0 through RGMII interface. The same situation as yours, there is no phy in port5. I also changed the dts with phy0@0x15(I use port 5). The command "ifconfig eth0 up" can success, but I can't ping other PC connected to other ports of 88e6176. I have no idea how to fix this problem although I do know there is something wrong with the phy detect of the driver(drivers/net/ethernet/xilinx/xilinx_emacps.c). I can also use u-boot command "mdio read 0x15 regaddr" to read port register value. But I can't read anything about phy register value with command "mdio read 0x0(port0's phydev address) 0x2(phy id register)". That's it.

If you have fixed this problem, could you help me and give me some hints?


The following is my device tree and boot log.


&gem0 {
status = "okay";
phy-mode = "rgmii-id";
phy-handle = <&phy0>;

phy0: phy@0x15 {
reg = <0x15>;


gem0: ethernet@e000b000 {
compatible = "xlnx,ps7-ethernet-1.00.a";
reg = <0xe000b000 0x1000>;
status = "disabled";
interrupts = <0 22 4>;
clocks = <&clkc 13>, <&clkc 30>;
clock-names = "ref_clk", "aper_clk";
local-mac-address = [00 0a 35 00 00 00];
xlnx,has-mdio = <0x1>;
#address-cells = <1>;
#size-cells = <0>;


boot log:


U-Boot 2014.07-svn268 (Jun 18 2015 - 23:00:01)

Board: Xilinx Zynq
I2C: ready
DRAM: ECC disabled 512 MiB
MMC: zynq_sdhci: 0
SF: Detected N25Q512 with page size 256 Bytes, erase size 4 KiB, total 64 MiB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: Gem.e000b000
Hit any key to stop autoboot: 0
Copying Linux from QSPI flash to RAM...
SF: Detected N25Q512 with page size 256 Bytes, erase size 4 KiB, total 64 MiB
SF: 5242880 bytes @ 0x100000 Read: OK
SF: 131072 bytes @ 0x600000 Read: OK
Copying ramdisk...
SF: 6160384 bytes @ 0x620000 Read: OK
## Booting kernel from Legacy Image at 02080000 ...
Image Name: Linux-3.17.0-xilinx-dirty
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3618160 Bytes = 3.5 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 5308044 Bytes = 5.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Loading Kernel Image ... OK
Loading Ramdisk to 1e813000, end 1ed22e8c ... OK
Loading Device Tree to 1e80d000, end 1e8129d1 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 3.17.0-xilinx-dirty (root@bogon) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50) ) #13 SMP PREEMPT Wed Mar 30 13:30:31 CST 2016
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Zynq ZC702 Development Board
cma: Reserved 16 MiB at 1f000000
Memory policy: Data cache writealloc
PERCPU: Embedded 8 pages/cpu @5efd5000 s8704 r8192 d15872 u32768
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyPS0,115200 root=/dev/ram rw earlyprintk
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 491024K/524288K available (4704K kernel code, 240K rwdata, 1628K rodata, 204K init, 210K bss, 33264K reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xffe00000 (2048 kB)
vmalloc : 0x60800000 - 0xff000000 (2536 MB)
lowmem : 0x40000000 - 0x60000000 ( 512 MB)
pkmap : 0x3fe00000 - 0x40000000 ( 2 MB)
modules : 0x3f000000 - 0x3fe00000 ( 14 MB)
.text : 0x40008000 - 0x406375cc (6334 kB)
.init : 0x40638000 - 0x4066b200 ( 205 kB)
.data &colon; 0x4066c000 - 0x406a8160 ( 241 kB)
.bss : 0x406a8160 - 0x406dcbec ( 211 kB)
Preemptible hierarchical RCU implementation.
Dump stacks of tasks blocking RCU-preempt GP.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
L2C: platform provided aux values match the hardware, so have no effect. Please remove them.
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76360001
slcr mapped to 60804000
zynq_clock_init: clkc starts at 60804100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 3298534883328ns
timer #0 at 60806000, irq=43
Console: colour dummy device 80x30
Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x46f7d8 - 0x46f830
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated.
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x60880000
VCCPINT: 1000 mV
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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: 5180K (5e813000 - 5ed22000)
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
jffs2: version 2.2. (NAND) (SUMMARY) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 1001
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-2364208
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to 6086a000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
m25p80 spi0.0: n25q512a13 (65536 Kbytes)
5 ofpart partitions found on MTD device spi0.0
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000600000 : "qspi-fsbl-uboot"
0x000000600000-0x000000b00000 : "qspi-linux"
0x000000b00000-0x000000b20000 : "qspi-device-tree"
0x000000b20000-0x000001100000 : "qspi-rootfs"
0x000001100000-0x000004000000 : "qspi-bitstream"
CAN device driver interface
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2014 Intel Corporation.


in function xemacps_mii_init()
@@@@@@ lp->phy_node is 1593755220

###### phy interface is 8, 7 means rgmii and 8 means rgmii-id

###### phy interface is 8, 7 means rgmii and 8 means rgmii-id

&&&&&&& lp->phy_node is 1593755220, and parent of lp->phy_node is 1079799586

XXXXXX find mdio! lp->mii_bus is 0, 0       //value of lp->mii_bus, not *lp->mii_bus.

XXXXXX mdiobus_alloc finished successfully! lp->mii_bus is 1570875392
libphy: XEMACPS mii bus: probed

$$$$$ here we finish xemacps_mii_init() successfully!!!
xemacps e000b000.ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
zynq-dr e0002000.usb: Unable to init USB phy, missing?
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 57
cdns-i2c e0004000.i2c: timeout waiting on completion
pca954x 0-0074: probe failed
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at 60876000 with timeout 10s
zynq-edac f8006000.memory-controller: ecc not enabled
cpufreq: __cpufreq_add_dev: CPU0: Running at unlisted freq: 666666 KHz
cpufreq: __cpufreq_add_dev: CPU0: Unlisted initial frequency changed to: 666667 KHz
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-arasan e0100000.sdhci: No vmmc regulator found
sdhci-arasan e0100000.sdhci: No vqmmc regulator found
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
Registering SWP/SWPB emulation handler
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ALSA device list:
No soundcards found.
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 204K (40638000 - 4066b000)
Starting rcS...
++ Mounting filesystem
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such file or directory
mount: mounting /dev/mmcblk0 on /mnt failed: No such file or directory
++ Setting up mdev
++ Starting telnet daemon
++ Starting http daemon
++ Starting ftp daemon
++ Starting ssh daemon
random: sshd urandom read with 0 bits of entropy available
rcS Complete
zynq> ifconfig -a
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 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:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr 00:0A:35:00:01:22
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)
Interrupt:54 Base address:0xb000

lo Link encap:Local Loopback
LOOPBACK 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)


zynq> ifconfig eth0 up

## In xemacps_init_hw(), network_config reg: 0x39e2402

**** lp->gmii2rgmii_phy_dev is NULL

###### phydev is 1570874368, 1080643036

###### phydev->dev_flags is 0

###### phydev->attached_dev is 1570870528

###### lp->ndev is 1570870528 == phydev->attached_dev

###### phydev->dev->driver is 1079707111 , NULL or not? bind:genphy_driver

###### lp->ndev is 1570870528
GEM: phydev 5da1a400, phydev->phy_id 0xff001761, phydev->addr 0x15

$$$$$$$$$$$$ phydev and lp->phy_dev is 1570874368 , 1080643036

%%%%% phydev->state is 2;    //It means phy is ready
phydev->speed is 0;
phydev->link is 1;
phydev->phy_id is -16771231;
phydev->mii_bus is 1079719958;
phydev->mii_bus->name is (null);

phydev->mii_bus->id is 1570875396;

phy_addr 0x15, phy_id 0xff001761
attach [Generic PHY] phy driver
## after xemacps_open, network_config reg: 0x39e2402

zynq> ###### here we enter function xemacps_adjust_link ---from xq

## before function xemacps_adjust_link, network_config register: 0x39e2442

dbginfo: in function xemacps_adjust_link, phydev->link : 0

dbginfo: in function xemacps_adjust_link, phydev->speed : 10

dbginfo: in function xemacps_adjust_link, phydev->duplex : 0

dbginfo: in function xemacps_adjust_link, lp->speed : 1000

dbginfo: in function xemacps_adjust_link, lp->link : 0

dbginfo: in function xemacps_adjust_link, lp->duplex : 0

dbginfo: modified, phydev->link : 0

dbginfo: modified, phydev->speed : 10

dbginfo: modified, phydev->duplex : 0

## dbginfo:after function xemacps_adjust_link, network_config reg: 0x39e2442

dbginfo: end of function xemacps_adjust_link, phydev->link : 0

dbginfo: end of function xemacps_adjust_link, phydev->speed : 10

dbginfo: end of function xemacps_adjust_link, phydev->duplex : 0

dbginfo: end of function xemacps_adjust_link, lp->speed : 1000

dbginfo: end of function xemacps_adjust_link, lp->link : 0

dbginfo: end of function xemacps_adjust_link, lp->duplex : 0

0 Kudos
0 Replies