UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor -roger-
Visitor
13,475 Views
Registered: ‎12-05-2013

Zynq and Marvell DSA integration

I am trying to enable the Marvell DSA driver in Linux running on the Zynq. I get the following error during boot:

 

Distributed Switch Architecture driver version 0.1

dsa: probe of dsa@0 failed with error -22

 

When examining the code the driver fails to find the mii_bus in the mii_bus node (of_mdio_find_bus() function in kernel/drivers/net/phy/mdio_bus.c).

I suspect an error in the device tree, anyone who has an idea what the error is?

 

/{
    #address-cells = <1>;
    #size-cells = <1>;
    compatible = "xlnx,zynq-7000";
    cpus {
        #address-cells = <1>;
        #size-cells = <0>;
        ps7_cortexa9_0: cpu@0 {
            bus-handle = <&ps7_axi_interconnect_0>;
            clock-latency = <1000>;
            clocks = <&clkc 3>;
            compatible = "arm,cortex-a9";
            device_type = "cpu";
            interrupt-handle = <&ps7_scugic_0>;
            operating-points = <666667 1000000 333334 1000000 222223 1000000>;
        } ;
        ps7_cortexa9_1: cpu@1 {
            bus-handle = <&ps7_axi_interconnect_0>;
            clock-latency = <1000>;
            clocks = <&clkc 3>;
            compatible = "arm,cortex-a9";
            device_type = "cpu";
            interrupt-handle = <&ps7_scugic_0>;
            operating-points = <666667 1000000 333334 1000000 222223 1000000>;
        } ;
    } ;
    ps7_axi_interconnect_0: amba@0 {
        ps7_ethernet_0: ps7-ethernet@e000b000 {
            #address-cells = <1>;
            #size-cells = <0>;
            clock-names = "ref_clk", "aper_clk";
            clocks = <&clkc 13>, <&clkc 30>;
            compatible = "xlnx,ps7-ethernet-1.00.a";
            interrupt-parent = <&ps7_scugic_0>;
            interrupts = <0 22 4>;
            local-mac-address = [00 0a 35 00 00 00];
                        phy-mode = "gmii";
            reg = <0xe000b000 0x1000>;
            xlnx,ptp-enet-clock = <0x69f6bcb>;
            xlnx,enet-reset = "";
            xlnx,eth-mode = <0x0>;
            xlnx,has-mdio = <0x1>;
            mdio_0: mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                phy0: phy@0 {
                    compatible = "marvell,mv88e6131";
                    device_type = "ethernet-phy";
                    reg = <0>;
                } ;
            } ;
        } ;

    }; /* end ps7_axi_interconnect_0 */

    dsa@0 {
        compatible = "marvell,dsa";
        #address-cells = <2>;
        #size-cells = <0>;
        interrupts = <10>;
        dsa,ethernet = <&ps7_ethernet_0>;
        dsa,mii-bus = <&mdio_0>;

        switch@0 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <16 0>;    /* MDIO address 16, switch 0 in tree */
            port@3 {
                reg = <0>;
                label = "lan0";
                phy-handle = <&ps7_ethernet_0>;
            };
            port@4 {
                reg = <1>;
                label = "lan1";
            };
            port@5 {
                reg = <5>;
                label = "lan2";
            };
            port@6 {
                reg = <6>;
                label = "cpu";
            };
        };
    };
} ;

0 Kudos
9 Replies
Visitor -roger-
Visitor
13,447 Views
Registered: ‎12-05-2013

Re: Zynq and Marvell DSA integration

Update:

 

I managed to find the mdio bus, detect the switch and configure it. I had missed the phy-handle property. Now it fails later in the boot process when it can't find the phy device from the phy device node, see print outs below. Anyone that spots the error in the device tree below?

 

Thanks!

 

/Roger

 

/{
    #address-cells = <1>;
    #size-cells = <1>;
    compatible = "xlnx,zynq-7000";
    cpus {
        #address-cells = <1>;
        #size-cells = <0>;
        ps7_cortexa9_0: cpu@0 {
            bus-handle = <&ps7_axi_interconnect_0>;
            clock-latency = <1000>;
            clocks = <&clkc 3>;
            compatible = "arm,cortex-a9";
            device_type = "cpu";
            interrupt-handle = <&ps7_scugic_0>;
            operating-points = <666667 1000000 333334 1000000 222223 1000000>;
        } ;
        ps7_cortexa9_1: cpu@1 {
            bus-handle = <&ps7_axi_interconnect_0>;
            clock-latency = <1000>;
            clocks = <&clkc 3>;
            compatible = "arm,cortex-a9";
            device_type = "cpu";
            interrupt-handle = <&ps7_scugic_0>;
            operating-points = <666667 1000000 333334 1000000 222223 1000000>;
        } ;
    } ;
    ps7_axi_interconnect_0: amba@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "xlnx,ps7-axi-interconnect-1.00.a", "simple-bus";
        ranges ;
        ps7_ethernet_0: ps7-ethernet@e000b000 {
            #address-cells = <1>;
            #size-cells = <0>;
            clock-names = "ref_clk", "aper_clk";
            clocks = <&clkc 13>, <&clkc 30>;
            compatible = "xlnx,ps7-ethernet-1.00.a";
            interrupt-parent = <&ps7_scugic_0>;
            interrupts = <0 22 4>;
            local-mac-address = [00 0a 35 00 00 00];
            phy-handle = <&phy0>;
                        phy-mode = "gmii";
            reg = <0xe000b000 0x1000>;
            xlnx,ptp-enet-clock = <0x69f6bcb>;
            xlnx,enet-reset = "";
            xlnx,eth-mode = <0x0>;
            xlnx,has-mdio = <0x1>;
            mdio_0: mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                phy0: phy@0 {
                    compatible = "marvell,dsa";
                    device_type = "ethernet_phy";
                                        reg = <0x6>;
                } ;
            } ;

        } ;
    } ;
        dsa@0 {
                compatible = "marvell,dsa";
            #address-cells = <2>;
        #size-cells = <0>;
                interrupts = <10>;
                dsa,ethernet = <&ps7_ethernet_0>;
                dsa,mii-bus = <&mdio_0>;

                switch@0 {
                         #address-cells = <1>;
                         #size-cells = <0>;
                         reg = <0 0>; /* MDIO address 0, switch 0 in tree */
             port@3 {
                    reg = <3>;
                label = "lan0";
             };
             port@4 {
                    reg = <4>;
                    label = "lan1";
             };
             port@5 {
                    reg = <5>;
                    label = "lan2";
             };
             port@6 {
                    reg = <6>;
                    label = "cpu";
                         };
        };
        };
} ;




e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
REGISTERING platform driver xilinx_emaclite
REGISTERING platform driver xemacps
bus: 'platform': really_probe: probing driver xemacps with device e000b000.ps7-ethernet
xemacps_probe()
xemacps e000b000.ps7-ethernet: BASEADDRESS hw: e000b000 virt: 8086c000
xemacps_mii_init
mdiobus_register
libphy: XEMACPS mii bus: probed
xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
drv->probe(dev)
REGISTERING platform driver xilinx_axienet
REGISTERING platform driver uio_pdrv_genirq
REGISTERING platform driver xilinx-axipmon
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
REGISTERING platform driver cdns-i2c
bus: 'platform': really_probe: probing driver cdns-i2c with device e0004000.ps7-i2c
cdns-i2c e0004000.ps7-i2c: 400 kHz mmio e0004000 irq 57
drv->probe(dev)
bus: 'platform': really_probe: probing driver cdns-i2c with device e0005000.ps7-i2c
cdns-i2c e0005000.ps7-i2c: 400 kHz mmio e0005000 irq 80
drv->probe(dev)
REGISTERING platform driver xilinx-axi-video
REGISTERING platform driver xilinx-cfa
REGISTERING platform driver xilinx-cresample
REGISTERING platform driver xilinx-rgb2yuv
REGISTERING platform driver xilinx-scaler
REGISTERING platform driver xilinx-axi-remapper
REGISTERING platform driver xilinx-axi-switch
REGISTERING platform driver xilinx-axi-tpg
REGISTERING platform driver xilinx-axi-vtc
REGISTERING platform driver vexpress-reset
REGISTERING platform driver cdns-wdt
REGISTERING platform driver Xilinx Watchdog
REGISTERING platform driver zynq-edac
bus: 'platform': really_probe: probing driver zynq-edac with device f8006000.ps7-ddrc
zynq-edac f8006000.ps7-ddrc: ecc not enabled
drv->probe(dev)
REGISTERING platform driver cpufreq-cpu0
bus: 'platform': really_probe: probing driver cpufreq-cpu0 with device cpufreq-cpu0.0
cpufreq_cpu0: failed to find cpu0 node
drv->probe(dev)
cpufreq-cpu0: probe of cpufreq-cpu0.0 failed with error -2
REGISTERING platform driver cpuidle-zynq
bus: 'platform': really_probe: probing driver cpuidle-zynq with device cpuidle-zynq.0
Xilinx Zynq CpuIdle Driver started
drv->probe(dev)
REGISTERING platform driver leds-gpio
ledtrig-cpu: registered to indicate activity on CPUs
REGISTERING platform driver pl353-smc
REGISTERING platform driver xadc
bus: 'platform': really_probe: probing driver xadc with device f8007100.ps7-xadc
drv->probe(dev)
TCP: cubic registered
NET: Registered protocol family 17
REGISTERING platform driver dsa
bus: 'platform': really_probe: probing driver dsa with device dsa@0
Distributed Switch Architecture driver version 0.1
bus_find_device(): Init klist with bus->name platform
mv88e6131_probe
eth0[0]: detected a Marvell 88E6131 switch
mdiobus_register
libphy: dsa slave smi: probed
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
bus_find_device(): Init klist with bus->name platform
Registering SWP/SWPB emulation handler
bus_find_device(): Init klist with bus->name pci
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
xemacps e000b000.ps7-ethernet: open
xemacps e000b000.ps7-ethernet: RX ring 2048 bytes at 0x3f041000 mapped 7f041000
xemacps e000b000.ps7-ethernet: TX ring 2048 bytes at 0x3f042000 mapped 7f042000
xemacps e000b000.ps7-ethernet: lp->tx_bd 7f042000 lp->tx_bd_dma 3f042000 lp->tx_skb 7e230000
xemacps e000b000.ps7-ethernet: lp->rx_bd 7f041000 lp->rx_bd_dma 3f041000 lp->rx_skb 7e21e000
xemacps e000b000.ps7-ethernet: MAC 0x00350a00, 0x00002201, 00:0a:35:00:01:22
xemacps_mii_probe()
of_phy_connect(): dev->name: eth0, phy_np->name: phy
of_phy_find_device: device_node phy
bus_find_device(): Init klist with bus->name mdio_bus
xemacps e000b000.ps7-ethernet: eth0: no PHY found
xemacps e000b000.ps7-ethernet: XEMACPS mii bus mii_probe fail.
IP-Config: Failed to open eth0
IP-Config: Failed to open lan0
IP-Config: Failed to open lan1
IP-Config: Failed to open lan2
IP-Config: No network devices available
RAMDISK: gzip image found at block 0
EXT2-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 200K (40599000 - 405cb000)
Starting rcS...
++ Mounting filesystem
++ mount QSPI flash
mknod: /dev/xdevcfg: File exists
insmod: can't read '/mnt/flash/pl-reghandler.ko': No such file or directory
xemacps e000b000.ps7-ethernet: open
++ Set ip addr 192.168.11.10
xemacps e000b000.ps7-ethernet: RX ring 2048 bytes at 0x3f041000 mapped 7f041000
xemacps e000b000.ps7-ethernet: TX ring 2048 bytes at 0x3f042000 mapped 7f042000
xemacps e000b000.ps7-ethernet: lp->tx_bd 7f042000 lp->tx_bd_dma 3f042000 lp->tx_skb 7e21e000
xemacps e000b000.ps7-ethernet: lp->rx_bd 7f041000 lp->rx_bd_dma 3f041000 lp->rx_skb 7e220000
xemacps e000b000.ps7-ethernet: MAC 0x00350a00, 0x00002201, 00:0a:35:00:01:22
xemacps_mii_probe()
of_phy_connect(): dev->name: eth0, phy_np->name: phy
of_phy_find_device: device_node phy
bus_find_device(): Init klist with bus->name mdio_bus
Couldn't find phy device
xemacps e000b000.ps7-ethernet: eth0: no PHY found
xemacps e000b000.ps7-ethernet: XEMACPS mii bus mii_probe fail.
ifconfig: SIOCSIFFLAGS: No such device or address
eth0      Link encap:Ethernet  HWaddr 00:0A:35:00:01:22  
          inet addr:192.168.11.10  Bcast:192.168.11.255  Mask:255.255.255.0
          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)
          Interrupt:54 Base address:0xb000

 

0 Kudos
Newbie simon_jupp
Newbie
13,226 Views
Registered: ‎05-07-2015

Re: Zynq and Marvell DSA integration

Was there any further progress on this? It looks like there is some new code being developed in a branch of the linux kernel to address this: https://lwn.net/Articles/643149/. Is there any other workaround to allow the ps7 ethernet to talk to the dsa device and its PHYs through the ps7 ethernet's MDIO?

0 Kudos
Visitor ieronim-00
Visitor
12,834 Views
Registered: ‎06-24-2015

Re: Zynq and Marvell DSA integration

Hello,

 

there is a very little progress on this.. I have discovered that the part of the problem was in the device tree. The port number 6 of the switch has SMI address 0x16 (port offset is 0x10) and connected directly to the processor, without any PHYs.

 

If I specify a PHY in the DTS like shown below, the DSA driver works until it tries to talk to the PHY, which is not there. Can someone suggest a device tree configuration for the PHY-less connection between Zynq and DSA switch?

 

Any other hints and comments are very welcome as well!

 

|——————————————|               |——————————————————————————————|

|     e000b000—|———— SGMII ————|—port6 (0x16)      port3 —— PHY3

| Zynq         |               |        mv88e6321             |

|     e000c000 |               | port5             port4 —— PHY4

|——————————————|               |——————————————————————————————|

 

 

our DTS and dmeg with some debug prints:

 

 

 

ps7_ethernet_0: ps7-ethernet@e000b000 {
            #address-cells = <1>;
            #size-cells = <0>;
            clock-names = "ref_clk", "aper_clk";
            clocks = <&clkc 13>, <&clkc 30>;
            compatible = "xlnx,ps7-ethernet-1.00.a";
            interrupt-parent = <&ps7_scugic_0>;
            interrupts = <0 22 4>;
            local-mac-address = [00 0a 35 00 00 00];
            phy-handle = <&phy0>;
            phy-mode = "gmii";
            reg = <0xe000b000 0x1000>;
            xlnx,ptp-enet-clock = <0x69f6bcb>;
            xlnx,enet-reset = "";
            xlnx,eth-mode = <0x0>;
            xlnx,has-mdio = <0x1>;
            mdio_0: mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                phy0: phy@16 {
                    compatiable = "marvell,dsa";
                    reg = <0x16>;
                } ;
            } ;

} ;

    dsa@0 {
            compatible = "marvell,dsa";

            #address-cells = <2>;
            #size-cells = <0>;

            interrupts = <10>;

            dsa,ethernet = <&ps7_ethernet_0>;
            dsa,mii-bus = <&mdio_0>;

            switch@0 {
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0 0>;
             port@3 {
                    reg = <3>;
                    label = "lan0";                
             };
             port@4 {
                    reg = <4>;
                    label = "lan1";
             };
             port@5 {
                    reg = <5>;
                    label = "lan2";
             };
             port@6 {
                    reg = <6>;
                    label = "cpu";       
             };
        };
        };     
} ;

 

 

Distributed Switch Architecture driver version 0.1
mv88e6321_probe(): mii_bus->name = XEMACPS mii bus; mii_bus->id = e000b000
eth0[0]: detected a Marvell 88E6321 switch
mv88e6xxx_ppu_state_init()
mv88e6321_setup_port 10
mv88e6321_setup_port 11
mv88e6321_setup_port 12
mv88e6321_setup_port 13
mv88e6321_setup_port 14
mv88e6321_setup_port 15
mv88e6321_setup_port 16
mv88e6321_setup(): seems to be ok...
mv88e6xxx_ppu_disable()
libphy: dsa slave smi: probed
dsa_probe() result:
 ds->index = 0
 ds->dst->cpu_switch = 0
 ds->dst->cpu_port = 6
 ds->pd->mii_bus->init_name = (null)
 ds->pd->mii_bus->kobj->name = e000b000
 ds->pd->mii_bus->sw_addr = 0
 ds->pd->port_names[]:
 [0] = (null)
 [1] = (null)
 [2] = (null)
 [3] = lan0
 [4] = lan1
 [5] = lan2
 [6] = cpu
 [7] = (null)
 ds->dsa_port_mask = 0
 ds->phys_port_mask = 38
 ds->slave_mii_bus->name = dsa slave smi
 ds->master_mii_bus->name = XEMACPS mii bus
mv88e6xxx_ppu_reenable_work()
mv88e6xxx_ppu_enable()
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
xemacps_mii_probe()
GEM: phydev 7db43400, phydev->phy_id 0xff003102, phydev->addr 0x16
phy_addr 0x16, phy_id 0xff003102
attach [Generic PHY] phy driver
Sending DHCP and RARP requests .
dsa dsa@0 lan1: link up, 1000 Mb/s, full duplex, flow control disabled
dsa dsa@0 lan2: link up, 1000 Mb/s, full duplex, flow control disabled
xemacps e000b000.ps7-ethernet: Set clk to 0 Hz
xemacps e000b000.ps7-ethernet: link up (10/HALF)
..... timed out!
IP-Config: Auto-configuration of network failed
dsa dsa@0 lan1: link down
dsa dsa@0 lan2: link down

0 Kudos
Visitor ieronim-00
Visitor
12,804 Views
Registered: ‎06-24-2015

Re: Zynq and Marvell DSA integration

I have gotten some comments regarding the device tree, suggesting to use fixed-link property. Does anyone have any example or hints on that? It's not so much info on the internet about it.

0 Kudos
Visitor daniel_shieh
Visitor
9,970 Views
Registered: ‎03-30-2016

Re: Zynq and Marvell DSA integration

Have you solved this problem? I got the same problems with you. 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. 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.

dts:

&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 <giometti@linux.it>
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>
zynq>
zynq>
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)
Interrupt:60

eth0 Link encap:Ethernet HWaddr 00:0A:35:00:01:22
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)
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 192.168.1.101 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
zynq>

 

BTW,where did you got the DSA driver? I can't see anything like this in xilinx's github source code.

 

 

 

0 Kudos
Highlighted
Visitor daniel_shieh
Visitor
9,968 Views
Registered: ‎03-30-2016

Re: Zynq and Marvell DSA integration

Have you solved this problem? I got the same problems with you. 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. 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.

dts:

&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 <giometti@linux.it>
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>
zynq>
zynq>
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)
Interrupt:60

eth0 Link encap:Ethernet HWaddr 00:0A:35:00:01:22
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)
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 192.168.1.101 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
zynq>

 

BTW,where did you got the DSA driver? I can't see anything like this in xilinx's github source code.

 

 

Tags (2)
0 Kudos
Visitor -roger-
Visitor
9,952 Views
Registered: ‎12-05-2013

Re: Zynq and Marvell DSA integration

Hi,

 

The DSA driver is available in the Xilinx linux kernel at drivers/net/dsa/. Anyway we didn't manage to solve the problem but instead used a generic phy driver and modified the Xilinx emacps driver at drivers/net/ethernet/xilinx/xilinx_emacps.c to handle the different addressing to the PHY registers that the switch has compared to a regular PHY. An ugly solution but it managed us to bring up the communication and continue developing. We created functions to write PHY registers and also the switch registers that we wanted to control. So unfortunately I don't have a solution to use the DSA driver.

 

Regards,

Roger

0 Kudos
Visitor daniel_shieh
Visitor
9,945 Views
Registered: ‎03-30-2016

Re: Zynq and Marvell DSA integration

I'm using this driver file xilinx_emacps.c too. Could you post this file content for me to learn? I tried some times ,but it did not work! So I don't know how to modify this driver. If you can not post that file,could you tell me what kind of function do you change? Thanks you very much for your quick response!!!

Best regards.

0 Kudos
Participant idogan
Participant
4,158 Views
Registered: ‎03-09-2016

Re: Zynq and Marvell DSA integration

hi,

 

have you solved your problem?

We have also similar issue about using marvell ethernet switch 88e6352. However, our situation is worse than you since petalinux could not find ethernet switches. We have two ethernet switches conected to gem0 and gem1. Gem0 connection with Port5 of the switch is RGMII via MIO. Gem1 connection with Port5 of the switch is also RGMII via EMIO., therefore gmi2rgmii ip core is used. And, their SMI buses (MDIO and MDC) are separate. Their address is set via ADDR[4:1] resistors, they are arranged to 2 and 4 addresses.  Those switches have single-chip and multi-chip addressing modes. Which addressing mode do you use for your switches??

 

We have tried to use some modifications on device tree posted on this thread but everytime petalinux boot we see those about them;

gem0 has invalid PHY address, and then

make scanning through 0x00 to 0x1F,

then eth0: no PHY found..

 

gem0 has invalid PHY address, and then

make scanning through 0x00 to 0x1F,

then it says that Generic Phy is attached...

 

Therefore, we are not sure our device tree configuration is correct or not. Our petalinux version is v2015.2.1. Could you share proper device tree configuration for pcw, system-top and etc.. if you have solved your problem??

thanks for your all help..

Best Regards,

0 Kudos