cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
3,283 Views
Registered: ‎05-03-2012

14.5 TRD: ETH0 (with Vitesse PHY) not working

ETH0 not working with 14.5 TRD

Hi,

we've a custom board using as PHY the 'Vitesse 8211' and we problems to run eth0 with 14.5 TRD.

 Here the linux boot with additional debug messages.

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 3.8.0-xilinx-trd (user@ubuntu) (gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-79) ) #42 SMP PREEMPT Thu Oct 17 14:22:38 CEST 2013
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZC702
bootconsole [earlycon0] enabled
cma: CMA: reserved 16 MiB at 11c00000
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 7 pages/cpu @c08a8000 s7616 r8192 d12864 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 76200
Kernel command line: console=tty0 console=ttyPS0,115200 root=/dev/ram rw ip=192.168.1.1:::255.255.255.0::eth0 earlyprintk mem=300M memmap=64M$0x1C000000
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)
__ex_table already sorted, skipping sort
Memory: 300MB = 300MB total
Memory: 263072k/263072k available, 44128k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xd3000000 - 0xff000000   ( 704 MB)
    lowmem  : 0xc0000000 - 0xd2c00000   ( 300 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc05b666c   (5818 kB)
      .init : 0xc05b7000 - 0xc05e1dc0   ( 172 kB)
      .data : 0xc05e2000 - 0xc061e8e0   ( 243 kB)
       .bss : 0xc061e8e0 - 0xc0649658   ( 172 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.
NR_IRQS:16 nr_irqs:16 16
xslcr mapped to d3002000
Zynq clock init
timer #0 at d3004000, irq=43
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
console [tty0] enabled
Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x418620 - 0x418654
L310 cache controller enabled
l2x0: 8 ways, CACHE_ID 0x000000c0, AUX_CTRL 0x72360000, Cache size: 524288 B
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (2664.03 BogoMIPS).
devtmpfs: initialized
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
xgpiops e000a000.gpio: gpio at 0xe000a000 mapped to 0xd300c000
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
PHY: phy_init()
PHY: phy_driver_register()
PHY: phy_init(); rc=0
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
Switching to clocksource xttcps_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 3, 32768 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: 18340K
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 581
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
xuartps e0001000.uart: failed to get alias id, errno -19
e00ðconsole [ttyPS0] enabled, bootconsole disabled
console [ttyPS0] enabled, bootconsole disabled
xdevcfg f8007000.devcfg: ioremap f8007000 to d3060000 with size 100
brd: module loaded
loop: module loaded
PHY: phy_driver_register()
PHY: phy_driver_register()
...
PHY: phy_driver_register()
PHY: phy_driver_register()
###Vitesse: vsc82xx_init()
PHY: phy_driver_register()
e1000e: Intel(R) PRO/1000 Network Driver - 2.1.4-k
e1000e: Copyright(c) 1999 - 2012 Intel Corporation.
Solarflare NET driver v3.2
xemacps e000b000.eth: ###HB board-type=BOARD_TYPE_ZYNQ
libphy: XEMACPS mii bus: probed
PHY: get_phy_device()
PHY: get_phy_id(): addr=0x0,phy_id=0x0,is_c45=0
PHY: get_phy_id(): will call mdiobus_read(bus, addr, MII_PHYSID1)
PHY: get_phy_id(): phy_reg=0xf
PHY: get_phy_id(); phy_id=0xf0000, will call mdiobus_read(bus, addr, MII_PHYSID2)
PHY: get_phy_id() END; phy_reg=0xc4b1
PHY: get_phy_device(), phy_id=0xfc4b1
PHY: get_phy_device(); will call phy_device_create()
PHY: phy_device_create()
PHY: phy_device_create(); addr=0
PHY: phy_device_create(); dev_set_name called
PHY: phy_device_create(); dev=0xc4e18000
PHY: get_phy_device(); dev=0xc4e18000
PHY: phy_probe(); err=0
xemacps e000b000.eth: ###HB DRIVER_NAME=xemacps
xemacps e000b000.eth: pdev->id -1, baseaddr 0xe000b000, irq 54
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
I2O subsystem v1.325
i2o: max drivers = 8
i2c /dev entries driver
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
Registering SWP/SWPB emulation handler
xylonfb video mode: 1280x720M-16@60
Console: switching to colour frame buffer device 160x45
xylonfb 0 registered
xylonfb 1 registered
PHY: phy_connect_direct()
PHY: phy_attach_direct()
PHY: phy_init_hw()
###Vitesse: vsc8221_config_init()
phy_write(): regnum=0x1c, val=0x4
mdio_bus.c | mdiobus_write(), addr=0x0, regnum=0x1c, val=0x4, val=4,val=4
mdio_bus.c | mdiobus_write(), state = 2
mdio_bus.c | mdiobus_write(), will write :bus->write
xilinx_emacps.c | xemacps_mdio_write()
xilinx_emacps.c | xemacps_mdio_write(): will call xemacps_write(), baseaddr=0xd3062000, regval=0x50720004
xilinx_emacps.c | xemacps_mdio_write(): xemacps_write() called, wait for end of transfer

 Here the output stops.


This is the function where it stucks...

static int xemacps_mdio_write(struct mii_bus *bus, int mii_id, int phyreg,
	u16 value)
{
	struct net_local *lp = bus->priv;
	u32 regval;
	volatile u32 ipisr;
	printk("xilinx_emacps.c | xemacps_mdio_write()\n");
	regval  = XEMACPS_PHYMNTNC_OP_MASK;
	regval |= XEMACPS_PHYMNTNC_OP_W_MASK;
	regval |= (mii_id << XEMACPS_PHYMNTNC_PHYAD_SHIFT_MASK);
	regval |= (phyreg << XEMACPS_PHYMNTNC_PHREG_SHIFT_MASK);
	regval |= value;

	printk("xilinx_emacps.c | xemacps_mdio_write(): will call xemacps_write(), baseaddr=0x%x, regval=0x%x\n",lp->baseaddr,regval);

	xemacps_write(lp->baseaddr, XEMACPS_PHYMNTNC_OFFSET, regval);
	printk("xilinx_emacps.c | xemacps_mdio_write(): xemacps_write() called, wait for end of transfer\n");

	/* wait for end of transfer */
	do {
		cpu_relax();
		ipisr = xemacps_read(lp->baseaddr, XEMACPS_NWSR_OFFSET);
	} while ((ipisr & XEMACPS_NWSR_MDIOIDLE_MASK) == 0);
	printk("xilinx_emacps.c | xemacps_mdio_write(): end of function\n");

	return 0;
}

 

The Devicetree Configuration looks as follows:
...

...
		eth@e000b000 {
			compatible = "xlnx,ps7-ethernet-1.00.a";
			reg = <0xe000b000 0x1000>;
			interrupts = <0 22 4>;
			interrupt-parent = <&gic>;
			phy-handle = <&phy0>;
			phy-mode = "rgmii-id";
			xlnx,ptp-enet-clock = <111111111>;
			xlnx,slcr-div0-1000Mbps = <8>;
			xlnx,slcr-div0-100Mbps = <8>;
			xlnx,slcr-div0-10Mbps = <8>;
			xlnx,slcr-div1-1000Mbps = <1>;
			xlnx,slcr-div1-100Mbps = <5>;
			xlnx,slcr-div1-10Mbps = <50>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			mdio {
				#address-cells = <1>;
				#size-cells = <0>;
				phy0: phy@0 {
					compatible = "vitesse,vsc8211";
					device_type = "ethernet-phy";
					reg = <0>;
				};
			};
		};
		...

 


...

What can I do? With 14.4 we had no problems.

Thanks for your help!

 

Best regards,
Helmut

 

 

Tags (4)
0 Kudos
1 Reply
Highlighted
Adventurer
Adventurer
3,255 Views
Registered: ‎05-03-2012

Hopefully 14.6 TRD will fix this issue.

Does anybody know if there will be a release soon?

 

H.

0 Kudos