Sorry, you need to enable JavaScript to visit this website.

Ethernet adapter configuration for Zynq-MMP with Petalinux 2017.1

Unsolved
4 posts / 0 new
GreatGehar's picture
GreatGehar
Junior(0)
Ethernet adapter configuration for Zynq-MMP with Petalinux 2017.1

I need add ethernet adapter configuration to device-tree for Zynq-MMP with Petalinux 2017.1. I am get it from BSP v2015.1.2 and add system-top.dts:

/dts-v1/;
/include/ "system-conf.dtsi"
/ {
};

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

ps7_ethernet_0_mdio: mdio {
status = "disabled";
};

phy0: phy@7 {
compatible = "marvell,88e1518";
device_type = "ethernet-phy";
reg = <0x7>;
marvell,reg-init = <3 16 0xff00 0x1e 3 17 0xfff0 0x00>;
};
};
The new petalinux build output kernel panic:

Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.9.0-xilinx-v2017.1 #1
Hardware name: Xilinx Zynq Platform
task: ef04f640 task.stack: ef050000
PC is at mdiobus_free.part.2+0x0/0x4
LR is at mdiobus_unregister+0x14/0x60
pc : [<c04eb064>] lr : [<c03f1850>] psr: 80000013
sp : ef051e10 ip : 00000000 fp : ef7f3258
r10: ef7f35ac r9 : ef227500 r8 : ef0f0410
r7 : ffffffed r6 : ef7f3258 r5 : 00000000 r4 : ef227000
r3 : 00000001 r2 : 00000000 r1 : 20000013 r0 : ee887c00
Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 0000404a DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xef050210)
Stack: (0xef051e10 to 0xef052000)
1e00: ef227000 00000000 ef7f3258 ffffffed
1e20: ef0f0410 c03fb3e8 ffffffff 00000004 00000000 c0220a90 ee8827d0 ef7f3694
1e40: c03fa66c 00000002 00000001 00000001 ee97a700 ee97a680 ee97a600 00000000
1e60: 00000001 00000001 c093b244 c03fac5c ef0f0410 c0a1f128 c0a1f128 00000000
1e80: c093b244 c093183c 00000000 c039ce68 ef0f0410 c0a5cd08 00000000 c039b904
1ea0: ef0f0410 ef0f0444 c0a1f128 c0a19fa0 c0a32840 c039ba44 00000000 c0a1f128
1ec0: c039b9c8 c039a174 ef08ff5c ef0e3034 c0a1f128 ef224a80 00000000 c039b064
1ee0: c0802f54 c0802f55 00000000 c0a1f128 c091cef0 00000000 000000c1 c039c160
1f00: ffffe000 c091cef0 00000000 c0101858 c0a3c3f0 cccccccd c0a32840 c0219064
1f20: c07d6000 ef039e00 efffcdd6 00000000 000000c1 c0132970 c086ab34 000000c1
1f40: 00000006 00000006 c086ba48 c086ba48 c0a0b5a4 00000007 c0a32840 c0931830
1f60: 00000007 c0a32840 c0931834 c0a32840 c093b244 c0900da4 00000006 00000006
1f80: 00000000 c09005a0 00000000 c0601764 00000000 00000000 00000000 00000000
1fa0: 00000000 c060176c 00000000 c0106d18 00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5f418281 91b55583
[<c04eb064>] (mdiobus_free.part.2) from [<c03f1850>] (mdiobus_unregister+0x14/0x60)
[<c03f1850>] (mdiobus_unregister) from [<c03fb3e8>] (macb_probe+0x78c/0x9fc)
[<c03fb3e8>] (macb_probe) from [<c039ce68>] (platform_drv_probe+0x50/0x9c)
[<c039ce68>] (platform_drv_probe) from [<c039b904>] (driver_probe_device+0x1b0/0x274)
[<c039b904>] (driver_probe_device) from [<c039ba44>] (__driver_attach+0x7c/0xa8)
[<c039ba44>] (__driver_attach) from [<c039a174>] (bus_for_each_dev+0x7c/0x8c)
[<c039a174>] (bus_for_each_dev) from [<c039b064>] (bus_add_driver+0x16c/0x1dc)
[<c039b064>] (bus_add_driver) from [<c039c160>] (driver_register+0xa0/0xe0)
[<c039c160>] (driver_register) from [<c0101858>] (do_one_initcall+0x100/0x120)
[<c0101858>] (do_one_initcall) from [<c0900da4>] (kernel_init_freeable+0x190/0x1d8)
[<c0900da4>] (kernel_init_freeable) from [<c060176c>] (kernel_init+0x8/0x10c)
[<c060176c>] (kernel_init) from [<c0106d18>] (ret_from_fork+0x14/0x3c)
Code: e1a00004 e8bd4010 eaf37380 e7f001f2 (e7f001f2)
---[ end trace 2a716bae62115562 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 4.9.0-xilinx-v2017.1 #1
Hardware name: Xilinx Zynq Platform
[<c010e244>] (unwind_backtrace) from [<c010a4a4>] (show_stack+0x10/0x14)
[<c010a4a4>] (show_stack) from [<c02dc2b0>] (dump_stack+0x80/0x9c)
[<c02dc2b0>] (dump_stack) from [<c010c9f8>] (ipi_cpu_stop+0x3c/0x70)
[<c010c9f8>] (ipi_cpu_stop) from [<c010d210>] (handle_IPI+0x64/0x84)
[<c010d210>] (handle_IPI) from [<c0101420>] (gic_handle_irq+0x78/0x94)
[<c0101420>] (gic_handle_irq) from [<c010ae8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0a01f60 to 0xc0a01fa8)
1f60: 00000001 00000000 00000000 c0116220 00000000 00000000 c0a01fb8 c0a00000
1f80: c0a0302c 00000001 c0a0307c 00000000 2ee95000 c0a01fb0 c0107718 c0107708
1fa0: 60000113 ffffffff
[<c010ae8c>] (__irq_svc) from [<c0107708>] (arch_cpu_idle+0x1c/0x38)
[<c0107708>] (arch_cpu_idle) from [<c014c7bc>] (cpu_startup_entry+0x104/0x19c)
[<c014c7bc>] (cpu_startup_entry) from [<c0900bb4>] (start_kernel+0x2f8/0x358)
[<c0900bb4>] (start_kernel) from [<0000807c>] (0x807c)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
Previous Petalinux version loads without any problems (up to v2016.2) and all work..
What right device tree configuration for petalinux 2017.1.

zedhed's picture
zedhed
Moderator(22)
RE: Ethernet adapter configuration for Zynq-MMP with Petalinux 2

Hi GreatGehar,

Are you able to boot your PetaLinux 2017.1 configuration okay without adding the ethernet adapter configuration to device-tree?

Best Regards,

-Kevin

GreatGehar's picture
GreatGehar
Junior(0)
Hello, Kevin.

Hello, Kevin.
Yes, of course. System boot without adding the ethernet adapter (gem0) configuration to device-tree. Also, system boot with gem0 configuration, but without ps7_ethernet_0_mdio section:
/dts-v1/;
/include/ "system-conf.dtsi"
/ {
};
&gem0 {
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
phy0: phy@7 {
compatible = "marvell,88e1518";
device_type = "ethernet-phy";
reg = <0x7>;
marvell,reg-init = <3 16 0xff00 0x1e 3 17 0xfff0 0x00>;
};
};
- with like system-top.dts system boot successfully, but without eth0.

GreatGehar's picture
GreatGehar
Junior(0)
RE: Ethernet adapter configuration for Zynq-MMP with Petalinux 2

I found my old petalinux v2016.2 project for MMP. It has not any configuration for ethernet and network work properly! Simple create new petalinux project, export hardware specification and load MMP! But for Petalinux 2017.1 this is not work.
What's the problem?
Anybody tried run petalinux 2017.1 on the board?