Welcome! Log In Create A New Profile

Advanced

armada 370 (88f6710) mainline uboot support

Posted by wacke 
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 12:30AM
Hi bodhi,
The dsa node was deprecated, and the current binding is mdio node:

&mdio {
	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";

	switch0@0 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x0>;

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

			port@0 {
			       reg = <0>;
			       label = "lan0";
			};

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

			port@2 {
			       reg = <2>;
			       label = "lan2";
			};

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

			port@5 {
			       reg = <5>;
			       label = "cpu";
			       ethernet = <&eth1>;
			       fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};
};
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 12:42AM
I see :) it is slowly coming back to me now :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/18/2019 12:42AM by bodhi.
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 12:44AM
Yes, the fact that it is in the switch node and "compatible with xxx" is enough to be recognized as DSA.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 12:48AM
Did the box recognize this DSA switch as 6171R? or 6171?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 12:57AM
Hi bodhi,
My box recognize it with 6171:
mv88e6085 f1072004.mdio-mii:00: switch 0x1710 detected: Marvell 88E6171, revision 2
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 01:47AM
wacke,

The Linksys EA4500 has the same switch, and the detection string is

[   21.880118] mv88e6085 f1072004.mdio-bus-mii:10: switch 0x171 detected: Marvell 88E6171, revision 2

The fact that it is :10 is OK. But that 0x171 is slightly different than what you saw. Perhaps because we are running different kernel. Which one is on your RT NAS box now?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 01:50AM
Hi bodhi,
Currently my box runing openwrt with kernel 4.14.105, and if use base address 10, the kernel won't recognize the switch at all.



Edited 1 time(s). Last edit at 03/18/2019 01:52AM by wacke.
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 02:26AM
wacke,

You meant in the DSA node?

reg = <0x10 0>;	/* MDIO address 16, switch 0 in tree */

or this in the mdio node

switch0@0 {

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/18/2019 02:33AM by bodhi.
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 02:32AM
bodhi,
nope. The dsa node was totally deprecated, it's in mdio node:
&mdio {
	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";

	switch0@0 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x0>;
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 02:44AM
wacke,

I see. That makes sense, though. This is Armada 370. The Linksys EA4500 is Kirkwood 6282. That base address is likely not the same.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 02:49AM
It sounds like your switch works like a dumb switch now, for whatever reason. The flooding is usually what make PC -- switch -- PC go so fast. It does not need to go to the CPU.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 02:56AM
Hi bodhi,
So is there anyway to get the switch working properly?
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 03:05AM
wacke,

I think you should try to use the armada-385-turris-omnia.dts as the template for the switch part (because we know that it works, and the SoC is Armada 385).

And modify the address to your box switch PHY address 0x0. eth0 vs eth1 is also specific to your box.

linux/arch/arm/boot/dts/armada-385-turris-omnia.dts

/* Switch MV88E6176 at address 0x10 */
	switch@10 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		dsa,member = <0 0>;

		reg = <0x10>;

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

			ports@0 {
				reg = <0>;
				label = "lan0";
			};

			ports@1 {
				reg = <1>;
				label = "lan1";
			};

			ports@2 {
				reg = <2>;
				label = "lan2";
			};

			ports@3 {
				reg = <3>;
				label = "lan3";
			};

			ports@4 {
				reg = <4>;
				label = "lan4";
			};

			ports@5 {
				reg = <5>;
				label = "cpu";
				ethernet = <&eth1>;
				phy-mode = "rgmii-id";

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

			/* port 6 is connected to eth0 */
		};
	};

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 03:12AM
bodhi,
Thanks. I'll try.
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 03:25AM
Yes, and you should test with Debian kernel 4.20.6. We don't know what has changed in DSA driver since 4.14.x.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 08:06AM
Hi bodhi,
I've tried the turris omnia's switch part, and also tested with debian kernel 4.20.6, but nothing helped. And I found that the cpu usage was very high when the iperf3 was running....
Re: armada 370 (88f6710) mainline uboot support
March 18, 2019 11:45PM
wacke,

> And I found that the cpu usage was
> very high when the iperf3 was running....

That's OK. When it is not doing anything else, high CPU load is a good thing.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 21, 2019 06:19AM
Hi bodhi,
After a lot of tests, I think it's still the HW IO problem, because my box don't have phy chip at all, the 8e6171r switch is link to the cpu directly.
Re: armada 370 (88f6710) mainline uboot support
March 21, 2019 06:31AM
wacke,

I dont think so.

Look back at the iperf test I did for Mirabox. It is Armada 370, which has no HW IO coherency, like your box. But the result is more than twice faster.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 21, 2019 06:36AM
But you are reasonable to suspect that the CPU got involve too much in this.

I wlll boot up the Linksys EA4500 when I have some free time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/21/2019 06:37AM by bodhi.
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 12:38AM
Here is the benchmark.

Linksys EA4500 has the Marvell DSA switch 6171R, Kirkwood SoC 88F6282.


Linksys EA4500
[    8.646156] mv88e6085 f1072004.mdio-bus-mii:10: switch 0x1710 detected: Marvell 88E6171, revision 2
[   30.802804] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   34.436399] mv88e6085 f1072004.mdio-bus-mii:10 ethernet1: Link is Up - 1Gbps/Full - flow control rx/tx

Dockstar
[   14.257709] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled



Linksys EA4500 (Flow control enabled, 192.168.0.246) -- Dockstar (Flow control disabled, 192.168.0.220)

iperf -s -i 3
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
------------------------------------------------------------
[  4] local 192.168.0.220 port 5001 connected with 192.168.0.246 port 35972
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 3.0 sec   223 MBytes   625 Mbits/sec
[  4]  3.0- 6.0 sec   223 MBytes   624 Mbits/sec
[  4]  6.0- 9.0 sec   222 MBytes   620 Mbits/sec
[  4]  0.0-10.0 sec   742 MBytes   622 Mbits/sec
------------------------------------------------------------
Client connecting to 192.168.0.246, TCP port 5001
TCP window size: 87.5 KByte (default)
------------------------------------------------------------
[  4] local 192.168.0.220 port 55964 connected with 192.168.0.246 port 5001
[  4]  0.0- 3.0 sec   164 MBytes   459 Mbits/sec
[  4]  3.0- 6.0 sec   165 MBytes   461 Mbits/sec
[  4]  6.0- 9.0 sec   165 MBytes   462 Mbits/sec
[  4]  0.0-10.0 sec   550 MBytes   461 Mbits/sec

The Linksys EA4500 has no HW IO Coherency. And the switch 6171R is identical to your RT NAS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 03/22/2019 12:41AM by bodhi.
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 05:33AM
Hi bodhi,
Did the EA4500 using the kernel DSA switch driver or using the mvsw61xx driver?
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 05:43AM
wacke,

> Hi bodhi,
> Did the EA4500 using the kernel DSA switch driver
> or using the mvsw61xx driver?

It has an almost identical DTS as your RT NAS DTS. It uses the same DSA driver. You can compare yours with the EA4500 DTS (in my kernel realease tarball).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 09:10AM
Hi bodhi,
I don't know why box get the low perfomance and I've tried every way to modify the device tree, but got no help....So maybe I should give up....
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 04:53PM
wacke,

Here is the full dmesg for the EA4500. Perhaps so you can compare it with yours to see if there is any clue.


root@EA4500:~# dmesg 
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Mon Oct 22 17:08:01 PDT 2018
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Linksys EA4500
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 32768
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4e4 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:512k(uboot),128k@512k(u_env),128k@640k(s_env),26m@2m(kernel),26m@2m(rootfs),26m@28m(alt_kernel),26m@28m(alt_rootfs),74m@54m(syscfg) earlyprintk=serial
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 108240K/131072K available (8192K kernel code, 800K rwdata, 2172K rodata, 1024K init, 280K bss, 22832K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
                   lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
                   modules : 0xbf000000 - 0xc0000000   (  16 MB)
                     .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
                     .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
                     .data : 0x(ptrval) - 0x(ptrval)   ( 801 kB)
                      .bss : 0x(ptrval) - 0x(ptrval)   ( 281 kB)
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007821] Switching to timer-based delay loop, resolution 5ns
[    0.014269] Console: colour dummy device 80x30
[    0.018778] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.029308] pid_max: default: 32768 minimum: 301
[    0.034234] Security Framework initialized
[    0.038504] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.045097] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.053188] CPU: Testing write buffer coherency: ok
[    0.059498] Setting up static identity map for 0x100000 - 0x100058
[    0.065909] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.071306] rcu: Hierarchical SRCU implementation.
[    0.079523] devtmpfs: initialized
[    0.088445] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.098318] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.104727] prandom: seed boundary self test passed
[    0.113808] prandom: 100 self tests passed
[    0.117925] pinctrl core: initialized pinctrl subsystem
[    0.124447] NET: Registered protocol family 16
[    0.129411] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.137023] audit: initializing netlink subsys (disabled)
[    0.143631] audit: type=2000 audit(0.130:1): state=initialized audit_enabled=0 res=1
[    0.151477] cpuidle: using governor ladder
[    0.155621] cpuidle: using governor menu
[    0.160070] Feroceon L2: Enabling L2
[    0.163665] Feroceon L2: Cache support initialised.
[    0.168920] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.183782] No ATAGs?
[    0.192528] vgaarb: loaded
[    0.197809] SCSI subsystem initialized
[    0.201820] libata version 3.00 loaded.
[    0.202081] usbcore: registered new interface driver usbfs
[    0.207588] usbcore: registered new interface driver hub
[    0.213019] usbcore: registered new device driver usb
[    0.218279] pps_core: LinuxPPS API ver. 1 registered
[    0.223218] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.232350] PTP clock support registered
[    0.237226] clocksource: Switched to clocksource orion_clocksource
[    0.345721] VFS: Disk quotas dquot_6.6.0
[    0.349752] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.366328] NET: Registered protocol family 2
[    0.371538] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.379251] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.386191] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.392574] TCP: Hash tables configured (established 1024 bind 1024)
[    0.399024] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.404849] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.411314] NET: Registered protocol family 1
[    0.416226] RPC: Registered named UNIX socket transport module.
[    0.422198] RPC: Registered udp transport module.
[    0.426879] RPC: Registered tcp transport module.
[    0.431579] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.438016] PCI: CLS 0 bytes, default 32
[    0.438264] Unpacking initramfs...
[    1.177186] Freeing initrd memory: 8212K
[    1.181381] NetWinder Floating Point Emulator V0.97 (double precision)
[    1.189102] Initialise system trusted keyrings
[    1.193559] Key type blacklist registered
[    1.197823] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.204326] zbud: loaded
[    1.207924] NFS: Registering the id_resolver key type
[    1.212970] Key type id_resolver registered
[    1.217129] Key type id_legacy registered
[    1.221201] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.227894] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.234493] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.241742] fuse init (API version 7.27)
[    1.246027] orangefs_debugfs_init: called with debug mask: :none: :0:
[    1.252662] orangefs_init: module version upstream loaded
[    1.258066] SGI XFS with ACLs, security attributes, realtime, scrub, no debug enabled
[    2.567234] random: fast init done
[    7.168723] Key type asymmetric registered
[    7.172803] Asymmetric key parser 'x509' registered
[    7.177913] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    7.185272] io scheduler noop registered
[    7.189247] io scheduler deadline registered
[    7.193593] io scheduler cfq registered (default)
[    7.199673] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.208912] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    7.216452] pci_bus 0000:00: root bus resource [bus 00-ff]
[    7.221996] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    7.228893] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    7.235135] pci_bus 0000:00: scanning bus
[    7.235247] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    7.235562] pci 0000:00:02.0: [11ab:6282] type 01 class 0x060400
[    7.236922] pci_bus 0000:00: fixups for bus
[    7.236937] PCI: bus0: Fast back to back transfers disabled
[    7.242529] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 0
[    7.242539] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    7.250535] pci 0000:00:02.0: scanning [bus 00-00] behind bridge, pass 0
[    7.250545] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    7.258541] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 1
[    7.258678] pci_bus 0000:01: scanning bus
[    7.258723] pci 0000:01:00.0: [11ab:2a41] type 00 class 0x020000
[    7.258771] pci 0000:01:00.0: reg 0x10: [mem 0x90000000-0x9000ffff 64bit]
[    7.258795] pci 0000:01:00.0: reg 0x18: [mem 0x90010000-0x9001ffff 64bit]
[    7.258955] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:01.0 (capable of 7.876 Gb/s with 8 GT/s x1 link)
[    7.298490] pci_bus 0000:01: fixups for bus
[    7.298504] PCI: bus1: Fast back to back transfers disabled
[    7.304056] pci_bus 0000:01: bus scan returning with max=01
[    7.304068] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    7.304084] pci 0000:00:02.0: scanning [bus 00-00] behind bridge, pass 1
[    7.304206] pci_bus 0000:02: scanning bus
[    7.304245] pci 0000:02:00.0: [11ab:2a42] type 00 class 0x020000
[    7.304293] pci 0000:02:00.0: reg 0x10: [mem 0x98000000-0x9800ffff 64bit]
[    7.304318] pci 0000:02:00.0: reg 0x18: [mem 0x98010000-0x9801ffff 64bit]
[    7.304476] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:02.0 (capable of 7.876 Gb/s with 8 GT/s x1 link)
[    7.348483] pci_bus 0000:02: fixups for bus
[    7.348496] PCI: bus2: Fast back to back transfers disabled
[    7.354047] pci_bus 0000:02: bus scan returning with max=02
[    7.354058] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    7.354071] pci_bus 0000:00: bus scan returning with max=02
[    7.354262] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    7.361140] pci 0000:00:02.0: BAR 14: assigned [mem 0xe0100000-0xe01fffff]
[    7.368014] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe000ffff 64bit]
[    7.375307] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0010000-0xe001ffff 64bit]
[    7.382618] pci 0000:00:01.0: PCI bridge to [bus 01]
[    7.387588] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    7.394356] pci 0000:02:00.0: BAR 0: assigned [mem 0xe0100000-0xe010ffff 64bit]
[    7.401664] pci 0000:02:00.0: BAR 2: assigned [mem 0xe0110000-0xe011ffff 64bit]
[    7.408969] pci 0000:00:02.0: PCI bridge to [bus 02]
[    7.413918] pci 0000:00:02.0:   bridge window [mem 0xe0100000-0xe01fffff]
[    7.420775] pcieport 0000:00:01.0: assign IRQ: got 0
[    7.420794] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    7.426977] pcieport 0000:00:02.0: assign IRQ: got 0
[    7.426993] pcieport 0000:00:02.0: enabling device (0140 -> 0142)
[    7.433621] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.498063] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.505602] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.568062] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.575813] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.583447] console [ttyS0] disabled
[    7.587062] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    7.596096] console [ttyS0] enabled
[    7.603149] bootconsole [earlycon0] disabled
[    7.618837] loop: module loaded
[    7.622867] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    7.629298] nand: Hynix H27U1G8F2BTR-BC
[    7.633157] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    7.640796] Scanning device for bad blocks
[    7.712331] 8 cmdlinepart partitions found on MTD device orion_nand
[    7.718650] Creating 8 MTD partitions on "orion_nand":
[    7.723813] 0x000000000000-0x000000080000 : "uboot"
[    7.729713] 0x000000080000-0x0000000a0000 : "u_env"
[    7.735505] 0x0000000a0000-0x0000000c0000 : "s_env"
[    7.741378] 0x000000200000-0x000001c00000 : "kernel"
[    7.747484] 0x000000200000-0x000001c00000 : "rootfs"
[    7.753544] 0x000001c00000-0x000003600000 : "alt_kernel"
[    7.759995] 0x000001c00000-0x000003600000 : "alt_rootfs"
[    7.766424] 0x000003600000-0x000008000000 : "syscfg"
[    7.773945] libphy: Fixed MDIO Bus: probed
[    7.778876] libphy: orion_mdio_bus: probed
[    7.783280] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.790562] mv643xx_eth_port mv643xx_eth_port.0: DMA mask not set
[    7.797271] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address xxxxxxxxxxxx
[    7.806155] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.812760] ehci-pci: EHCI PCI platform driver
[    7.817307] ehci-orion: EHCI orion driver
[    7.821522] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.827061] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.834963] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    7.867268] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.873580] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    7.881917] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.889197] usb usb1: Product: EHCI Host Controller
[    7.894103] usb usb1: Manufacturer: Linux 4.19.0-kirkwood-tld-1 ehci_hcd
[    7.900855] usb usb1: SerialNumber: f1050000.ehci
[    7.906174] hub 1-0:1.0: USB hub found
[    7.910046] hub 1-0:1.0: 1 port detected
[    7.914651] usbcore: registered new interface driver usb-storage
[    7.921119] mousedev: PS/2 mouse device common for all mice
[    7.927004] i2c /dev entries driver
[    7.931868] hidraw: raw HID events driver (C) Jiri Kosina
[    7.937707] drop_monitor: Initializing network drop monitor service
[    7.944300] NET: Registered protocol family 17
[    7.948908] Key type dns_resolver registered
[    7.953976] registered taskstats version 1
[    7.958133] Loading compiled-in X.509 certificates
[    7.963008] zswap: loaded using pool lzo/zbud
[    7.989347] Key type big_key registered
[    8.002986] Key type encrypted registered
[    8.009085] hctosys: unable to open rtc device (rtc0)
[    8.017712] Freeing unused kernel memory: 1024K
[    8.022783] Checked W+X mappings: passed, no W+X pages found
[    8.028550] Run /init as init process
[    8.131115] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    8.148199] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    8.155500] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    8.277330] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.498611] usb 1-1: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00
[    8.506855] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    8.527331] usb 1-1: Product: Ultra Fit
[    8.531212] usb 1-1: Manufacturer: SanDisk
[    8.535329] usb 1-1: SerialNumber: 4C530001110228102404
[    8.556322] usb-storage 1-1:1.0: USB Mass Storage device detected
[    8.574941] scsi host0: usb-storage 1-1:1.0
[    8.646156] mv88e6085 f1072004.mdio-bus-mii:10: switch 0x1710 detected: Marvell 88E6171, revision 2
[    8.970106] libphy: mv88e6xxx SMI: probed
[    9.037168] usbcore: registered new interface driver uas
[    9.618210] scsi 0:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[    9.634040] sd 0:0:0:0: [sda] 30375936 512-byte logical blocks: (15.6 GB/14.5 GiB)
[    9.645794] sd 0:0:0:0: [sda] Write Protect is off
[    9.650728] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[    9.651525] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    9.668167]  sda: sda1
[    9.680281] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    9.918012] random: crng init done
[    9.921442] random: 7 urandom warning(s) missed due to ratelimiting
[   10.023323] mv88e6085 f1072004.mdio-bus-mii:10 ethernet1 (uninitialized): PHY [mv88e6xxx-0:00] driver [Generic PHY]
[   10.057214] mv88e6085 f1072004.mdio-bus-mii:10 ethernet2 (uninitialized): PHY [mv88e6xxx-0:01] driver [Generic PHY]
[   10.080423] mv88e6085 f1072004.mdio-bus-mii:10 ethernet3 (uninitialized): PHY [mv88e6xxx-0:02] driver [Generic PHY]
[   10.105819] mv88e6085 f1072004.mdio-bus-mii:10 ethernet4 (uninitialized): PHY [mv88e6xxx-0:03] driver [Generic PHY]
[   10.128694] mv88e6085 f1072004.mdio-bus-mii:10 internet (uninitialized): PHY [mv88e6xxx-0:04] driver [Generic PHY]
[   10.151975] DSA: tree 0 setup
[   21.044689] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   21.063235] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   23.388429] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   23.925334] orion_wdt: Initial timeout 21 sec
[   23.932378] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   24.008883] marvell-cesa f1030000.crypto: CESA device successfully registered
[   24.377356] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   25.129480] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   25.137665] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[   25.146368] cfg80211: failed to load regulatory.db
[   25.369191] mwl8k 0000:01:00.0: assign IRQ: got 61
[   25.369207] Marvell TOPDOG(R) 802.11 Wireless Network Driver version 0.13
[   25.376096] pcieport 0000:00:01.0: enabling bus mastering
[   25.408790] mwl8k 0000:02:00.0: assign IRQ: got 62
[   25.408812] pcieport 0000:00:02.0: enabling bus mastering
[   26.317341] ieee80211 phy0: Command RF_ANTENNA error 0x2
[   26.322695] ieee80211 phy0: failed to set # of RX antennas
[   26.337300] ieee80211 phy0: Command RF_ANTENNA error 0x2
[   26.342645] ieee80211 phy0: failed to set # of TX antennas
[   26.349055] ieee80211 phy0: 88w8366 v48, 20aa4bf65ff2, STA firmware 4.1.0.3
[   26.356160] ieee80211 phy1: Command RF_ANTENNA error 0x2
[   26.368516] ieee80211 phy1: failed to set # of RX antennas
[   26.380744] ieee80211 phy1: Command RF_ANTENNA error 0x2
[   26.386103] ieee80211 phy1: failed to set # of TX antennas
[   26.406654] mwl8k 0000:01:00.0 wlp1s0: renamed from wlan0
[   26.412224] ieee80211 phy1: 88w8366 v48, 20aa4bf65ff4, STA firmware 4.1.0.3
[   26.516561] mwl8k 0000:02:00.0 wlp2s0: renamed from wlan0
[   27.277503] EXT4-fs (sda1): re-mounted. Opts: user_xattr,acl,errors=remount-ro
[   28.638872] Adding 524284k swap on /swapfile1.  Priority:-2 extents:11 across:11923324k FS
[   30.802760] mv643xx_eth: no PHY
[   30.802804] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   31.208202] NET: Registered protocol family 10
[   31.224804] mv88e6085 f1072004.mdio-bus-mii:10 ethernet1: configuring for phy/gmii link mode
[   31.234541] IPv6: ADDRCONF(NETDEV_UP): ethernet1: link is not ready
[   31.248187] Segment Routing with IPv6
[   34.436399] mv88e6085 f1072004.mdio-bus-mii:10 ethernet1: Link is Up - 1Gbps/Full - flow control rx/tx
[   34.445823] IPv6: ADDRCONF(NETDEV_CHANGE): ethernet1: link becomes ready
[   38.901397] NET: Registered protocol family 15
[   42.272251] Bluetooth: Core ver 2.22
[   42.276024] NET: Registered protocol family 31
[   42.298740] Bluetooth: HCI device and connection manager initialized
[   42.305187] Bluetooth: HCI socket layer initialized
[   42.322498] Bluetooth: L2CAP socket layer initialized
[   42.335960] Bluetooth: SCO socket layer initialized
[   42.444617] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   42.457327] Bluetooth: BNEP filters: protocol multicast
[   42.462593] Bluetooth: BNEP socket layer initialized
[   44.847985] NFSD: starting 45-second grace period (net f000001c)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 08:40PM
wacke,

Please post your full DTS file.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 10:00PM
Hi bodhi,
This is my box current DTS file (modified for kernel 4.19 above):
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Marvell Armada 370 Reference Design board
 * (RD-88F6710-A1)
 *
 *  Copied from arch/arm/boot/dts/armada-370-db.dts
 *
 *  Copyright (C) 2013 Florian Fainelli <florian@openwrt.org>
 *
 * Note: this Device Tree assumes that the bootloader has remapped the
 * internal registers to 0xf1000000 (instead of the default
 * 0xd0000000). The 0xf1000000 is the default used by the recent,
 * DT-capable, U-Boot bootloaders provided by Marvell. Some earlier
 * boards were delivered with an older version of the bootloader that
 * left internal registers mapped at 0xd0000000. If you are in this
 * situation, you should either update your bootloader (preferred
 * solution) or the below Device Tree should be adjusted.
 */

/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
#include "armada-370.dtsi"

/ {
	model = "RTNAS V3";
	compatible = "marvell,armada-370-rtnasv3","marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp";

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

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x40000000>; /* 1024 MB */
	};

	soc {
		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
			  MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
			  MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;

		internal-regs {
			serial@12000 {
				status = "okay";
			};

			sata@a0000 {
				nr-ports = <2>;
				status = "okay";
			};

			ethernet@70000 {
				status = "disabled";
				phy-mode = "sgmii";
			};

			ethernet@74000 {
				pinctrl-0 = <&ge1_rgmii_pins>;
				pinctrl-names = "default";
				status = "okay";
				phy-mode = "rgmii-id";

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

			mvsdio@d4000 {
				pinctrl-0 = <&sdio_pins1>;
				pinctrl-names = "default";
				status = "disabled";
				/* No CD or WP GPIOs */
				broken-cd;
			};

			usb@50000 {
				status = "okay";
			};

			usb@51000 {
				status = "okay";
			};

		};
	};

        gpio-keys {
            compatible = "gpio-keys";
            pinctrl-0 = <&reset_button_pin &pwr_button_pin>;
            pinctrl-names = "default";

            reset_button {
                label = "Reset Button";
                linux,code = <KEY_RESTART>;
                gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
            };

            wps_button {
                label = "Software Button";
                linux,code = <KEY_POWER>;
                gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
            };
        };

        gpio-leds {
            compatible = "gpio-leds";
            pinctrl-names = "default";
            pinctrl-0 = <&pwr_led_pin &wps_led_pins>;

            blue_pwr_led {
                label = "rtnasv3:blue:pwr";
                gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
                default-state = "keep";
            };

            blue_wps_led {
                label = "rtnasv3:blue:wps";
                gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
                default-state = "off";
            };
        };

	dsa {
		status = "disabled";

		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;

		dsa,ethernet = <&eth1>;
		dsa,mii-bus = <&mdio>;

		switch@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x10 0>;	/* MDIO address 16, switch 0 in tree */

			port@0 {
			       reg = <0>;
			       label = "lan0";
			};

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

			port@2 {
			       reg = <2>;
			       label = "lan2";
			};

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

			port@4 {
			       reg = <4>;
			       label = "wan";
			};

			port@5 {
			      reg = <5>;
			      label = "cpu";
			};
		};
	 };
};

&mdio {
	#address-cells = <0x1>;
	#size-cells = <0x0>;
	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
	status = "okay";

	switch: switch@0 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x0>;
		interrupt-controller;
		#interrupt-cells = <2>;

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

			port@0 {
			       reg = <0>;
			       label = "lan0";
			};

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

			port@2 {
			       reg = <2>;
			       label = "lan2";
			};

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

			port@4 {
			       reg = <4>;
			       label = "wan";
			};

			port@5 {
				reg = <5>;
				label = "cpu";
				ethernet = <&eth1>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};

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

			switchphy0: switchphy@0 {
				reg = <0>;
				interrupt-parent = <&switch>;
				interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
			};

			switchphy1: switchphy@1 {
				reg = <1>;
				interrupt-parent = <&switch>;
				interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
			};

			switchphy2: switchphy@2 {
				reg = <2>;
				interrupt-parent = <&switch>;
				interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
			};

			switchphy3: switchphy@3 {
				reg = <3>;
				interrupt-parent = <&switch>;
				interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
			};
			
			switchphy4: switchphy@4 {
				reg = <4>;
				interrupt-parent = <&switch>;
				interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
			};
		};
	};
};

&pciec {
	status = "okay";

	/* Internal mini-PCIe connector */
	pcie@1,0 {
		/* Port 0, Lane 0 */
		status = "okay";
	};

	/* Internal mini-PCIe connector */
	pcie@2,0 {
		/* Port 1, Lane 0 */
		status = "okay";
	};
};


&pinctrl {
	compatible = "marvell,mv88f6710-pinctrl";

	pwr_button_pin: pwr-button-pin {
		marvell,pins = "mpp52";
		marvell,function = "gpio";
	};

	reset_button_pin: reset-button-pin {
		marvell,pins = "mpp62";
		marvell,function = "gpio";
	};

	pwr_led_pin: pwr-led-pin {
		marvell,pins = "mpp6";
		marvell,function = "gpio";
	};

	wps_led_pins: wps-led-pins {
		marvell,pins = "mpp50";
		marvell,function = "gpio";
	};
};

&nand_controller {
	status = "okay";
	
    nand@0 {
		reg = <0>;
		label = "pxa3xx_nand-0";
		nand-rb = <0>;
		marvell,nand-keep-config;
		nand-on-flash-bbt;
		num-cs = <2>;
		nand-ecc-strength = <0x4>;
		nand-ecc-step-size = <0x200>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x0 0x400000>;
			};

			partition@400000 {
				label = "uboot_env";
				reg = <0x400000 0x400000>;
			};

			partition@800000 {
				label = "vendor";
				reg = <0x800000 0x400000>;
			};

			partition@c00000 {
				label = "unused";
				reg = <0xc00000 0xc00000>;
			};

			partition@1800000 {
				label = "kernel";
				reg = <0x1800000 0x400000>;
			};

			partition@1c00000 {
				label = "ubi";
				reg = <0x1c00000 0x3e400000>;
			};

			partition@40000000 {
				label = "syscfg";
				reg = <0x40000000 0xbbc00000>;
			};
		};
	};
};

&rtc {
	status = "disabled";
};
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 10:42PM
wacke,

I'm not saying this is the problem. But usually we avoid doing this if we can. The ethernet nodes were already defined in the DTSI. If you redefine them, you could inadvertenly change some characteristics of the device in the node. The basic rule is: we always take the DTSI definition, and modify some attributes for the box.

		
internal-regs {

.....
        ethernet@70000 {
				status = "disabled";
				phy-mode = "sgmii";
			};

			ethernet@74000 {
				pinctrl-0 = <&ge1_rgmii_pins>;
				pinctrl-names = "default";
				status = "okay";
				phy-mode = "rgmii-id";

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


Instead of doing the above, we'd want to define the nodes like this (in your case eth1 is active):

/* eth1 is connected to a Marvell 88E6171 switch, without a PHY. So set
 * fixed speed and duplex.
 */
&eth1 {
        status = "okay";
        ethernet1-port@0 {
                speed = <1000>;
                duplex = <1>;
        };
};

&eth0 {
        status = "disabled";
};

&rtc {
	status = "disabled";
};

And remove these:

ethernet@70000 {
				status = "disabled";
				phy-mode = "sgmii";
			};

			ethernet@74000 {
				pinctrl-0 = <&ge1_rgmii_pins>;
				pinctrl-names = "default";
				status = "okay";
				phy-mode = "rgmii-id";

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

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: armada 370 (88f6710) mainline uboot support
March 22, 2019 10:50PM
Hi bodhi,
I was just copy the dts from armada-370-rd.dts, I'll try your idea.
Re: armada 370 (88f6710) mainline uboot support
March 23, 2019 03:03AM
Hi bodhi,
I've booted up my box with this dts:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Marvell Armada 370 Reference Design board
 * (RD-88F6710-A1)
 *
 *  Copied from arch/arm/boot/dts/armada-370-db.dts
 *
 *  Copyright (C) 2013 Florian Fainelli <florian@openwrt.org>
 *
 * Note: this Device Tree assumes that the bootloader has remapped the
 * internal registers to 0xf1000000 (instead of the default
 * 0xd0000000). The 0xf1000000 is the default used by the recent,
 * DT-capable, U-Boot bootloaders provided by Marvell. Some earlier
 * boards were delivered with an older version of the bootloader that
 * left internal registers mapped at 0xd0000000. If you are in this
 * situation, you should either update your bootloader (preferred
 * solution) or the below Device Tree should be adjusted.
 */

/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
#include "armada-370.dtsi"

/ {
	model = "RTNAS V3";
	compatible = "marvell,armada-370-rtnasv3","marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp";

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

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x40000000>; /* 1024 MB */
	};

	soc {
		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
			  MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
			  MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;

		internal-regs {
			serial@12000 {
				status = "okay";
			};

			sata@a0000 {
				nr-ports = <2>;
				status = "okay";
			};

			mvsdio@d4000 {
				pinctrl-0 = <&sdio_pins1>;
				pinctrl-names = "default";
				status = "disabled";
				/* No CD or WP GPIOs */
				broken-cd;
			};

			usb@50000 {
				status = "okay";
			};

			usb@51000 {
				status = "okay";
			};

		};
	};

        gpio-keys {
            compatible = "gpio-keys";
            pinctrl-0 = <&reset_button_pin &pwr_button_pin>;
            pinctrl-names = "default";

            reset_button {
                label = "Reset Button";
                linux,code = <KEY_RESTART>;
                gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
            };

            wps_button {
                label = "Software Button";
                linux,code = <KEY_POWER>;
                gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
            };
        };

        gpio-leds {
            compatible = "gpio-leds";
            pinctrl-names = "default";
            pinctrl-0 = <&pwr_led_pin &wps_led_pins>;

            blue_pwr_led {
                label = "rtnasv3:blue:pwr";
                gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
                default-state = "keep";
            };

            blue_wps_led {
                label = "rtnasv3:blue:wps";
                gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
                default-state = "off";
            };
        };

	dsa {
		status = "disabled";

		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;

		dsa,ethernet = <&eth1>;
		dsa,mii-bus = <&mdio>;

		switch@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x10 0>;	/* MDIO address 16, switch 0 in tree */

			port@0 {
			       reg = <0>;
			       label = "lan0";
			};

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

			port@2 {
			       reg = <2>;
			       label = "lan2";
			};

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

			port@4 {
			       reg = <4>;
			       label = "wan";
			};

			port@5 {
			      reg = <5>;
			      label = "cpu";
			};
		};
	 };
};

&mdio {
	#address-cells = <0x1>;
	#size-cells = <0x0>;
	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
	status = "okay";

	switch: switch@0 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x0>;
		interrupt-controller;
		#interrupt-cells = <2>;

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

			port@0 {
			       reg = <0>;
			       label = "lan0";
			};

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

			port@2 {
			       reg = <2>;
			       label = "lan2";
			};

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

			port@4 {
			       reg = <4>;
			       label = "wan";
			};

			port@5 {
				reg = <5>;
				label = "cpu";
				ethernet = <&eth1>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};

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

			switchphy0: switchphy@0 {
				reg = <0>;
				interrupt-parent = <&switch>;
				interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
			};

			switchphy1: switchphy@1 {
				reg = <1>;
				interrupt-parent = <&switch>;
				interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
			};

			switchphy2: switchphy@2 {
				reg = <2>;
				interrupt-parent = <&switch>;
				interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
			};

			switchphy3: switchphy@3 {
				reg = <3>;
				interrupt-parent = <&switch>;
				interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
			};
			
			switchphy4: switchphy@4 {
				reg = <4>;
				interrupt-parent = <&switch>;
				interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
			};
		};
	};
};

&pciec {
	status = "okay";

	/* Internal mini-PCIe connector */
	pcie@1,0 {
		/* Port 0, Lane 0 */
		status = "okay";
	};

	/* Internal mini-PCIe connector */
	pcie@2,0 {
		/* Port 1, Lane 0 */
		status = "okay";
	};
};


&pinctrl {
	compatible = "marvell,mv88f6710-pinctrl";

	pwr_button_pin: pwr-button-pin {
		marvell,pins = "mpp52";
		marvell,function = "gpio";
	};

	reset_button_pin: reset-button-pin {
		marvell,pins = "mpp62";
		marvell,function = "gpio";
	};

	pwr_led_pin: pwr-led-pin {
		marvell,pins = "mpp6";
		marvell,function = "gpio";
	};

	wps_led_pins: wps-led-pins {
		marvell,pins = "mpp50";
		marvell,function = "gpio";
	};
};

&nand_controller {
	status = "okay";
	
    nand@0 {
		reg = <0>;
		label = "pxa3xx_nand-0";
		nand-rb = <0>;
		marvell,nand-keep-config;
		nand-on-flash-bbt;
		num-cs = <2>;
		nand-ecc-strength = <0x4>;
		nand-ecc-step-size = <0x200>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x0 0x400000>;
			};

			partition@400000 {
				label = "uboot_env";
				reg = <0x400000 0x400000>;
			};

			partition@800000 {
				label = "vendor";
				reg = <0x800000 0x400000>;
			};

			partition@c00000 {
				label = "unused";
				reg = <0xc00000 0xc00000>;
			};

			partition@1800000 {
				label = "kernel";
				reg = <0x1800000 0x400000>;
			};

			partition@1c00000 {
				label = "ubi";
				reg = <0x1c00000 0x3e400000>;
			};

			partition@40000000 {
				label = "syscfg";
				reg = <0x40000000 0xbbc00000>;
			};
		};
	};
};

&eth0 {
	status = "disabled";
};

/* eth1 is connected to a Marvell 88E6171 switch, without a PHY. So set
 * fixed speed and duplex.
 */
&eth1 {
	status = "okay";
	phy-mode = "rgmii-id";
	fixed-link {
		   speed = <1000>;
		   full-duplex;
	};
};

&rtc {
	status = "disabled";
};

Bandwith test:
root@debian:~# iperf -n2000M -i 3 -c 192.168.1.1                                                                                                                                       
------------------------------------------------------------                                                                                                                           
Client connecting to 192.168.1.1, TCP port 5001                                                                                                                                        
TCP window size: 43.8 KByte (default)                                                                                                                                                  
------------------------------------------------------------                                                                                                                           
[  3] local 192.168.1.142 port 39330 connected with 192.168.1.1 port 5001                                                                                                              
[ ID] Interval       Transfer     Bandwidth                                                                                                                                            
[  3]  0.0- 3.0 sec   154 MBytes   431 Mbits/sec                                                                                                                                       
[  3]  3.0- 6.0 sec   154 MBytes   430 Mbits/sec                                                                                                                                       
[  3]  6.0- 9.0 sec   150 MBytes   418 Mbits/sec                                                                                                                                       
[  3]  9.0-12.0 sec   157 MBytes   439 Mbits/sec                                                                                                                                       
[  3] 12.0-15.0 sec   148 MBytes   415 Mbits/sec                                                                                                                                       
[  3] 15.0-18.0 sec   152 MBytes   424 Mbits/sec                                                                                                                                       
[  3] 18.0-21.0 sec   153 MBytes   427 Mbits/sec                                                                                                                                       
[  3] 21.0-24.0 sec   143 MBytes   399 Mbits/sec                                                                                                                                       
[  3] 24.0-27.0 sec   160 MBytes   447 Mbits/sec                                                                                                                                       
[  3] 27.0-30.0 sec   150 MBytes   419 Mbits/sec                                                                                                                                       
[  3] 30.0-33.0 sec   150 MBytes   420 Mbits/sec                                                                                                                                       
[  3] 33.0-36.0 sec   151 MBytes   423 Mbits/sec                                                                                                                                       
[  3] 36.0-39.0 sec   151 MBytes   423 Mbits/sec                                                                                                                                       
[  3]  0.0-39.5 sec  1.95 GBytes   424 Mbits/sec

root@debian:~# iperf -s -i 3                                                                                                                                                           
------------------------------------------------------------                                                                                                                           
Server listening on TCP port 5001                                                                                                                                                      
TCP window size:  128 KByte (default)                                                                                                                                                  
------------------------------------------------------------                                                                                                                           
[  4] local 192.168.1.142 port 5001 connected with 192.168.1.1 port 36294                                                                                                              
[ ID] Interval       Transfer     Bandwidth                                                                                                                                            
[  4]  0.0- 3.0 sec  71.2 MBytes   199 Mbits/sec                                                                                                                                       
[  4]  3.0- 6.0 sec  77.6 MBytes   217 Mbits/sec                                                                                                                                       
[  4]  6.0- 9.0 sec  68.6 MBytes   192 Mbits/sec                                                                                                                                       
[  4]  9.0-12.0 sec  73.8 MBytes   206 Mbits/sec                                                                                                                                       
[  4] 12.0-15.0 sec  63.1 MBytes   177 Mbits/sec                                                                                                                                       
[  4] 15.0-18.0 sec  76.0 MBytes   213 Mbits/sec                                                                                                                                       
[  4] 18.0-21.0 sec  69.1 MBytes   193 Mbits/sec                                                                                                                                       
[  4] 21.0-24.0 sec  75.0 MBytes   210 Mbits/sec                                                                                                                                       
[  4] 24.0-27.0 sec  68.2 MBytes   191 Mbits/sec                                                                                                                                       
[  4] 27.0-30.0 sec  75.8 MBytes   212 Mbits/sec                                                                                                                                       
[  4] 30.0-33.0 sec  74.2 MBytes   208 Mbits/sec                                                                                                                                       
[  4] 33.0-36.0 sec  67.6 MBytes   189 Mbits/sec                                                                                                                                       
[  4] 36.0-39.0 sec  74.8 MBytes   209 Mbits/sec                                                                                                                                       
[  4] 39.0-42.0 sec  68.0 MBytes   190 Mbits/sec                                                                                                                                       
[  4] 42.0-45.0 sec  71.6 MBytes   200 Mbits/sec                                                                                                                                       
[  4] 45.0-48.0 sec  74.0 MBytes   207 Mbits/sec                                                                                                                                       
[  4] 48.0-51.0 sec  71.4 MBytes   200 Mbits/sec                                                                                                                                       
[  4] 51.0-54.0 sec  75.0 MBytes   210 Mbits/sec                                                                                                                                       
[  4] 54.0-57.0 sec  68.6 MBytes   192 Mbits/sec                                                                                                                                       
[  4] 57.0-60.0 sec  68.6 MBytes   192 Mbits/sec                                                                                                                                       
[  4] 60.0-63.0 sec  72.4 MBytes   203 Mbits/sec                                                                                                                                       
[  4] 63.0-66.0 sec  73.6 MBytes   206 Mbits/sec                                                                                                                                       
[  4] 66.0-69.0 sec  71.6 MBytes   200 Mbits/sec                                                                                                                                       
[  4] 69.0-72.0 sec  75.6 MBytes   211 Mbits/sec                                                                                                                                       
[  4] 72.0-75.0 sec  70.5 MBytes   197 Mbits/sec                                                                                                                                       
[  4] 75.0-78.0 sec  73.2 MBytes   205 Mbits/sec                                                                                                                                       
[  4] 78.0-81.0 sec  69.4 MBytes   194 Mbits/sec                                                                                                                                       
[  4]  0.0-83.3 sec  1.95 GBytes   201 Mbits/sec

I'm confusing about the 6171 switch's base address, my box must set to 0x0, but in the kernel document , it said that the 6171 switch used 0x10 base address.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: