netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: DTS for our Configuration
       [not found] <48F7D4389F30BA4383F214EE802BA47101706555D3@EXS10.iai.co.il>
@ 2018-03-22  9:55 ` Alayev Michael
  2018-03-22 13:55   ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Alayev Michael @ 2018-03-22  9:55 UTC (permalink / raw)
  To: 'andrew@lunn.ch'
  Cc: Efter Yoram, Dror Alon, 'netdev@vger.kernel.org', Margalit Ofer

Hi Andrew,

>I think this is a problem with the macb driver. To me, it looks like you are going to have to >make some changes to the driver to make this work. Normally the MDIO bus children are >placed within a container node, often called 'mdio-bus' or simply 'mdio'. See for example >Documentation/devicetree/bindings/net/fsl-fec.txt.ן¿½ The macb driver does not do this. It >passed the main DT node of the device to of_mdiobus_register(). It then walks all the >children assuming they devices on the MDIO bus. But the first child it finds is the 'fixed-link'. >This is not supposed to be a child of the bus, which is why it goes wrong.

As you understand, I prefer not to change the driver. 
Is there a way for me to bypass this issue?
Can I use other property than 'fixed-link'?

>Please include the full panic details. The stack trace can be very useful.
Please, see below:

You also asked for the linux log of your suggested dts:
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
mdio_bus e000b000.ethernet-ffffffff: /amba/ethernet@e000b000/fixed-link has invalid PHY address
mv88e6085 e000b000.ethernet-ffffffff:1d: switch 0xa10 detected: Marvell 88E6390X, revision 1
libphy: mv88e6xxx SMI: probed
mv88e6085 e000b000.ethernet-ffffffff:1c: switch 0xa10 detected: Marvell 88E6390X, revision 1
libphy: mv88e6xxx SMI: probed
mv88e6085: probe of e000b000.ethernet-ffffffff:1c failed with error -16
mdio_bus e000b000.ethernet-ffffffff: scan phy fixed-link at address 1
Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = c0004000
[00000004] *pgd=00000000
Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx #15
Hardware name: Xilinx Zynq Platform
task: df43b840 task.stack: df43c000
PC is at dsa_unregister_switch+0x10/0x48
LR is at dsa_unregister_switch+0x10/0x48
pc : [<c05aad48>]ן¿½ן¿½ן¿½ lr : [<c05aad48>]ן¿½ן¿½ן¿½ psr: 60000013
sp : df43dd58ן¿½ ip : 00000000ן¿½ fp : 00000000
r10: 00000000ן¿½ r9 : dd009c78ן¿½ r8 : 00000034
r7 : dd0d1434ן¿½ r6 : c091dd68ן¿½ r5 : 00000000ן¿½ r4 : dd0d1210
r3 : df43b840ן¿½ r2 : 00000000ן¿½ r1 : 00000000ן¿½ r0 : c0936cdc
Flags: nZCvן¿½ IRQs onן¿½ FIQs onן¿½ Mode SVC_32ן¿½ ISA ARMן¿½ Segment none
Control: 18c5387dן¿½ Table: 1f65c04aן¿½ DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xdf43c210)
Stack: (0xdf43dd58 to 0xdf43e000)
dd40:ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ dd0d1210 00000000
dd60: c091dd68 c0418ac0 dd0d1400 00000000 c091dd68 c04127ac dd0d1400 c03b72b8
dd80: dd0d1400 df4ff530 c091c448 dd0d1460 dfbeb3c4 c03b6420 dd0d1400 dd0d145c
dda0: dd009c78 c03b3acc dd009e8c a0000013 dd1d2800 dd009e80 dd009e8c dd0d1400
ddc0: dd0d1400 dd009e84 dd009e8c c0412868 dd009c00 c0412624 ffffffed 00000001
dde0: dd009c00 dfbeb67c dfbeb3c4 c04bafac 00000000 c04b378c dfbecb5c 0000001c
de00: c06ffa6d df77f000 df77c000 df77c4c0 dfbeb3c4 df524a10 00000000 c0423104
de20: ffffffff df43de5c 00000001 c0229cd4 dfbeb3c4 c0421054 00000001 00000002
de40: 00000001 00000001 dd1c8898 dd1c9cc0 dd1c9c40 dd1c9bc0 00000000 00000000
de60: 00000001 00000001 c091ddc8 c0422974 df524a10 c091ddc8 00000000 00000000
de80: c091ddc8 00000000 00000000 c03b84d4 df524a10 c09523dc c09523e0 c03b6e84
dea0: df524a10 df524a44 c091ddc8 c0918a28 00000000 c0938000 c083383c c03b7080
dec0: 00000000 c091ddc8 c03b7000 c03b5790 df472f58 df4edb34 c091ddc8 00000000
dee0: dd1c5300 c03b64f8 c06ff8d2 c06ff8d3 00000000 c091ddc8 c081aea4 000000a8
df00: c083be5c c03b7808 00000006 c081aea4 000000a8 c0101900 00000000 df43df24
df20: 00000000 00000000 00000000 c075d548 000000a8 00000006 00000006 00000000
df40: cccccccd 00000000 00000000 c0938000 c083383c 00000006 c0833830 000000a8
df60: 00000006 c0833834 000000a8 c083be5c c0938000 c0800d40 00000006 00000006
df80: 00000000 c0800594 00000000 c05e1e64 00000000 00000000 00000000 00000000
dfa0: 00000000 c05e1e6c 00000000 c0106fd0 00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<c05aad48>] (dsa_unregister_switch) from [<c0418ac0>] (mv88e6xxx_remove+0x1c/0x68)
[<c0418ac0>] (mv88e6xxx_remove) from [<c04127ac>] (mdio_remove+0x18/0x28)
[<c04127ac>] (mdio_remove) from [<c03b72b8>] (device_release_driver_internal+0x128/0x1d0)
[<c03b72b8>] (device_release_driver_internal) from [<c03b6420>] (bus_remove_device+0xcc/0xdc)
[<c03b6420>] (bus_remove_device) from [<c03b3acc>] (device_del+0x1bc/0x258)
[<c03b3acc>] (device_del) from [<c0412868>] (mdio_device_remove+0xc/0x18)
[<c0412868>] (mdio_device_remove) from [<c0412624>] (mdiobus_unregister+0x40/0x74)
[<c0412624>] (mdiobus_unregister) from [<c04bafac>] (of_mdiobus_register+0x234/0x254)
[<c04bafac>] (of_mdiobus_register) from [<c0423104>] (macb_probe+0x790/0xb88)
[<c0423104>] (macb_probe) from [<c03b84d4>] (platform_drv_probe+0x50/0xa0)
[<c03b84d4>] (platform_drv_probe) from [<c03b6e84>] (driver_probe_device+0x13c/0x2b8)
[<c03b6e84>] (driver_probe_device) from [<c03b7080>] (__driver_attach+0x80/0xa4)
[<c03b7080>] (__driver_attach) from [<c03b5790>] (bus_for_each_dev+0x68/0x8c)
[<c03b5790>] (bus_for_each_dev) from [<c03b64f8>] (bus_add_driver+0xc8/0x1dc)
[<c03b64f8>] (bus_add_driver) from [<c03b7808>] (driver_register+0x9c/0xe0)
[<c03b7808>] (driver_register) from [<c0101900>] (do_one_initcall+0xa8/0x11c)
[<c0101900>] (do_one_initcall) from [<c0800d40>] (kernel_init_freeable+0x10c/0x1cc)
[<c0800d40>] (kernel_init_freeable) from [<c05e1e6c>] (kernel_init+0x8/0x10c)
[<c05e1e6c>] (kernel_init) from [<c0106fd0>] (ret_from_fork+0x14/0x24)
Code: e92d4070 e1a05000 e59f0034 eb00ea7e (e5954004)
---[ end trace f6d20ab8f9ad8edb ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Tainted: Gן¿½ן¿½ן¿½ן¿½ן¿½ Dן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ 4.14.0-xilinx #15
Hardware name: Xilinx Zynq Platform
[<c010e7b4>] (unwind_backtrace) from [<c010a9b0>] (show_stack+0x10/0x14)
[<c010a9b0>] (show_stack) from [<c05d1950>] (dump_stack+0x80/0xa0)
[<c05d1950>] (dump_stack) from [<c010cf20>] (ipi_cpu_stop+0x3c/0x70)
[<c010cf20>] (ipi_cpu_stop) from [<c010d720>] (handle_IPI+0x64/0x84)
[<c010d720>] (handle_IPI) from [<c01013f8>] (gic_handle_irq+0x7c/0x98)
[<c01013f8>] (gic_handle_irq) from [<c010b40c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0901f48 to 0xc0901f90)
1f40:ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ 00000001 00000000 00000000 c0116800 00000000 00000000
1f60: c0900000 c08441f8 c0901fa0 c0833a30 00000000 00000000 1f388000 c0901f98
1f80: c01079e0 c01079e4 60000013 ffffffff
[<c010b40c>] (__irq_svc) from [<c01079e4>] (arch_cpu_idle+0x2c/0x38)
[<c01079e4>] (arch_cpu_idle) from [<c01490fc>] (do_idle+0xd0/0x198)
[<c01490fc>] (do_idle) from [<c01492fc>] (cpu_startup_entry+0x18/0x1c)
[<c01492fc>] (cpu_startup_entry) from [<c0800bd4>] (start_kernel+0x308/0x368)
[<c0800bd4>] (start_kernel) from [<0000807c>] (0x807c)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b


BR,
Michael


***********************************************************************************************

Please consider the environment before printing this email !
The information contained in this communication is proprietary to Israel Aerospace Industries Ltd. and/or third parties, may contain confidential or privileged information, and is intended only for the use of the intended addressee thereof.
If you are not the intended addressee, please be aware that any use, disclosure, distribution and/or copying of this communication is strictly prohibited. If you receive this communication in error, please notify the sender immediately and delete it from your computer. 
Thank you.

Visit us at:   www.iai.co.il

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DTS for our Configuration
  2018-03-22  9:55 ` DTS for our Configuration Alayev Michael
@ 2018-03-22 13:55   ` Andrew Lunn
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2018-03-22 13:55 UTC (permalink / raw)
  To: Alayev Michael
  Cc: Efter Yoram, Dror Alon, 'netdev@vger.kernel.org', Margalit Ofer

> As you understand, I prefer not to change the driver. 

Actually, i don't understand why you prefer not to change the driver.

> Is there a way for me to bypass this issue?
> Can I use other property than 'fixed-link'?

My quick look at the driver makes me think you are going to have to
change it. But the changes can be mainlined, if done correctly.

I think it is time you rolled up your sleeves and start really
debugging this yourselves, and make the needed changes.

	  Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DTS for our Configuration
       [not found]         ` <48F7D4389F30BA4383F214EE802BA471017065554B@EXS10.iai.co.il>
@ 2018-03-20 12:38           ` Andrew Lunn
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2018-03-20 12:38 UTC (permalink / raw)
  To: Alayev Michael; +Cc: netdev, Efter Yoram, Dror Alon

On Tue, Mar 20, 2018 at 09:12:18AM +0000, Alayev Michael wrote:
> Hello Andrew,
> 
> Please see my comments below in red with some important highlights.

Hi Michael

Please don't use html encrypted emails. Please use quoting as
everybody else does on this list.

> I added the ethernet parameter referencing to gem0. Still cant detect the internal phys and I get kernel panic:
> mdio_bus e000b000.ethernet-ffffffff: /amba/ethernet@e000b000/fixed-link has invalid PHY address

I think this is a problem with the macb driver. To me, it looks like
you are going to have to make some changes to the driver to make this
work. Normally the MDIO bus children are placed within a container
node, often called 'mdio-bus' or simply 'mdio'. See for example
Documentation/devicetree/bindings/net/fsl-fec.txt.  The macb driver
does not do this. It passed the main DT node of the device to
of_mdiobus_register(). It then walks all the children assuming they
devices on the MDIO bus. But the first child it finds is the
'fixed-link'. This is not supposed to be a child of the bus, which is
why it goes wrong.

> mv88e6085 e000b000.ethernet-ffffffff:1d: switch 0xa10 detected: Marvell 88E6390X, revision 1
> libphy: mv88e6xxx SMI: probed
> mv88e6085 e000b000.ethernet-ffffffff:1c: switch 0xa10 detected: Marvell 88E6390X, revision 1
> libphy: mv88e6xxx SMI: probed
> mv88e6085: probe of e000b000.ethernet-ffffffff:1c failed with error -16
> mdio_bus e000b000.ethernet-ffffffff: scan phy fixed-link at address 1
> Unable to handle kernel NULL pointer dereference at virtual address 00000004
> pgd = c0004000
> [00000004] *pgd=00000000
> Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM

Please include the fill panic details. The stack trace can be very
useful.

	Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DTS for our Configuration
  2018-03-19 16:23     ` Alayev Michael
@ 2018-03-19 16:56       ` Andrew Lunn
       [not found]         ` <48F7D4389F30BA4383F214EE802BA471017065554B@EXS10.iai.co.il>
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2018-03-19 16:56 UTC (permalink / raw)
  To: Alayev Michael; +Cc: netdev, Efter Yoram, Dror Alon

On Mon, Mar 19, 2018 at 04:23:11PM +0000, Alayev Michael wrote:
> Hello Andrew,
> 
> You deserve a big thank you for your solution to our device-tree - the linux bootup log looks a lot better and It made a big progress for us.
> Though we still have some issues...
> 
> 1. Attached are 2 log files that are the result of your suggested dts:
> 	1st is your device-tree as is : results in kernel panic. Its probably caused by the "link" parameter.

The link parameters look correct. It is a pointer to the switches port
in the DSA link.

But i spotted a real problem. See bellow.

> 2. The switch's product number should be 0x0a1 but instead its 0xa10 (is it just a high-low byte thing?)

This is correct. The product number is contains the revision. You have
revision 0.

> 3. The stand-alone phy (gem1) is not detected properly. It should be device id mv88e1510.

> 	switch0: switch@1c: {
> 		compatible = "marvell,mv88e6190";
> 		reg = <0x1c>;
> 
> 		ports {
> 			#address-cells = <1>;
> 			#size-cells = <0>;
> 
> 			port@0 {
> 				reg = <0>;
> 				label = "cpu";
> 				fixed-link {
> 					speed = <1000>;
> 					full-duplex;
> 				};

There is a missing property here:

      	   	   	        ethernet = <&gem0>;


> 			port@1 {
> 				reg = <1>;
> 				label = "lan0";
> 			};
> 			port@2 {
> 				reg = <2>;
> 				label = "lan1";
> 			};
> 			...
> 			switch0port10: port@10 {
> 				reg = <10>;
> 				label = "dsa";
> 				link = <&switch1port10>;
> 				phy-mode = "sgmii";
> 			 	fixed-link {
> 					speed = <1000>;
> 					full-duplex;
> 				};
> 			};
> 		};
> 	};
> 
> 
> gem1: {
>       phy-handle = <phy0>;

and this is missing an &

       phy-handle = <&phy0>;

       Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: DTS for our Configuration
       [not found]   ` <3988EA6F088014488BE41D19253A7EE40152236EE1@EXS10.iai.co.il>
@ 2018-03-19 16:23     ` Alayev Michael
  2018-03-19 16:56       ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Alayev Michael @ 2018-03-19 16:23 UTC (permalink / raw)
  To: 'andrew@lunn.ch'; +Cc: 'netdev, Efter Yoram, Dror Alon

[-- Attachment #1: Type: text/plain, Size: 4052 bytes --]

Hello Andrew,

You deserve a big thank you for your solution to our device-tree - the linux bootup log looks a lot better and It made a big progress for us.
Though we still have some issues...

1. Attached are 2 log files that are the result of your suggested dts:
	1st is your device-tree as is : results in kernel panic. Its probably caused by the "link" parameter.
	2nd is your device tree with gem0 port's10 "link" parameter commented on both switches. It results in good kernel but still the devices are not properly detected. Maybe its related to the 	comment you wrote below about the fixed PHY driver issue that prevents the driver to complete his phy address scan (stops at phy addr 1...).
2. The switch's product number should be 0x0a1 but instead its 0xa10 (is it just a high-low byte thing?)
3. The stand-alone phy (gem1) is not detected properly. It should be device id mv88e1510.

Please advise how to continue from here.

Regards,
Michael Alayev



-----Original Message-----
From: Dror Alon 
Sent: Sunday, March 18, 2018 8:16 AM
To: Alayev Michael
Subject: FW: DTS for our Configuration



-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch]
Sent: Friday, March 16, 2018 5:12 PM
To: Dror Alon
Cc: 'netdev@vger.kernel.org'; Efter Yoram; Alayev Michael
Subject: Re: DTS for our Configuration

On Thu, Mar 15, 2018 at 02:00:00PM +0000, Dror Alon wrote:
> Hello Andrew,
> Thanks for your fast responses.
> Michael and I keep trying to configure our linux Zynq7000 board.
> We can't succeed with configure our SWITCHES via the DTS file.

> Please. See the next diagram, and please Do you have any DTS Sample 
> for this Setup ?

Hi Dror

I'm surprised you are doing SGMII between ports 10. They are 10G capable.

gem0: {
	fixed-link {
		speed = <1000>;
		full-duplex;
	};

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

	switch0: switch@1c: {
		compatible = "marvell,mv88e6190";
		reg = <0x1c>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "cpu";
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			port@1 {
				reg = <1>;
				label = "lan0";
			};
			port@2 {
				reg = <2>;
				label = "lan1";
			};
			...
			switch0port10: port@10 {
				reg = <10>;
				label = "dsa";
				link = <&switch1port10>;
				phy-mode = "sgmii";
			 	fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};

	switch1: switch@1d: {
		compatible = "marvell,mv88e6190";
		reg = <0x1d>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "lan9";
				};
			port@1 {
				reg = <1>;
				label = "lan10";
			};
			port@2 {
				reg = <2>;
				label = "lan11";
			};
			...
			switch1port10: port@10 {
				reg = <10>;
				label = "dsa";
				link = <&switch0port10>;
				phy-mode = "sgmii";
			 	fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};
};

gem1: {
      phy-handle = <phy0>;
};

It looks like you have at last one issue to solve in the macb driver.
If you have a fixed-phy, it does an mdiobus_register. This means it is going to ignore all the other device tree properties. You need it to do an of_mdiobus_register().

   Andrew

Default Profile
***********************************************************************************************

Please consider the environment before printing this email !
The information contained in this communication is proprietary to Israel Aerospace Industries Ltd. and/or third parties, may contain confidential or privileged information, and is intended only for the use of the intended addressee thereof.
If you are not the intended addressee, please be aware that any use, disclosure, distribution and/or copying of this communication is strictly prohibited. If you receive this communication in error, please notify the sender immediately and delete it from your computer. 
Thank you.

Visit us at:   www.iai.co.il

[-- Attachment #2: linux_log_andrew_dts_original.txt --]
[-- Type: text/plain, Size: 12164 bytes --]

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx (84alav@fedora64) (gcc version 5.4.0 (Buildroot 2017.05.1)) #15 SMP PREEMPT Mon Mar 19 12:30:34 IST 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Zynq Zed Development Board
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x1dc00000
percpu: Embedded 16 pages/cpu @dfbc5000 s34764 r8192 d22580 u65536
Built 1 zonelists, mobility grouping on.  Total pages: 130048
Kernel command line:
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: 490488K/524288K available (5120K kernel code, 224K rwdata, 1404K rodata, 1024K init, 150K bss, 17416K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0600000   (6112 kB)
      .init : 0xc0800000 - 0xc0900000   (1024 kB)
      .data : 0xc0900000 - 0xc0938000   ( 224 kB)
       .bss : 0xc0938000 - 0xc095da14   ( 151 kB)
Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
        Tasks RCU enabled.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to e0800000
slcr mapped to e0802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
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 0x76760001
zynq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
console [tty0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
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 0x100000 - 0x100060
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc+0x1c4/0x224 with crng_init=0
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
random: fast init done
DMA: preallocated 256 KiB pool for atomic coherent allocations
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 @ 0xe0840000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 25, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
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
FPGA manager framework
clocksource: 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)
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...
Freeing initrd memory: 3604K
hw perfevents: no interrupt-affinity property for /pmu, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  ?© 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
libphy: Fixed MDIO Bus: probed
CAN device driver interface
mv88e6xxx_init kelev
libphy: MACB_mii_bus: probed
mdio_bus e000b000.ethernet-ffffffff: /amba/ethernet@e000b000/fixed-link has invalid PHY address
mv88e6085 e000b000.ethernet-ffffffff:1d: switch 0xa10 detected: Marvell 88E6390X, revision 1
libphy: mv88e6xxx SMI: probed
mv88e6085 e000b000.ethernet-ffffffff:1c: switch 0xa10 detected: Marvell 88E6390X, revision 1
libphy: mv88e6xxx SMI: probed
mv88e6085: probe of e000b000.ethernet-ffffffff:1c failed with error -16
mdio_bus e000b000.ethernet-ffffffff: scan phy fixed-link at address 1
Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = c0004000
[00000004] *pgd=00000000
Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx #15
Hardware name: Xilinx Zynq Platform
task: df43b840 task.stack: df43c000
PC is at dsa_unregister_switch+0x10/0x48
LR is at dsa_unregister_switch+0x10/0x48
pc : [<c05aad48>]    lr : [<c05aad48>]    psr: 60000013
sp : df43dd58  ip : 00000000  fp : 00000000
r10: 00000000  r9 : dd009c78  r8 : 00000034
r7 : dd0d1434  r6 : c091dd68  r5 : 00000000  r4 : dd0d1210
r3 : df43b840  r2 : 00000000  r1 : 00000000  r0 : c0936cdc
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 1f65c04a  DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xdf43c210)
Stack: (0xdf43dd58 to 0xdf43e000)
dd40:                                                       dd0d1210 00000000
dd60: c091dd68 c0418ac0 dd0d1400 00000000 c091dd68 c04127ac dd0d1400 c03b72b8
dd80: dd0d1400 df4ff530 c091c448 dd0d1460 dfbeb3c4 c03b6420 dd0d1400 dd0d145c
dda0: dd009c78 c03b3acc dd009e8c a0000013 dd1d2800 dd009e80 dd009e8c dd0d1400
ddc0: dd0d1400 dd009e84 dd009e8c c0412868 dd009c00 c0412624 ffffffed 00000001
dde0: dd009c00 dfbeb67c dfbeb3c4 c04bafac 00000000 c04b378c dfbecb5c 0000001c
de00: c06ffa6d df77f000 df77c000 df77c4c0 dfbeb3c4 df524a10 00000000 c0423104
de20: ffffffff df43de5c 00000001 c0229cd4 dfbeb3c4 c0421054 00000001 00000002
de40: 00000001 00000001 dd1c8898 dd1c9cc0 dd1c9c40 dd1c9bc0 00000000 00000000
de60: 00000001 00000001 c091ddc8 c0422974 df524a10 c091ddc8 00000000 00000000
de80: c091ddc8 00000000 00000000 c03b84d4 df524a10 c09523dc c09523e0 c03b6e84
dea0: df524a10 df524a44 c091ddc8 c0918a28 00000000 c0938000 c083383c c03b7080
dec0: 00000000 c091ddc8 c03b7000 c03b5790 df472f58 df4edb34 c091ddc8 00000000
dee0: dd1c5300 c03b64f8 c06ff8d2 c06ff8d3 00000000 c091ddc8 c081aea4 000000a8
df00: c083be5c c03b7808 00000006 c081aea4 000000a8 c0101900 00000000 df43df24
df20: 00000000 00000000 00000000 c075d548 000000a8 00000006 00000006 00000000
df40: cccccccd 00000000 00000000 c0938000 c083383c 00000006 c0833830 000000a8
df60: 00000006 c0833834 000000a8 c083be5c c0938000 c0800d40 00000006 00000006
df80: 00000000 c0800594 00000000 c05e1e64 00000000 00000000 00000000 00000000
dfa0: 00000000 c05e1e6c 00000000 c0106fd0 00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<c05aad48>] (dsa_unregister_switch) from [<c0418ac0>] (mv88e6xxx_remove+0x1c/0x68)
[<c0418ac0>] (mv88e6xxx_remove) from [<c04127ac>] (mdio_remove+0x18/0x28)
[<c04127ac>] (mdio_remove) from [<c03b72b8>] (device_release_driver_internal+0x128/0x1d0)
[<c03b72b8>] (device_release_driver_internal) from [<c03b6420>] (bus_remove_device+0xcc/0xdc)
[<c03b6420>] (bus_remove_device) from [<c03b3acc>] (device_del+0x1bc/0x258)
[<c03b3acc>] (device_del) from [<c0412868>] (mdio_device_remove+0xc/0x18)
[<c0412868>] (mdio_device_remove) from [<c0412624>] (mdiobus_unregister+0x40/0x74)
[<c0412624>] (mdiobus_unregister) from [<c04bafac>] (of_mdiobus_register+0x234/0x254)
[<c04bafac>] (of_mdiobus_register) from [<c0423104>] (macb_probe+0x790/0xb88)
[<c0423104>] (macb_probe) from [<c03b84d4>] (platform_drv_probe+0x50/0xa0)
[<c03b84d4>] (platform_drv_probe) from [<c03b6e84>] (driver_probe_device+0x13c/0x2b8)
[<c03b6e84>] (driver_probe_device) from [<c03b7080>] (__driver_attach+0x80/0xa4)
[<c03b7080>] (__driver_attach) from [<c03b5790>] (bus_for_each_dev+0x68/0x8c)
[<c03b5790>] (bus_for_each_dev) from [<c03b64f8>] (bus_add_driver+0xc8/0x1dc)
[<c03b64f8>] (bus_add_driver) from [<c03b7808>] (driver_register+0x9c/0xe0)
[<c03b7808>] (driver_register) from [<c0101900>] (do_one_initcall+0xa8/0x11c)
[<c0101900>] (do_one_initcall) from [<c0800d40>] (kernel_init_freeable+0x10c/0x1cc)
[<c0800d40>] (kernel_init_freeable) from [<c05e1e6c>] (kernel_init+0x8/0x10c)
[<c05e1e6c>] (kernel_init) from [<c0106fd0>] (ret_from_fork+0x14/0x24)
Code: e92d4070 e1a05000 e59f0034 eb00ea7e (e5954004)
---[ end trace f6d20ab8f9ad8edb ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D         4.14.0-xilinx #15
Hardware name: Xilinx Zynq Platform
[<c010e7b4>] (unwind_backtrace) from [<c010a9b0>] (show_stack+0x10/0x14)
[<c010a9b0>] (show_stack) from [<c05d1950>] (dump_stack+0x80/0xa0)
[<c05d1950>] (dump_stack) from [<c010cf20>] (ipi_cpu_stop+0x3c/0x70)
[<c010cf20>] (ipi_cpu_stop) from [<c010d720>] (handle_IPI+0x64/0x84)
[<c010d720>] (handle_IPI) from [<c01013f8>] (gic_handle_irq+0x7c/0x98)
[<c01013f8>] (gic_handle_irq) from [<c010b40c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0901f48 to 0xc0901f90)
1f40:                   00000001 00000000 00000000 c0116800 00000000 00000000
1f60: c0900000 c08441f8 c0901fa0 c0833a30 00000000 00000000 1f388000 c0901f98
1f80: c01079e0 c01079e4 60000013 ffffffff
[<c010b40c>] (__irq_svc) from [<c01079e4>] (arch_cpu_idle+0x2c/0x38)
[<c01079e4>] (arch_cpu_idle) from [<c01490fc>] (do_idle+0xd0/0x198)
[<c01490fc>] (do_idle) from [<c01492fc>] (cpu_startup_entry+0x18/0x1c)
[<c01492fc>] (cpu_startup_entry) from [<c0800bd4>] (start_kernel+0x308/0x368)
[<c0800bd4>] (start_kernel) from [<0000807c>] (0x807c)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

[-- Attachment #3: linux_log_andrew_dts_with_Port10in_both_switches_and_no_link.txt --]
[-- Type: text/plain, Size: 8926 bytes --]

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx (84alav@fedora64) (gcc version 5.4.0 (Buildroot 2017.05.1)) #15 SMP PREEMPT Mon Mar 19 12:30:34 IST 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Zynq Zed Development Board
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x1dc00000
percpu: Embedded 16 pages/cpu @dfbc5000 s34764 r8192 d22580 u65536
Built 1 zonelists, mobility grouping on.  Total pages: 130048
Kernel command line:
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: 490488K/524288K available (5120K kernel code, 224K rwdata, 1404K rodata, 1024K init, 150K bss, 17416K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0600000   (6112 kB)
      .init : 0xc0800000 - 0xc0900000   (1024 kB)
      .data : 0xc0900000 - 0xc0938000   ( 224 kB)
       .bss : 0xc0938000 - 0xc095da14   ( 151 kB)
Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
        Tasks RCU enabled.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to e0800000
slcr mapped to e0802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
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 0x76760001
zynq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
console [tty0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
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 0x100000 - 0x100060
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc+0x1c4/0x224 with crng_init=0
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
random: fast init done
DMA: preallocated 256 KiB pool for atomic coherent allocations
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 @ 0xe0840000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 25, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
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
FPGA manager framework
clocksource: 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)
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...
Freeing initrd memory: 3604K
hw perfevents: no interrupt-affinity property for /pmu, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  ?© 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
libphy: Fixed MDIO Bus: probed
CAN device driver interface
mv88e6xxx_init kelev
libphy: MACB_mii_bus: probed
mdio_bus e000b000.ethernet-ffffffff: /amba/ethernet@e000b000/fixed-link has invalid PHY address
mv88e6085 e000b000.ethernet-ffffffff:1d: switch 0xa10 detected: Marvell 88E6390X, revision 1
libphy: mv88e6xxx SMI: probed
DSA: switch 0 0 parsed
Tree has no master device
mv88e6085: probe of e000b000.ethernet-ffffffff:1d failed with error -22
mv88e6085 e000b000.ethernet-ffffffff:1c: switch 0xa10 detected: Marvell 88E6390X, revision 1
libphy: mv88e6xxx SMI: probed
DSA: switch 0 0 parsed
Tree has no master device
mv88e6085: probe of e000b000.ethernet-ffffffff:1c failed with error -22
mdio_bus e000b000.ethernet-ffffffff: scan phy fixed-link at address 1
macb e000c000.ethernet: invalid hw address, using random
libphy: MACB_mii_bus: probed
macb: macb_mii_probe kelev
macb e000c000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000c000 irq 28 (5e:89:7b:36:e5:d6)
Generic PHY e000c000.ethernet-ffffffff:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000c000.ethernet-ffffffff:00, irq=POLL)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
ci_hdrc ci_hdrc.0: unable to init phy: -110
ci_hdrc: probe of ci_hdrc.0 failed with error -110
i2c /dev entries driver
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at e0948000 with timeout 10s
EDAC MC: ECC not enabled
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
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
Freeing unused kernel memory: 1024K
/bin/mount: special device /dev/mmcblk0p1 does not exist
/bin/mount: special device /dev/mmcblk0p2 does not exist
/bin/mount: special device /dev/mmcblk0p3 does not exist
Starting logging: OK
Initializing random number generator... done.
Starting network: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
OK
Starting openntpd: creating new /var/db/ntpd.drift
OK
Starting dropbear sshd: OK
Starting vsftpd: OK

[-- Attachment #4: zynq-zed.dts --]
[-- Type: application/octet-stream, Size: 4384 bytes --]

/*
 *  Copyright (C) 2011 - 2014 Xilinx
 *  Copyright (C) 2012 National Instruments Corp.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
/dts-v1/;
/include/ "zynq-7000.dtsi"

/ {
	model = "Zynq Zed Development Board";
	compatible = "xlnx,zynq-zed", "xlnx,zynq-7000";

	aliases {
		ethernet0 = &gem0;
		ethernet1 = &gem1;
		serial0 = &uart0;
		spi0 = &qspi;
		mmc0 = &sdhci0;
	};

	memory {
		device_type = "memory";
		reg = <0x0 0x20000000>;
	};

	chosen {
		bootargs = "";
		stdout-path = "serial0:115200n8";
	};

	usb_phy0: phy0 {
		compatible = "ulpi-phy";
		#phy-cells = <0>;
		reg = <0xe0002000 0x1000>;
		view-port = <0x0170>;
		drv-vbus;
	};
};

&clkc {
	ps-clk-frequency = <33333333>;
};

&gem0 {
	status = "okay";
			fixed-link {
					speed = <1000>;
					full-duplex;
			};
			phy0: phy@0 {
				reg = <0>;
			};

			switch0: switch@1d {
				compatible = "marvell,mv88e6190";
				reg = <0x1d>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
					reg = <0>;
					label = "cpu";
						fixed-link {
							speed = <1000>;
							full-duplex;
						};
					};

					port@1 {
						reg = <1>;
						label = "lan0";
					};
					
					port@2 {
						reg = <2>;
						label = "lan1";
					};

					port@3 {
						reg = <3>;
						label = "lan2";
					};
					
					port@4 {
						reg = <4>;
						label = "lan3";
					};

					port@5 {
						reg = <5>;
						label = "lan4";
					};
					
					port@6 {
						reg = <6>;
						label = "lan5";
					};

					port@7 {
						reg = <7>;
						label = "lan6";
					};
					
					port@8 {
						reg = <8>;
						label = "lan7";
					};			

					port@9 {
						reg = <9>;
						label = "lan8";
					};

					switch0port10: port@10 {
						reg = <10>;
						label = "dsa";
						link = <&switch1port10>;
						phy-mode = "sgmii";
			 			fixed-link {
							speed = <1000>;
							full-duplex;
						};
					};

				};

			};


			switch1: switch@1c {
				compatible = "marvell,mv88e6190";
				reg = <0x1c>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						label = "lan9";
						};
					port@1 {
						reg = <1>;
						label = "lan10";
					};
					port@2 {
						reg = <2>;
						label = "lan11";
					};
					port@3 {
						reg = <3>;
						label = "lan12";
						};
					port@4 {
						reg = <4>;
						label = "lan13";
					};
					port@5 {
						reg = <5>;
						label = "lan14";
					};
					port@6 {
						reg = <6>;
						label = "lan15";
						};
					port@7 {
						reg = <7>;
						label = "lan16";
					};
					port@8 {
						reg = <8>;
						label = "lan17";
					};
					port@9 {
						reg = <9>;
						label = "lan18";
					};

					switch1port10: port@10 {
						reg = <10>;
						label = "dsa";
						link = <&switch0port10>;
						phy-mode = "sgmii";
					 	fixed-link {
							speed = <1000>;
							full-duplex;
						};
					};
				};
			};

		};


&gem1 {
	phy-handle = <&phy0>;
	status = "okay";
};



&qspi {
	status = "okay";
	is-dual = <0>;
	num-cs = <1>;
	flash@0 {
		compatible = "n25q128a11";
		reg = <0x0>;
		spi-tx-bus-width = <1>;
		spi-rx-bus-width = <4>;
		spi-max-frequency = <50000000>;
		#address-cells = <1>;
		#size-cells = <1>;
		partition@qspi-fsbl-uboot {
			label = "qspi-fsbl-uboot";
			reg = <0x0 0x100000>;
		};
		partition@qspi-linux {
			label = "qspi-linux";
			reg = <0x100000 0x500000>;
		};
		partition@qspi-device-tree {
			label = "qspi-device-tree";
			reg = <0x600000 0x20000>;
		};
		partition@qspi-rootfs {
			label = "qspi-rootfs";
			reg = <0x620000 0x5E0000>;
		};
		partition@qspi-bitstream {
			label = "qspi-bitstream";
			reg = <0xC00000 0x400000>;
		};
	};
};

&sdhci0 {
	status = "okay";
};

/*
&uart1 {
	current-speed = <115200>;
	device_type = "serial";
	port-number = <1>;
	status = "okay";
};
*/

&uart0 {
	current-speed = <115200>;
	device_type = "serial";
	port-number = <0>;
	status = "okay";
};
&usb0 {
	status = "okay";
	dr_mode = "host";
	usb-phy = <&usb_phy0>;
};

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DTS for our Configuration
       [not found] <3988EA6F088014488BE41D19253A7EE40152236E92@EXS10.iai.co.il>
@ 2018-03-16 15:12 ` Andrew Lunn
       [not found]   ` <3988EA6F088014488BE41D19253A7EE40152236EE1@EXS10.iai.co.il>
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2018-03-16 15:12 UTC (permalink / raw)
  To: Dror Alon; +Cc: 'netdev@vger.kernel.org', Efter Yoram, Alayev Michael

On Thu, Mar 15, 2018 at 02:00:00PM +0000, Dror Alon wrote:
> Hello Andrew,
> Thanks for your fast responses.
> Michael and I keep trying to configure our linux Zynq7000 board.
> We can't succeed with configure our SWITCHES via the DTS file.

> Please. See the next diagram, and please Do you have any DTS Sample
> for this Setup ?

Hi Dror

I'm surprised you are doing SGMII between ports 10. They are 10G
capable.

gem0: {
	fixed-link {
		speed = <1000>;
		full-duplex;
	};

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

	switch0: switch@1c: {
		compatible = "marvell,mv88e6190";
		reg = <0x1c>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "cpu";
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			port@1 {
				reg = <1>;
				label = "lan0";
			};
			port@2 {
				reg = <2>;
				label = "lan1";
			};
			...
			switch0port10: port@10 {
				reg = <10>;
				label = "dsa";
				link = <&switch1port10>;
				phy-mode = "sgmii";
			 	fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};

	switch1: switch@1d: {
		compatible = "marvell,mv88e6190";
		reg = <0x1d>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "lan9";
				};
			port@1 {
				reg = <1>;
				label = "lan10";
			};
			port@2 {
				reg = <2>;
				label = "lan11";
			};
			...
			switch1port10: port@10 {
				reg = <10>;
				label = "dsa";
				link = <&switch0port10>;
				phy-mode = "sgmii";
			 	fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};
};

gem1: {
      phy-handle = <phy0>;
};

It looks like you have at last one issue to solve in the macb driver.
If you have a fixed-phy, it does an mdiobus_register. This means it is
going to ignore all the other device tree properties. You need it to
do an of_mdiobus_register().

   Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-22 13:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <48F7D4389F30BA4383F214EE802BA47101706555D3@EXS10.iai.co.il>
2018-03-22  9:55 ` DTS for our Configuration Alayev Michael
2018-03-22 13:55   ` Andrew Lunn
     [not found] <3988EA6F088014488BE41D19253A7EE40152236E92@EXS10.iai.co.il>
2018-03-16 15:12 ` Andrew Lunn
     [not found]   ` <3988EA6F088014488BE41D19253A7EE40152236EE1@EXS10.iai.co.il>
2018-03-19 16:23     ` Alayev Michael
2018-03-19 16:56       ` Andrew Lunn
     [not found]         ` <48F7D4389F30BA4383F214EE802BA471017065554B@EXS10.iai.co.il>
2018-03-20 12:38           ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).