Welcome! Log In Create A New Profile

Advanced

Debian on QiZhiTong 501mv2

Posted by wacke 
Re: Debian on QiZhiTong 501mv2
August 04, 2017 06:58AM
Hi wacke,

Indeed. As we discovered the Marvell DSA switch driver have changed substantially.

I've looked at the history and this DTS has also been updated to make its switch conform to the new binding in Jan 2017:
/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts

This is the latest kirkwood-mv88f6281gtw-ge.dts in kernel 4.12.x

&mdio {
	status = "okay";

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

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

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

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

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

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

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

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

&eth0 {
	status = "okay";

	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

So basically, we should remove the dsa node. It is unecessary to keep it and mark it disable.

And move the switch definition to the mdio node. This is what the new binding means. The DSA switches are now detected in mdio, not a separate dsa node as before.

This box has the mv88e6085, while we have mv88e6161. So the compatible field should show mv88e6161. And the register for the mv88e6161 should be 10. And the managing port 5 should be 1000, fixed link, full duplex. The ethernet port should be eth1 as in our DTS.

That's what I think. Did you try all of the above?

Please post your modified DTS so I can double check for you.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 04, 2017 11:00AM
Hi bodhi,

My modifed dts:
/*
 * Marvell RD88F6181 A Board descrition
 *
 * Andrew Lunn <andrew@lunn.ch>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 *
 * This file contains the definitions for the board with the A0 or
 * higher stepping of the SoC. The ethernet switch does not have a
 * "wan" port.
 */

/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "QiZhiTong 501M V2";
	compatible = "qizhitong,501m_v2","marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";

	chosen {
		bootargs = "console=ttyS0,9600n8 earlyprintk";
	};

	mbus {
		pcie-controller {
			status = "okay";

			pcie@1,0 {
				status = "okay";
			};

		};
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";

		};

		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};
		mvsdio@90000 {
			pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
			pinctrl-names = "default";
			status = "okay";
			cd-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
			/* No WP GPIO */
		};
	};
};

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x100000>;
		read-only;
	};

	partition@100000 {
		label = "kernel";
		reg = <0x0100000 0x400000>;
	};

	partition@500000 {
		label = "ubi";
		reg = <0x0500000 0x3b00000>;
	};
};

&mdio {
	status = "okay";

	switch@0 {
		compatible = "marvell,mv88e6161";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <10>;

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

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

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

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

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

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

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

&eth0 {
	status = "okay";	
	ethernet0-port@0 {
	};
};

&eth1 {
	status = "okay";	
	ethernet1-port@0 {
	};
};

Boot log of your debian new dts:
bootm: BOOTCMD2                        
SD found. Card desciption is:
Manufacturer:       0x1b, OEM "SM"
Product name:       "00000", revision 1.0
Serial number:      460975022
Manufacturing date: 7/2010
CRC:                0x00, b0 = 0

3911705 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.11.3-kirkwood-tld-2
   Created:      2017-08-04  14:45:30 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3911641 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.11.3-kirkwood-tld-2 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Tue Jun 6 17:01:17 PDT 2017
[    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: QiZhiTong 501M V2
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: rootdelay=1 root=/ noinitrd console=ttyS0,9600 rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 506316K/524288K available (8192K kernel code, 786K rwdata, 2016K rodata, 1024K init, 280K bss, 17972K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0dc49b4   ( 787 kB)
[    0.000000]        .bss : 0xc0dc49b4 - 0xc0e0acc8   ( 281 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 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.000451] Console: colour dummy device 80x30
[    0.000484] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090104] pid_max: default: 32768 minimum: 301
[    0.090313] Security Framework initialized
[    0.090434] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090453] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091302] CPU: Testing write buffer coherency: ok
[    0.092299] Setting up static identity map for 0x100000 - 0x100058
[    0.092530] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.096012] devtmpfs: initialized
[    0.100007] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.100032] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.100379] prandom: seed boundary self test passed
[    0.104129] prandom: 100 self tests passed
[    0.104141] pinctrl core: initialized pinctrl subsystem
[    0.105327] NET: Registered protocol family 16
[    0.106170] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.107698] cpuidle: using governor ladder
[    0.107759] cpuidle: using governor menu
[    0.108176] Feroceon L2: Enabling L2
[    0.108217] Feroceon L2: Cache support initialised.
[    0.108551] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.108655] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.113393] No ATAGs?
[    0.122175] vgaarb: loaded
[    0.122494] SCSI subsystem initialized
[    0.122966] usbcore: registered new interface driver usbfs
[    0.123040] usbcore: registered new interface driver hub
[    0.123126] usbcore: registered new device driver usb
[    0.124198] clocksource: Switched to clocksource orion_clocksource
[    0.216431] VFS: Disk quotas dquot_6.6.0
[    0.216511] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.227173] NET: Registered protocol family 2
[    0.227943] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.228020] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.228088] TCP: Hash tables configured (established 4096 bind 4096)
[    0.228247] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.228288] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.228508] NET: Registered protocol family 1
[    0.228952] RPC: Registered named UNIX socket transport module.
[    0.228965] RPC: Registered udp transport module.
[    0.228972] RPC: Registered tcp transport module.
[    0.228979] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.229387] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.230291] audit: initializing netlink subsys (disabled)
[    0.230735] Initialise system trusted keyrings
[    0.230865] audit: type=2000 audit(0.220:1): state=initialized audit_enabled=0 res=1
[    0.230936] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.231024] zbud: loaded
[    0.232017] NFS: Registering the id_resolver key type
[    0.232045] Key type id_resolver registered
[    0.232053] Key type id_legacy registered
[    0.232071] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.232080] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.232581] Key type cifs.spnego registered
[    0.232601] Key type cifs.idmap registered
[    0.232613] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.232873] fuse init (API version 7.26)
[    0.233259] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.233530] orangefs_init: module version upstream loaded
[    0.233542] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.554205] random: fast init done
[    4.342571] Key type asymmetric registered
[    4.342586] Asymmetric key parser 'x509' registered
[    4.342654] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.342665] io scheduler noop registered
[    4.342673] io scheduler deadline registered
[    4.342746] io scheduler cfq registered (default)
[    4.343978] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.345863] mv_xor f1060800.xor: Marvell shared XOR driver
[    4.404989] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.405224] mv_xor f1060900.xor: Marvell shared XOR driver
[    4.464989] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.465443] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.466632] console [ttyS0] disabled
[    4.466692] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[   11.588788] console [ttyS0] enabled
[   11.641190] loop: module loaded
[   11.679290] sata_mv f1080000.sata: slots 32 ports 1
[   11.739625] scsi host0: sata_mv
[   11.777447] ata1: SATA max UDMA/133 irq 32
[   11.827135] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[   11.903269] nand: ST Micro NAND 64MiB 3,3V 8-bit
[   11.958541] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   12.046146] Scanning device for bad blocks
[   12.225643] ata1: SATA link down (SStatus 0 SControl F300)
[   12.291931] Bad eraseblock 2455 at 0x00000265c000
[   12.435424] 3 ofpart partitions found on MTD device orion_nand
[   12.435429] Creating 3 MTD partitions on "orion_nand":
[   12.435445] 0x000000000000-0x000000100000 : "u-boot"
[   12.436718] 0x000000100000-0x000000500000 : "kernel"
[   12.438121] 0x000000500000-0x000004000000 : "ubi"
[   12.443449] libphy: Fixed MDIO Bus: probed
[   12.444418] libphy: orion_mdio_bus: probed
[   12.444697] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   12.446216] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[   12.446866] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[   12.446997] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   12.447020] ehci-pci: EHCI PCI platform driver
[   12.447086] ehci-orion: EHCI orion driver
[   12.447255] orion-ehci f1050000.ehci: EHCI Host Controller
[   12.447287] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   12.447470] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[   12.517397] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   12.517664] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   12.517673] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.517679] usb usb1: Product: EHCI Host Controller
[   12.517685] usb usb1: Manufacturer: Linux 4.11.3-kirkwood-tld-2 ehci_hcd
[   12.517690] usb usb1: SerialNumber: f1050000.ehci
[   12.518403] hub 1-0:1.0: USB hub found
[   12.518450] hub 1-0:1.0: 1 port detected
[   12.519302] mousedev: PS/2 mouse device common for all mice
[   12.519826] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[   12.519947] i2c /dev entries driver
[   12.520858] hidraw: raw HID events driver (C) Jiri Kosina
[   12.582778] drop_monitor: Initializing network drop monitor service
[   12.583017] NET: Registered protocol family 17
[   12.583192] Key type dns_resolver registered
[   12.583967] registered taskstats version 1
[   12.583974] Loading compiled-in X.509 certificates
[   12.584031] zswap: loaded using pool lzo/zbud
[   12.586942] Key type big_key registered
[   12.588762] Key type encrypted registered
[   12.590095] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[   12.945577] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   13.634215] usb 1-1: New USB device found, idVendor=04cc, idProduct=1520
[   13.634223] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   13.716154] hub 1-1:1.0: USB hub found
[   13.802728] hub 1-1:1.0: 2 ports detected
[   15.218300] Waiting 1 sec before mounting root device...
[   16.324251] Waiting for root device /...

Seems that the driver didn't detect the switch at all...
Re: Debian on QiZhiTong 501mv2
August 04, 2017 08:31PM
wacke,

Please try this revised DTS.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 2 time(s). Last edit at 08/04/2017 08:51PM by bodhi.
Attachments:
open | download - kirkwood-qizhitong_501m_v2.dts (2.4 KB)
Re: Debian on QiZhiTong 501mv2
August 06, 2017 08:27AM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>
> Please try this revised DTS.

Hi,bodhi

I've tried the your DTS,boot log:
bootm: BOOTCMD2                        
SD found. Card desciption is:
Manufacturer:       0x1b, OEM "SM"
Product name:       "00000", revision 1.0
Serial number:      460975022
Manufacturing date: 7/2010
CRC:                0x00, b0 = 0

3911729 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.11.3-kirkwood-tld-2
   Created:      2017-08-06  12:12:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3911665 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.11.3-kirkwood-tld-2 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Tue Jun 6 17:01:17 PDT 2017
[    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: QiZhiTong 501M V2
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: rootdelay=1 root=/ noinitrd console=ttyS0,9600
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 506316K/524288K available (8192K kernel code, 786K rwdata, 2016K rodata, 1024K init, 280K bss, 17972K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0dc49b4   ( 787 kB)
[    0.000000]        .bss : 0xc0dc49b4 - 0xc0e0acc8   ( 281 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000452] Console: colour dummy device 80x30
[    0.000486] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090105] pid_max: default: 32768 minimum: 301
[    0.090312] Security Framework initialized
[    0.090435] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090452] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091308] CPU: Testing write buffer coherency: ok
[    0.092304] Setting up static identity map for 0x100000 - 0x100058
[    0.092535] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.095998] devtmpfs: initialized
[    0.099962] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.099987] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.100343] prandom: seed boundary self test passed
[    0.104094] prandom: 100 self tests passed
[    0.104106] pinctrl core: initialized pinctrl subsystem
[    0.105294] NET: Registered protocol family 16
[    0.106114] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.107652] cpuidle: using governor ladder
[    0.107716] cpuidle: using governor menu
[    0.108108] Feroceon L2: Enabling L2
[    0.108150] Feroceon L2: Cache support initialised.
[    0.108484] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.108588] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.113320] No ATAGs?
[    0.122080] vgaarb: loaded
[    0.122397] SCSI subsystem initialized
[    0.122870] usbcore: registered new interface driver usbfs
[    0.122943] usbcore: registered new interface driver hub
[    0.123029] usbcore: registered new device driver usb
[    0.124079] clocksource: Switched to clocksource orion_clocksource
[    0.216299] VFS: Disk quotas dquot_6.6.0
[    0.216379] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.227038] NET: Registered protocol family 2
[    0.227812] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.227888] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.227956] TCP: Hash tables configured (established 4096 bind 4096)
[    0.228123] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.228163] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.228382] NET: Registered protocol family 1
[    0.228824] RPC: Registered named UNIX socket transport module.
[    0.228836] RPC: Registered udp transport module.
[    0.228844] RPC: Registered tcp transport module.
[    0.228851] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.229236] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.230142] audit: initializing netlink subsys (disabled)
[    0.230590] Initialise system trusted keyrings
[    0.230721] audit: type=2000 audit(0.220:1): state=initialized audit_enabled=0 res=1
[    0.230791] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.230882] zbud: loaded
[    0.231883] NFS: Registering the id_resolver key type
[    0.231911] Key type id_resolver registered
[    0.231920] Key type id_legacy registered
[    0.231937] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.231947] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.232447] Key type cifs.spnego registered
[    0.232467] Key type cifs.idmap registered
[    0.232480] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.232739] fuse init (API version 7.26)
[    0.233123] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.233393] orangefs_init: module version upstream loaded
[    0.233404] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.554086] random: fast init done
[    4.342499] Key type asymmetric registered
[    4.342513] Asymmetric key parser 'x509' registered
[    4.342579] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.342591] io scheduler noop registered
[    4.342599] io scheduler deadline registered
[    4.342671] io scheduler cfq registered (default)
[    4.343905] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.345791] mv_xor f1060800.xor: Marvell shared XOR driver
[    4.404871] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.405105] mv_xor f1060900.xor: Marvell shared XOR driver
[    4.464869] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.465322] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.466521] console [ttyS0] disabled
[    4.466582] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[   11.579226] console [ttyS0] enabled
[   11.631622] loop: module loaded
[   11.669721] sata_mv f1080000.sata: slots 32 ports 1
[   11.730071] scsi host0: sata_mv
[   11.767883] ata1: SATA max UDMA/133 irq 32
[   11.817576] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[   11.893705] nand: ST Micro NAND 64MiB 3,3V 8-bit
[   11.948978] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   12.036583] Scanning device for bad blocks
[   12.215523] ata1: SATA link down (SStatus 0 SControl F300)
[   12.282405] Bad eraseblock 2455 at 0x00000265c000
[   12.425931] 3 ofpart partitions found on MTD device orion_nand
[   12.425936] Creating 3 MTD partitions on "orion_nand":
[   12.425953] 0x000000000000-0x000000100000 : "u-boot"
[   12.427227] 0x000000100000-0x000000500000 : "kernel"
[   12.428632] 0x000000500000-0x000004000000 : "ubi"
[   12.433946] libphy: Fixed MDIO Bus: probed
[   12.434901] libphy: orion_mdio_bus: probed
[   12.435174] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   12.436688] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[   12.437340] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[   12.437471] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   12.437493] ehci-pci: EHCI PCI platform driver
[   12.437559] ehci-orion: EHCI orion driver
[   12.437731] orion-ehci f1050000.ehci: EHCI Host Controller
[   12.437762] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   12.437951] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[   12.507936] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   12.508202] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   12.508210] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.508216] usb usb1: Product: EHCI Host Controller
[   12.508222] usb usb1: Manufacturer: Linux 4.11.3-kirkwood-tld-2 ehci_hcd
[   12.508228] usb usb1: SerialNumber: f1050000.ehci
[   12.508936] hub 1-0:1.0: USB hub found
[   12.508985] hub 1-0:1.0: 1 port detected
[   12.509835] mousedev: PS/2 mouse device common for all mice
[   12.510360] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[   12.510480] i2c /dev entries driver
[   12.511383] hidraw: raw HID events driver (C) Jiri Kosina
[   12.511700] drop_monitor: Initializing network drop monitor service
[   12.511939] NET: Registered protocol family 17
[   12.512112] Key type dns_resolver registered
[   12.512869] registered taskstats version 1
[   12.512876] Loading compiled-in X.509 certificates
[   12.512932] zswap: loaded using pool lzo/zbud
[   12.515853] Key type big_key registered
[   12.517676] Key type encrypted registered
[   12.519002] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[   12.936119] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   13.624636] usb 1-1: New USB device found, idVendor=04cc, idProduct=1520
[   13.624644] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   13.706600] hub 1-1:1.0: USB hub found
[   13.793166] hub 1-1:1.0: 2 ports detected
[   15.208743] Waiting 1 sec before mounting root device...

the 88e6161 switch still not working....
Re: Debian on QiZhiTong 501mv2
August 06, 2017 09:18PM
Re: Debian on QiZhiTong 501mv2
August 06, 2017 10:42PM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>
> I looked at the new binding syntax, and apparently
> we dont have enough in the DTS yet.

Hi bodhi,

What do we need to add to the DTS?Or can we just port the driver from kernel 4.4.x to 4.9.x above?
Re: Debian on QiZhiTong 501mv2
August 07, 2017 02:20AM
wacke,

> Or can we just port the driver from kernel 4.4.x to 4.9.x above?

Definitely not! the 6161 switch is supported in the new kernel. I'd doubt there is any problem with the driver. Just that we are not up to speed on this new DSA binding so it does not work.

I think I might be wrong in removing the dsa node! We should put that back, and add the status = "disabled" in the node. I think without the trigger for DSA switch parsing of the DTS nodes, the switch logic was not applied, so it did not got added to the mdio.

I looked at the latest DTS again. And nobody has removed their legacy binding, they just disable it . So I'm guessing it must serve a purpose (i.e. how else the kernel whould know there is a DSA switch with the new binding if there is no DSA syntax?). Is the "switch" node syntax is all we need? I am not sure. The DSA Documentation is not clear.

I think I'm going to dust off my Linksys EA4500 and do some DSA testing again! This box has the 6171 switch.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 08/07/2017 06:24AM by bodhi.
Re: Debian on QiZhiTong 501mv2
August 07, 2017 11:05AM
Hi bodhi,
I added the mvsw61xx node to the DTS:
/*
 * Marvell RD88F6181 A Board descrition
 *
 * Andrew Lunn <andrew@lunn.ch>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 *
 * This file contains the definitions for the board with the A0 or
 * higher stepping of the SoC. The ethernet switch does not have a
 * "wan" port.
 */

/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "QiZhiTong 501M V2";
	compatible = "qizhitong,501m_v2","marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";

	chosen {
		bootargs = "console=ttyS0,9600n8 earlyprintk";
	};

	mbus {
		pcie-controller {
			status = "okay";

			pcie@1,0 {
				status = "okay";
			};

		};
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";

		};

		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};
		mvsdio@90000 {
			pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
			pinctrl-names = "default";
			status = "okay";
			cd-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
			/* No WP GPIO */
		};
	};
	
	mvsw61xx {
		compatible = "marvell,88e6161";
		status = "okay";
		reg = <0x10>;
		is-indirect;

		mii-bus = <&mdio>;
		ethernet = <&eth1port>;
	};
};

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x100000>;
		read-only;
	};

	partition@100000 {
		label = "kernel";
		reg = <0x0100000 0x400000>;
	};

	partition@500000 {
		label = "ubi";
		reg = <0x0500000 0x3b00000>;
	};
};

&mdio {
	status = "okay";

	switch@0 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <10 0>;
		status = "okay";

		ports {

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

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

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

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

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

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

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

&eth0 {
	status = "okay";	
	ethernet0-port@0 {
	};
};

&eth1 {
	status = "okay";	
	ethernet1-port@0 {
	};
};

boot log:
bootm: BOOTCMD2                        
SD found. Card desciption is:
Manufacturer:       0x1b, OEM "SM"
Product name:       "00000", revision 1.0
Serial number:      460975022
Manufacturing date: 7/2010
CRC:                0x00, b0 = 0

3911909 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.11.3-kirkwood-tld-2
   Created:      2017-08-07  14:57:47 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3911845 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.11.3-kirkwood-tld-2 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Tue Jun 6 17:01:17 PDT 2017
[    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: QiZhiTong 501M V2
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: rootdelay=1 root=/ noinitrd console=ttyS0,9600
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 506316K/524288K available (8192K kernel code, 786K rwdata, 2016K rodata, 1024K init, 280K bss, 17972K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0dc49b4   ( 787 kB)
[    0.000000]        .bss : 0xc0dc49b4 - 0xc0e0acc8   ( 281 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000447] Console: colour dummy device 80x30
[    0.000480] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090105] pid_max: default: 32768 minimum: 301
[    0.090312] Security Framework initialized
[    0.090433] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090451] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091299] CPU: Testing write buffer coherency: ok
[    0.092293] Setting up static identity map for 0x100000 - 0x100058
[    0.092524] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.096022] devtmpfs: initialized
[    0.100042] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.100119] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.100419] prandom: seed boundary self test passed
[    0.104169] prandom: 100 self tests passed
[    0.104181] pinctrl core: initialized pinctrl subsystem
[    0.105383] NET: Registered protocol family 16
[    0.106200] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.107708] cpuidle: using governor ladder
[    0.107770] cpuidle: using governor menu
[    0.108166] Feroceon L2: Enabling L2
[    0.108208] Feroceon L2: Cache support initialised.
[    0.108543] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.108647] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.113501] No ATAGs?
[    0.122317] vgaarb: loaded
[    0.122642] SCSI subsystem initialized
[    0.123104] usbcore: registered new interface driver usbfs
[    0.123179] usbcore: registered new interface driver hub
[    0.123267] usbcore: registered new device driver usb
[    0.124318] clocksource: Switched to clocksource orion_clocksource
[    0.216376] VFS: Disk quotas dquot_6.6.0
[    0.216453] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.227125] NET: Registered protocol family 2
[    0.227894] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.227971] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.228038] TCP: Hash tables configured (established 4096 bind 4096)
[    0.228216] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.228246] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.228462] NET: Registered protocol family 1
[    0.228909] RPC: Registered named UNIX socket transport module.
[    0.228921] RPC: Registered udp transport module.
[    0.228928] RPC: Registered tcp transport module.
[    0.228935] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.229320] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.230243] audit: initializing netlink subsys (disabled)
[    0.230698] Initialise system trusted keyrings
[    0.230842] audit: type=2000 audit(0.220:1): state=initialized audit_enabled=0 res=1
[    0.230913] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.231001] zbud: loaded
[    0.231991] NFS: Registering the id_resolver key type
[    0.232015] Key type id_resolver registered
[    0.232024] Key type id_legacy registered
[    0.232041] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.232050] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.232548] Key type cifs.spnego registered
[    0.232568] Key type cifs.idmap registered
[    0.232581] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.232842] fuse init (API version 7.26)
[    0.233220] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.233494] orangefs_init: module version upstream loaded
[    0.233506] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.554326] random: fast init done
[    4.342914] Key type asymmetric registered
[    4.342930] Asymmetric key parser 'x509' registered
[    4.342997] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.343008] io scheduler noop registered
[    4.343017] io scheduler deadline registered
[    4.343091] io scheduler cfq registered (default)
[    4.344434] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.346222] mv_xor f1060800.xor: Marvell shared XOR driver
[    4.405113] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.405340] mv_xor f1060900.xor: Marvell shared XOR driver
[    4.465108] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.465560] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.466769] console [ttyS0] disabled
[    4.466830] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[   11.579540] console [ttyS0] enabled
[   11.631945] loop: module loaded
[   11.670049] sata_mv f1080000.sata: slots 32 ports 1
[   11.730341] scsi host0: sata_mv
[   11.768208] ata1: SATA max UDMA/133 irq 32
[   11.817883] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[   11.894019] nand: ST Micro NAND 64MiB 3,3V 8-bit
[   11.949292] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   12.036898] Scanning device for bad blocks
[   12.215764] ata1: SATA link down (SStatus 0 SControl F300)
[   12.282668] Bad eraseblock 2455 at 0x00000265c000
[   12.426171] 3 ofpart partitions found on MTD device orion_nand
[   12.426176] Creating 3 MTD partitions on "orion_nand":
[   12.426192] 0x000000000000-0x000000100000 : "u-boot"
[   12.427467] 0x000000100000-0x000000500000 : "kernel"
[   12.428881] 0x000000500000-0x000004000000 : "ubi"
[   12.434193] libphy: Fixed MDIO Bus: probed
[   12.435165] libphy: orion_mdio_bus: probed
[   12.685720] mv88e6085 f1072004.mdio-bus-mii:0a: switch 0x161 detected: Marvell 88E6161, revision 2
[   12.981131] libphy: mv88e6xxx SMI: probed
[   13.029846] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   13.112843] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[   13.217916] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[   13.322283] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.400470] ehci-pci: EHCI PCI platform driver
[   13.453739] ehci-orion: EHCI orion driver
[   13.501863] orion-ehci f1050000.ehci: EHCI Host Controller
[   13.567553] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   13.659479] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[   13.754352] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   13.826474] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   13.907818] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.994372] usb usb1: Product: EHCI Host Controller
[   14.052803] usb usb1: Manufacturer: Linux 4.11.3-kirkwood-tld-2 ehci_hcd
[   14.133107] usb usb1: SerialNumber: f1050000.ehci
[   14.190112] hub 1-0:1.0: USB hub found
[   14.235044] hub 1-0:1.0: 1 port detected
[   14.282780] mousedev: PS/2 mouse device common for all mice
[   14.350114] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[   14.432719] i2c /dev entries driver
[   14.475409] hidraw: raw HID events driver (C) Jiri Kosina
[   14.540492] drop_monitor: Initializing network drop monitor service
[   14.616029] NET: Registered protocol family 17
[   14.669454] Key type dns_resolver registered
[   14.720597] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   14.801708] registered taskstats version 1
[   14.850801] Loading compiled-in X.509 certificates
[   14.908330] zswap: loaded using pool lzo/zbud
[   14.963149] Key type big_key registered
[   15.011122] Key type encrypted registered
[   15.060657] mv88e6085 f1072004.mdio-bus-mii:0a: switch 0x161 detected: Marvell 88E6161, revision 2
[   15.168637] usb 1-1: New USB device found, idVendor=04cc, idProduct=1520
[   15.249040] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   15.335530] hub 1-1:1.0: USB hub found
[   15.380620] hub 1-1:1.0: 2 ports detected
[   15.460890] libphy: mv88e6xxx SMI: probed
[   15.508940] DSA: switch 0 0 parsed
[   15.549792] DSA: tree 0 parsed
[   15.732097] mv88e6085 f1072004.mdio-bus-mii:0a lan1: no phy at 0
[   15.804063] mv88e6085 f1072004.mdio-bus-mii:0a lan1: failed to connect to port 0: -19
[   15.897895] mv643xx_eth_port mv643xx_eth_port.1 eth1: error -19 setting up slave phy
[   16.014376] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 0: -19
[   16.100448] mv88e6085 f1072004.mdio-bus-mii:0a lan2: no phy at 1
[   16.172395] mv88e6085 f1072004.mdio-bus-mii:0a lan2: failed to connect to port 1: -19
[   16.266226] mv643xx_eth_port mv643xx_eth_port.1 eth1: error -19 setting up slave phy
[   16.384372] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 1: -19
[   16.470380] mv88e6085 f1072004.mdio-bus-mii:0a lan3: no phy at 2
[   16.542368] mv88e6085 f1072004.mdio-bus-mii:0a lan3: failed to connect to port 2: -19
[   16.636202] mv643xx_eth_port mv643xx_eth_port.1 eth1: error -19 setting up slave phy
[   16.754371] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 2: -19
[   16.840454] mv88e6085 f1072004.mdio-bus-mii:0a lan4: no phy at 3
[   16.912448] mv88e6085 f1072004.mdio-bus-mii:0a lan4: failed to connect to port 3: -19
[   17.006283] mv643xx_eth_port mv643xx_eth_port.1 eth1: error -19 setting up slave phy
[   17.124380] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 3: -19
[   17.210432] mv88e6085 f1072004.mdio-bus-mii:0a aux: no phy at 4
[   17.281381] mv88e6085 f1072004.mdio-bus-mii:0a aux: failed to connect to port 4: -19
[   17.374176] mv643xx_eth_port mv643xx_eth_port.1 eth1: error -19 setting up slave phy
[   17.494372] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 4: -19
[   17.583333] rtc-mv f1010300.rtc: setting system clock to 2000-02-13 11:41:26 UTC (950442086)
[   17.684835] Waiting 1 sec before mounting root device...

the driver found the switch,but same error as before .....
Re: Debian on QiZhiTong 501mv2
August 11, 2017 08:54PM
Hi wacke,

> I added the mvsw61xx node to the DTS.

That would not be consistent with the new binding.

I've revised the DTS. Let's just post the technical content here while we work on this (it's small ennough).

Using info we had before in your working DTS. My assumption is

- the management port (cpu) is connected to eth0 with no PHY.
- In this box, eth1 is for the separate connection (it is not connected to the switch). So we leave it active.
- If you don't see the switch detected during kernel booting, then this will need to be looked at:
compatible = "marvell,mv88e6161";

DTS code:

/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "QiZhiTong 501M V2";
	compatible = "qizhitong,501m_v2","marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";

	chosen {
		bootargs = "console=ttyS0,9600n8 earlyprintk";
	};

	mbus {
		pcie-controller {
			status = "okay";

			pcie@1,0 {
				status = "okay";
			};

		};
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";

		};

		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};
		mvsdio@90000 {
			pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
			pinctrl-names = "default";
			status = "okay";
			cd-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
			/* No WP GPIO */
		};
	};

	dsa {
		status = "disabled";

		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;
		
		dsa,ethernet = <&eth0port>;
		dsa,mii-bus = <&mdio>;

		switch@10,0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <10 0>;	/* MDIO address 16, switch 0 in tree */
			
			port@0 {
				reg = <0>;
				label = "lan1";
			};

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

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

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

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

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

};

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x100000>;
		read-only;
	};

	partition@100000 {
		label = "kernel";
		reg = <0x0100000 0x400000>;
	};

	partition@500000 {
		label = "ubi";
		reg = <0x0500000 0x3b00000>;
	};
};

&mdio {
	status = "okay";

	switch@0 {
		compatible = "marvell,mv88e6161";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <10>;

		ports {

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

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

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

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

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

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

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

&eth0 {
	status = "okay";	
	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

&eth1 {
	status = "okay";	
	ethernet1-port@0 {
	};
};

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 08/11/2017 10:16PM by bodhi.
Re: Debian on QiZhiTong 501mv2
August 12, 2017 09:28AM
Hi bodhi,

I've tried your new DTS,the driver still not found the 88e6161 switch...

boot log:

                                                                                                                             

Starting kernel ...                                                                                                                                                                    

Uncompressing Linux... done, booting the kernel.                                                                                                                                       
[    0.000000] Booting Linux on physical CPU 0x0                                                                                                                                       
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017                                     
[    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: QiZhiTong 501M V2                                                                                                                               
[    0.000000] Memory policy: Data cache writeback                                                                                                                                     
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048                                                                                             
[    0.000000] Kernel command line: rootdelay=1 root=/ noinitrd console=ttyS0,9600                                                                                                     
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)                                                                                                                     
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)                                                                                                         
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)                                                                                                          
[    0.000000] Memory: 506352K/524288K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 17936K reserved, 0K cma-reserved)                                
[    0.000000] Virtual kernel memory layout:                                                                                                                                           
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)                                                                                                                       
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)                                                                                                                       
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)                                                                                                                       
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)                                                                                                                       
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)                                                                                                                       
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)                                                                                                                       
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)                                                                                                                       
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)                                                                                                                       
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)                                                                                                                       
[    0.000000] Preemptible hierarchical RCU implementation.                                                                                                                            
[    0.000000] NR_IRQS:16 nr_irqs:16 16                                                                                                                                                
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns                                                                     
[    0.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns                                                                                               
[    0.000038] Switching to timer-based delay loop, resolution 5ns                                                                                                                     
[    0.000473] Console: colour dummy device 80x30                                                                                                                                      
[    0.000506] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)                                                                
[    0.000527] pid_max: default: 32768 minimum: 301                                                                                                                                    
[    0.000734] Security Framework initialized                                                                                                                                          
[    0.000858] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)                                                                                                             
[    0.000876] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)                                                                                                        
[    0.001711] CPU: Testing write buffer coherency: ok                                                                                                                                 
[    0.002717] Setting up static identity map for 0x100000 - 0x100058                                                                                                                  
[    0.002950] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2                                                                                                                              
[    0.006027] devtmpfs: initialized                                                                                                                                                   
[    0.009892] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns                                                                        
[    0.009916] futex hash table entries: 256 (order: -1, 3072 bytes)                                                                                                                   
[    0.010343] prandom: seed boundary self test passed                                                                                                                                 
[    0.014093] prandom: 100 self tests passed                                                                                                                                          
[    0.014104] pinctrl core: initialized pinctrl subsystem                                                                                                                             
[    0.015253] NET: Registered protocol family 16                                                                                                                                      
[    0.016078] DMA: preallocated 256 KiB pool for atomic coherent allocations                                                                                                          
[    0.017581] cpuidle: using governor ladder                                                                                                                                          
[    0.017647] cpuidle: using governor menu                                                                                                                                            
[    0.018039] Feroceon L2: Enabling L2                                                                                                                                                
[    0.018081] Feroceon L2: Cache support initialised.                                                                                                                                 
[    0.018424] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set                                                                 
[    0.018529] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set                                                                 
[    0.023168] No ATAGs?                                                                                                                                                               
[    0.032047] vgaarb: loaded                                                                                                                                                          
[    0.032367] SCSI subsystem initialized                                                                                                                                              
[    0.032845] usbcore: registered new interface driver usbfs                                                                                                                          
[    0.032920] usbcore: registered new interface driver hub                                                                                                                            
[    0.033006] usbcore: registered new device driver usb                                                                                                                               
[    0.034097] clocksource: Switched to clocksource orion_clocksource                                                                                                                  
[    0.126894] VFS: Disk quotas dquot_6.6.0                                                                                                                                            
[    0.126976] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)                                                                                                         
[    0.137677] NET: Registered protocol family 2                                                                                                                                       
[    0.138460] TCP established hash table entries: 4096 (order: 2, 16384 bytes)                                                                                                        
[    0.138537] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)                                                                                                               
[    0.138600] TCP: Hash tables configured (established 4096 bind 4096)                                                                                                                
[    0.138769] UDP hash table entries: 256 (order: 0, 4096 bytes)                                                                                                                      
[    0.138798] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)                                                                                                                 
[    0.139013] NET: Registered protocol family 1                                                                                                                                       
[    0.139450] RPC: Registered named UNIX socket transport module.                                                                                                                     
[    0.139463] RPC: Registered udp transport module.                                                                                                                                   
[    0.139471] RPC: Registered tcp transport module.                                                                                                                                   
[    0.139478] RPC: Registered tcp NFSv4.1 backchannel transport module.                                                                                                               
[    0.139820] NetWinder Floating Point Emulator V0.97 (double precision)                                                                                                              
[    0.140733] audit: initializing netlink subsys (disabled)                                                                                                                           
[    0.141188] Initialise system trusted keyrings                                                                                                                                      
[    0.141240] Key type blacklist registered                                                                                                                                           
[    0.141349] audit: type=2000 audit(0.136:1): state=initialized audit_enabled=0 res=1                                                                                                
[    0.141438] workingset: timestamp_bits=30 max_order=17 bucket_order=0                                                                                                               
[    0.141503] zbud: loaded                                                                                                                                                            
[    0.142523] NFS: Registering the id_resolver key type                                                                                                                               
[    0.142551] Key type id_resolver registered                                                                                                                                         
[    0.142560] Key type id_legacy registered                                                                                                                                           
[    0.142577] nfs4filelayout_init: NFSv4 File Layout Driver Registering...                                                                                                            
[    0.142587] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).                                                                                                                
[    0.142805] jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.                                                                                                        
[    0.142996] fuse init (API version 7.26)                                                                                                                                            
[    0.143381] orangefs_debugfs_init: called with debug mask: :none: :0:                                                                                                               
[    0.143644] orangefs_init: module version upstream loaded                                                                                                                           
[    0.143655] SGI XFS with ACLs, security attributes, realtime, no debug enabled                                                                                                      
[    2.554106] random: fast init done                                                                                                                                                  
[    6.015876] Key type asymmetric registered                                                                                                                                          
[    6.015891] Asymmetric key parser 'x509' registered                                                                                                                                 
[    6.015962] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)                                                                                                    
[    6.015974] io scheduler noop registered                                                                                                                                            
[    6.015982] io scheduler deadline registered                                                                                                                                        
[    6.016057] io scheduler cfq registered (default)                                                                                                                                   
[    6.017324] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver                                                                                                     
[    6.019057] mv_xor f1060800.xor: Marvell shared XOR driver                                                                                                                          
[    6.074886] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )                                                                                                  
[    6.075130] mv_xor f1060900.xor: Marvell shared XOR driver                                                                                                                          
[    6.134884] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )                                                                                                  
[    6.135320] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled                                                                                                                
[    6.136553] console [ttyS0] disabled                                                                                                                                                
[    6.136617] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A                                                                                  
[   13.256499] console [ttyS0] enabled                                                                                                                                                 
[   13.308890] loop: module loaded                                                                                                                                                     
[   13.347072] sata_mv f1080000.sata: slots 32 ports 1                                                                                                                                 
[   13.407357] scsi host0: sata_mv                                                                                                                                                     
[   13.445162] ata1: SATA max UDMA/133 irq 32                                                                                                                                          
[   13.494808] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76                                                                                                                
[   13.570975] nand: ST Micro NAND 64MiB 3,3V 8-bit                                                                                                                                    
[   13.626246] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16                                                                                                     
[   13.713849] Scanning device for bad blocks                                                                                                                                          
[   13.892396] Bad eraseblock 2455 at 0x00000265c000                                                                                                                                   
[   13.948741] ata1: SATA link down (SStatus 0 SControl F300)                                                                                                                          
[   14.100706] 3 ofpart partitions found on MTD device orion_nand                                                                                                                      
[   14.170585] Creating 3 MTD partitions on "orion_nand":                                                                                                                              
[   14.232153] 0x000000000000-0x000000100000 : "u-boot"                                                                                                                                
[   14.292910] 0x000000100000-0x000000500000 : "kernel"                                                                                                                                
[   14.353777] 0x000000500000-0x000004000000 : "ubi"                                                                                                                                   
[   14.415604] libphy: Fixed MDIO Bus: probed                                                                                                                                          
[   14.465454] libphy: orion_mdio_bus: probed                                                                                                                                          
[   14.514824] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4                                                                                                           
[   14.597754] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25                                                                                     
[   14.702698] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26                                                                                     
[   14.807033] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                                                                                                              
[   14.885248] ehci-pci: EHCI PCI platform driver                                                                                                                                      
[   14.938516] ehci-orion: EHCI orion driver                                                                                                                                           
[   14.986654] orion-ehci f1050000.ehci: EHCI Host Controller                                                                                                                          
[   15.052454] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1                                                                                                 
[   15.144449] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000                                                                                                                     
[   15.244131] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00                                                                                                                    
[   15.316264] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002                                                                                                           
[   15.397600] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1                                                                                                      
[   15.484148] usb usb1: Product: EHCI Host Controller                                                                                                                                 
[   15.542581] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd                                                                                                            
[   15.622887] usb usb1: SerialNumber: f1050000.ehci                                                                                                                                   
[   15.679871] hub 1-0:1.0: USB hub found                                                                                                                                              
[   15.724829] hub 1-0:1.0: 1 port detected                                                                                                                                            
[   15.772339] usbcore: registered new interface driver usb-storage                                                                                                                    
[   15.844701] mousedev: PS/2 mouse device common for all mice                                                                                                                         
[   15.912087] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0                                                                                                          
[   15.994587] i2c /dev entries driver                                                                                                                                                 
[   16.037373] hidraw: raw HID events driver (C) Jiri Kosina                                                                                                                           
[   16.102519] drop_monitor: Initializing network drop monitor service                                                                                                                 
[   16.178029] NET: Registered protocol family 17                                                                                                                                      
[   16.231273] Key type dns_resolver registered                                                                                                                                        
[   16.282455] usb 1-1: new high-speed USB device number 2 using orion-ehci                                                                                                            
[   16.363562] registered taskstats version 1                                                                                                                                          
[   16.412657] Loading compiled-in X.509 certificates                                                                                                                                  
[   16.470194] zswap: loaded using pool lzo/zbud                                                                                                                                       
[   16.525718] Key type big_key registered                                                                                                                                             
[   16.573704] Key type encrypted registered                                                                                                                                           
[   16.623048] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)                                                                                        
[   16.724721] usb 1-1: New USB device found, idVendor=04cc, idProduct=1520                                                                                                            
[   16.805214] Waiting 1 sec before mounting root device...                                                                                                                            
[   16.868916] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0                                                                                                       
[   16.955151] hub 1-1:1.0: USB hub found                                                                                                                                              
[   17.000214] hub 1-1:1.0: 2 ports detected



Edited 1 time(s). Last edit at 08/12/2017 09:37AM by wacke.
Re: Debian on QiZhiTong 501mv2
August 12, 2017 05:48PM
wacke,

It should find the switch right after this

[
14.415604] libphy: Fixed MDIO Bus: probed                                                                                                                                          
[   14.465454] libphy: orion_mdio_bus: probed                                                                                                                                          
[   14.514824] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4                                                                                                           
[   14.597754] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25                                                                                     
[   14.702698] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26

It might be related to this 6161 switch detection problem. There is one thing I still have not figured out on the Linksys EA4500 (the switch is 88E6171). But in mainline DTS, it was coded as compatible to MV88E6085.

&mdio {
	status = "okay";

	switch@10 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <16>;

Detected in dmesg:
[    7.580854] libphy: Fixed MDIO Bus: probed
[    7.585779] libphy: orion_mdio_bus: probed
[    7.590170] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.598122] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address

.......

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

The DSA driver has been restructured so much since last time I looked that I am still reading the code to see why MV88E6085 works, but not when I use 88E6171 explicitly in the DTS. I might have to add debug printk in the code to see how it was probed.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 12, 2017 06:06PM
wacke,


Duh! this is what it looks like in the code. Apparently the module name for this box should be mv88e6085 (therefore the compatible name).

Beat me why they named it that way :) the only reason I can think of is that is the starting point in the enumeration of switch IDs, and mv88e6190 is another starting point for the 2nd group. Which is not a good reason for the naming convention, if that's the intent. Just a couple more lines of code would make this much more self documented, and more robust.

static const struct of_device_id mv88e6xxx_of_match[] = {
        {
                .compatible = "marvell,mv88e6085",
                .data = &mv88e6xxx_table[MV88E6085],
        },
        {
                .compatible = "marvell,mv88e6190",
                .data = &mv88e6xxx_table[MV88E6190],
        },
        { /* sentinel */ },
};


MODULE_DEVICE_TABLE(of, mv88e6xxx_of_match);

static struct mdio_driver mv88e6xxx_driver = {
        .probe  = mv88e6xxx_probe,
        .remove = mv88e6xxx_remove,
        .mdiodrv.driver = {
                .name = "mv88e6085",
                .of_match_table = mv88e6xxx_of_match,
        },
};

static int __init mv88e6xxx_init(void)
{
        register_switch_driver(&mv88e6xxx_switch_drv);
        return mdio_driver_register(&mv88e6xxx_driver);
}
module_init(mv88e6xxx_init);

static void __exit mv88e6xxx_cleanup(void)
{
        mdio_driver_unregister(&mv88e6xxx_driver);
        unregister_switch_driver(&mv88e6xxx_switch_drv);
}
module_exit(mv88e6xxx_cleanup);


So try this:


/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "QiZhiTong 501M V2";
	compatible = "qizhitong,501m_v2","marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";

	chosen {
		bootargs = "console=ttyS0,9600n8 earlyprintk";
	};

	mbus {
		pcie-controller {
			status = "okay";

			pcie@1,0 {
				status = "okay";
			};

		};
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";

		};

		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};
		mvsdio@90000 {
			pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
			pinctrl-names = "default";
			status = "okay";
			cd-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
			/* No WP GPIO */
		};
	};

	dsa {
		status = "disabled";

		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;
		
		dsa,ethernet = <&eth0port>;
		dsa,mii-bus = <&mdio>;

		switch@10,0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <10 0>;	/* MDIO address 16, switch 0 in tree */
			
			port@0 {
				reg = <0>;
				label = "lan1";
			};

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

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

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

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

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

};

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x100000>;
		read-only;
	};

	partition@100000 {
		label = "kernel";
		reg = <0x0100000 0x400000>;
	};

	partition@500000 {
		label = "ubi";
		reg = <0x0500000 0x3b00000>;
	};
};

&mdio {
	status = "okay";

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

		ports {

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

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

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

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

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

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

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

&eth0 {
	status = "okay";	
	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

&eth1 {
	status = "okay";	
	ethernet1-port@0 {
	};
};

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 4 time(s). Last edit at 08/12/2017 08:28PM by bodhi.
Re: Debian on QiZhiTong 501mv2
August 13, 2017 09:10AM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>
>
> Duh! this is what it looks like in the code. Appar
> ently the module name for this box should be mv88e
> 6085 (therefore the compatible name).
>
> Beat me why they named it that way :) the only rea
> son I can think of is that is the starting point i
> n the enumeration of switch IDs, and mv88e6190 is
> another starting point for the 2nd group. Which is
> not a good reason for the naming convention, if th
> at's the intent. Just a couple more lines of code
> would make this much more self documented, and mor
> e robust.
>
> So try this:
>
>

Hi,bodhi
I've tried your lateset DTS,and the boot log:
Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    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: QiZhiTong 501M V2
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: rootdelay=1 root=/ initrd=/boot/uInitrd console=ttyS0,9600
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 506352K/524288K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 17936K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000037] Switching to timer-based delay loop, resolution 5ns
[    0.000471] Console: colour dummy device 80x30
[    0.000504] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000526] pid_max: default: 32768 minimum: 301
[    0.000733] Security Framework initialized
[    0.000857] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000874] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001718] CPU: Testing write buffer coherency: ok
[    0.002725] Setting up static identity map for 0x100000 - 0x100058
[    0.002957] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.006064] devtmpfs: initialized
[    0.009926] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009951] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.010380] prandom: seed boundary self test passed
[    0.014131] prandom: 100 self tests passed
[    0.014142] pinctrl core: initialized pinctrl subsystem
[    0.015289] NET: Registered protocol family 16
[    0.016112] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.017627] cpuidle: using governor ladder
[    0.017690] cpuidle: using governor menu
[    0.018080] Feroceon L2: Enabling L2
[    0.018122] Feroceon L2: Cache support initialised.
[    0.018466] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.018571] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.023204] No ATAGs?
[    0.032096] vgaarb: loaded
[    0.032417] SCSI subsystem initialized
[    0.032887] usbcore: registered new interface driver usbfs
[    0.032963] usbcore: registered new interface driver hub
[    0.033050] usbcore: registered new device driver usb
[    0.034143] clocksource: Switched to clocksource orion_clocksource
[    0.126942] VFS: Disk quotas dquot_6.6.0
[    0.127023] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.137720] NET: Registered protocol family 2
[    0.138507] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.138584] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.138648] TCP: Hash tables configured (established 4096 bind 4096)
[    0.138818] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.138847] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.139058] NET: Registered protocol family 1
[    0.139498] RPC: Registered named UNIX socket transport module.
[    0.139510] RPC: Registered udp transport module.
[    0.139517] RPC: Registered tcp transport module.
[    0.139525] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.139863] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.140773] audit: initializing netlink subsys (disabled)
[    0.141236] Initialise system trusted keyrings
[    0.141289] Key type blacklist registered
[    0.141394] audit: type=2000 audit(0.136:1): state=initialized audit_enabled=0 res=1
[    0.141481] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.141545] zbud: loaded
[    0.142567] NFS: Registering the id_resolver key type
[    0.142596] Key type id_resolver registered
[    0.142604] Key type id_legacy registered
[    0.142621] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.142631] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.142851] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.143041] fuse init (API version 7.26)
[    0.143429] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.143692] orangefs_init: module version upstream loaded
[    0.143703] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.554153] random: fast init done
[    6.015937] Key type asymmetric registered
[    6.015953] Asymmetric key parser 'x509' registered
[    6.016022] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    6.016034] io scheduler noop registered
[    6.016042] io scheduler deadline registered
[    6.016115] io scheduler cfq registered (default)
[    6.017388] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.019127] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.074933] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.075178] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.134927] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.135365] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.136595] console [ttyS0] disabled
[    6.136658] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[   13.269052] console [ttyS0] enabled
[   13.321461] loop: module loaded
[   13.359603] sata_mv f1080000.sata: slots 32 ports 1
[   13.419888] scsi host0: sata_mv
[   13.457697] ata1: SATA max UDMA/133 irq 32
[   13.507347] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[   13.583508] nand: ST Micro NAND 64MiB 3,3V 8-bit
[   13.638781] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   13.726382] Scanning device for bad blocks
[   13.904945] Bad eraseblock 2455 at 0x00000265c000
[   13.961276] ata1: SATA link down (SStatus 0 SControl F300)
[   14.113221] 3 ofpart partitions found on MTD device orion_nand
[   14.183119] Creating 3 MTD partitions on "orion_nand":
[   14.244687] 0x000000000000-0x000000100000 : "u-boot"
[   14.305446] 0x000000100000-0x000000500000 : "kernel"
[   14.366314] 0x000000500000-0x000004000000 : "ubi"
[   14.428126] libphy: Fixed MDIO Bus: probed
[   14.477993] libphy: orion_mdio_bus: probed
[   14.527358] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   14.610281] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[   14.715231] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[   14.819562] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   14.897783] ehci-pci: EHCI PCI platform driver
[   14.951050] ehci-orion: EHCI orion driver
[   14.999190] orion-ehci f1050000.ehci: EHCI Host Controller
[   15.064987] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   15.156967] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[   15.254177] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   15.326404] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   15.407738] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   15.494286] usb usb1: Product: EHCI Host Controller
[   15.552719] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[   15.633025] usb usb1: SerialNumber: f1050000.ehci
[   15.690006] hub 1-0:1.0: USB hub found
[   15.734967] hub 1-0:1.0: 1 port detected
[   15.782478] usbcore: registered new interface driver usb-storage
[   15.854840] mousedev: PS/2 mouse device common for all mice
[   15.922206] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[   16.004752] i2c /dev entries driver
[   16.047597] hidraw: raw HID events driver (C) Jiri Kosina
[   16.112760] drop_monitor: Initializing network drop monitor service
[   16.188276] NET: Registered protocol family 17
[   16.241621] Key type dns_resolver registered
[   16.292799] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   16.373901] registered taskstats version 1
[   16.423006] Loading compiled-in X.509 certificates
[   16.480538] zswap: loaded using pool lzo/zbud
[   16.536059] Key type big_key registered
[   16.584060] Key type encrypted registered
[   16.633388] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[   16.735114] usb 1-1: New USB device found, idVendor=04cc, idProduct=1520
[   16.815617] Waiting 1 sec before mounting root device...
[   16.879258] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   16.965541] hub 1-1:1.0: USB hub found
[   17.010606] hub 1-1:1.0: 2 ports detected
Still did not found the switch....

And I got a new device turris omnia which uses the 88e6176 switch.... Someone has got this device working with LEDE.
The link of his commit:https://github.com/lede-project/source/pull/1210/commits

In his commits,there are two commits about the switch:
https://github.com/lede-project/source/pull/1210/commits/9a569bc6b317375f71c60ed2ae26d61467e7f454
and
https://github.com/rmounce/lede-source/blob/810c6910e6e6ff31b94fc311ecf745a790821b7e/target/linux/mvebu/patches-4.9/003-add_switch_nodes.patch

Are those commits helpful?
Re: Debian on QiZhiTong 501mv2
August 13, 2017 07:42PM
wacke,

> Are those commits helpful?

It seems not. It's for a different switch.

It is a puzzle. I don't think I know enough about your box. Are these assumptions I stated above correct?

Quote

- the management port (cpu) is connected to eth0 with no PHY.
- In this box, eth1 is for the separate connection (it is not connected to the switch). So we leave it active.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 14, 2017 12:17AM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>
> > Are those commits helpful?
>
> It seems not. It's for a different switch.
>
> It is a puzzle. I don't think I know enough about
> your box. Are these assumptions I stated above cor
> rect?
>
>
Quote
- In this box, eth1 is for the separate connection (it is not connected to the switch). So we leave it active.
this is corect,the eth1 is connected to a 88e1116 chip.

Quote
- the management port (cpu) is connected to eth0 with no PHY.
i'm not sure about this...

can we just report this to kernel.org ask for help?
Re: Debian on QiZhiTong 501mv2
August 14, 2017 01:35AM
wacke,

>
> can we just report this to kernel.org ask for help
> ?

You could do that. And we'll stop investigating until you see the response, one way or the other.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 14, 2017 01:59AM
bodhi Wrote:
-------------------------------------------------------
>
> You could do that. And we'll stop investigating un
> til you see the response, one way or the other.

So is there any other way to figure out this switch?
Re: Debian on QiZhiTong 501mv2
August 14, 2017 02:13AM
wacke,

1. Have you tried the other driver?

compatible = "marvell, mv88e6190";

2. Do you have a serial boot log for kernel 4.4 when it was working that you can post here?

I think eth0 connects to the switch with no PHY, therefore this "fixed link" syntax. But we dont know that for a fact.
port@5 {
				reg = <5>;
				label = "cpu";
				ethernet = <&eth0port>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 14, 2017 10:17AM
Hi bodhi,

bodhi Wrote:
-------------------------------------------------------
> wacke,
>
> 1. Have you tried the other driver?
>
>
> compatible = "marvell, mv88e6190";
>

I've tried,and I also tried mv88e6165,but no lucky....

> 2. Do you have a serial boot log for kernel 4.4 wh
> en it was working that you can post here?
>
> I think eth0 connects to the switch with no PHY, t
> herefore this "fixed link" syntax. But we dont kno
> w that for a fact.
>
> port@5 {
> reg = <5>;
> label = "cpu";
> ethernet = <&eth0port>;
> fixed-link {
> speed = <1000>;
> full-duplex;
> };
> };
>

working dts for kernel 4.4.x:
/*
 * Marvell RD88F6181 A Board descrition
 *
 * Andrew Lunn <andrew@lunn.ch>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 *
 * This file contains the definitions for the board with the A0 or
 * higher stepping of the SoC. The ethernet switch does not have a
 * "wan" port.
 */

/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "QiZhiTong 501M V2";
	compatible = "qizhitong,501m_v2","marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";

	chosen {
		bootargs = "console=ttyS0,9600n8 earlyprintk";
	};

	mbus {
		pcie-controller {
			status = "okay";

			pcie@1,0 {
				status = "okay";
			};

		};
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";

		};

		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};
		mvsdio@90000 {
			pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
			pinctrl-names = "default";
			status = "okay";
			cd-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
			/* No WP GPIO */
		};
	};
	
	dsa@0 {
		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;
		
		interrupts = <10>;
		dsa,ethernet = <&eth0port>;
		dsa,mii-bus = <&mdio>;

		switch@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			reg = <10 0>;
			
			port@0 {
				reg = <0>;
				label = "lan1";
			};

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

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

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

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

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

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x100000>;
		read-only;
	};

	partition@100000 {
		label = "kernel";
		reg = <0x0100000 0x400000>;
	};

	partition@500000 {
		label = "ubi";
		reg = <0x0500000 0x3b00000>;
	};
};

&mdio {
	status = "okay";
	ethphy0: ethernet-phy@0 {
        device_type = "ethernet-phy";
        reg = <1>;
	};
};

&eth0 {
	status = "okay";	
	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

&eth1 {
	status = "okay";	
	ethernet1-port@0 {
	};
};


boot log:
Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.74 (Wacke@HOME-Server) (gcc version 7.1.0 (LEDE GCC 7.1.0 r4235-61eb18d3f7) ) #0 Thu Jul 27 10:12:21 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: QiZhiTong 501M V2
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,9600
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512132K/524288K available (4807K kernel code, 276K rwdata, 1968K rodata, 248K init, 225K bss, 12156K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc06a5e44   (6776 kB)
[    0.000000]       .init : 0xc06a6000 - 0xc06e4000   ( 248 kB)
[    0.000000]       .data : 0xc06e4000 - 0xc07293c0   ( 277 kB)
[    0.000000]        .bss : 0xc07293c0 - 0xc07618b0   ( 226 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000009] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000082] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090088] pid_max: default: 32768 minimum: 301
[    0.090222] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090242] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090977] CPU: Testing write buffer coherency: ok
[    0.091400] Setting up static identity map for 0x81e0 - 0x821c
[    0.091667] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.096680] VFP support v0.3: not present
[    0.096924] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.096960] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.097143] pinctrl core: initialized pinctrl subsystem
[    0.098388] NET: Registered protocol family 16
[    0.099137] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.103266] cpuidle: using governor ladder
[    0.103608] Feroceon L2: Enabling L2
[    0.103649] Feroceon L2: Cache support initialised.
[    0.103927] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.104032] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.108424] No ATAGs?
[    0.126917] SCSI subsystem initialized
[    0.127919] usbcore: registered new interface driver usbfs
[    0.128012] usbcore: registered new interface driver hub
[    0.128088] usbcore: registered new device driver usb
[    0.129172] clocksource: Switched to clocksource orion_clocksource
[    0.146395] NET: Registered protocol family 2
[    0.147129] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.147204] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.147274] TCP: Hash tables configured (established 4096 bind 4096)
[    0.147414] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.147444] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.147668] NET: Registered protocol family 1
[    0.152512] Crashlog allocated RAM at address 0x3f00000
[    0.168461] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.168516] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.175621] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.175642] io scheduler noop registered
[    0.175656] io scheduler deadline registered (default)
[    0.177099] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.177802] irq: Cannot allocate irq_descs @ IRQ35, assuming pre-allocated
[    0.178229] irq: Cannot allocate irq_descs @ IRQ67, assuming pre-allocated
[    0.178859] mvebu-pcie mbus:pcie-controller: PCI host bridge to bus 0000:00
[    0.178877] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.178890] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.178903] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.179263] PCI: bus0: Fast back to back transfers disabled
[    0.179279] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.179422] PCI: bus1: Fast back to back transfers enabled
[    0.179470] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.221181] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.222333] console [ttyS0] disabled
[    0.222405] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    5.947199] console [ttyS0] enabled
[    5.990238] sata_mv f1080000.sata: slots 32 ports 1
[    6.051274] scsi host0: sata_mv
[    6.089321] ata1: SATA max UDMA/133 irq 32
[    6.138885] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[    6.214993] nand: ST Micro NAND 64MiB 3,3V 8-bit
[    6.270291] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[    6.357904] Scanning device for bad blocks
[    6.537937] Bad eraseblock 2455 at 0x00000265c000
[    6.681715] 3 ofpart partitions found on MTD device orion_nand
[    6.751614] Creating 3 MTD partitions on "orion_nand":
[    6.813179] 0x000000000000-0x000000100000 : "u-boot"
[    6.874515] 0x000000100000-0x000000500000 : "kernel"
[    6.935403] 0x000000500000-0x000004000000 : "ubi"
[    6.995174] libphy: orion_mdio_bus: probed
[    7.045301] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.128034] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[    7.232982] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[    7.337278] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.415437] ehci-pci: EHCI PCI platform driver
[    7.468734] ehci-orion: EHCI orion driver
[    7.516954] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.582635] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.674528] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    7.759204] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.831901] hub 1-0:1.0: USB hub found
[    7.876849] ata1: SATA link down (SStatus 0 SControl F300)
[    7.942790] hub 1-0:1.0: 1 port detected
[    7.990301] usbcore: registered new interface driver usb-storage
[    8.062801] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    8.145263] i2c /dev entries driver
[    8.187951] orion_wdt: Initial timeout 21 sec
[    8.241159] mvsdio f1090000.mvsdio: Got CD GPIO
[    8.334541] marvell-cesa f1030000.crypto: CESA device successfully registered
[    8.421333] NET: Registered protocol family 10
[    8.476689] NET: Registered protocol family 17
[    8.530053] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    8.681344] Distributed Switch Architecture driver version 0.1
[    8.751891] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Marvell 88E6161 (A1) switch
[    8.858293] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.080331] hub 1-1:1.0: USB hub found
[    9.125459] hub 1-1:1.0: 2 ports detected
[    9.188125] libphy: dsa slave smi: probed
[    9.247017] 8021q: 802.1Q VLAN Support v1.8
[    9.300926] Key type encrypted registered
[    9.349529] UBI: auto-attach mtd2
[    9.387113] ubi0: attaching mtd2
[    9.744812] ubi0: scanning is finished
[    9.801795] ubi0: attached mtd2 (name "ubi", size 59 MiB)
[    9.866444] ubi0: PEB size: 16384 bytes (16 KiB), LEB size: 15872 bytes
[    9.945681] ubi0: min./max. I/O unit sizes: 512/512, sub-page size 256
[   10.023908] ubi0: VID header offset: 256 (aligned 256), data offset: 512
[   10.104211] ubi0: good PEBs: 3775, bad PEBs: 1, corrupted PEBs: 0
[   10.177230] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 92
[   10.262756] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1830178591
[   10.372219] ubi0: available PEBs: 0, total reserved PEBs: 3775, PEBs reserved for bad PEB handling: 79
[   10.484414] ubi0: background thread "ubi_bgt0d" started, PID 950
[   10.557159] block ubiblock0_0: created from ubi0:0(rootfs)
[   10.622846] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[   10.706527] rtc-mv f1010300.rtc: setting system clock to 2000-02-28 15:47:15 UTC (951752835)
[   10.813734] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[   10.899991] Freeing unused kernel memory: 248K (c06a6000 - c06e4000)
[   11.571501] init: Console is alive
[   11.612417] init: - watchdog -
[   11.688474] init: - preinit -
[   12.229058] random: jshn: uninitialized urandom read (4 bytes read, 37 bits of entropy available)
[   12.403805] random: jshn: uninitialized urandom read (4 bytes read, 37 bits of entropy available)
[   12.535021] random: jshn: uninitialized urandom read (4 bytes read, 37 bits of entropy available)
[   12.668258] random: jshn: uninitialized urandom read (4 bytes read, 37 bits of entropy available)
[   12.797944] random: jshn: uninitialized urandom read (4 bytes read, 37 bits of entropy available)
RTNETLINK answers: Network is down
sendto(): Network unreachable
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   15.172270] mount_root: loading kmods from internal overlay
[   15.245100] mount_root: failed to launch kmodloader from internal overlay
[   15.709362] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 1019
[   15.796166] UBIFS (ubi0:1): recovery needed
[   15.875499] random: procd: uninitialized urandom read (4 bytes read, 42 bits of entropy available)
[   16.014003] UBIFS (ubi0:1): recovery completed
[   16.067265] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   16.161134] UBIFS (ubi0:1): LEB size: 15872 bytes (15 KiB), min./max. I/O unit sizes: 512 bytes/512 bytes
[   16.275807] UBIFS (ubi0:1): FS size: 18824192 bytes (17 MiB, 1186 LEBs), journal size 936448 bytes (0 MiB, 59 LEBs)
[   16.400897] UBIFS (ubi0:1): reserved for root: 889112 bytes (868 KiB)
[   16.478080] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID B8615344-E6AD-4B1A-AB04-06EA22F30C5E, small LPT model
[   16.613827] UBIFS (ubi0:1): full atime support is enabled.
[   16.681937] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   16.767810] block: extroot: not configured
[   16.816980] UBIFS (ubi0:1): un-mount UBI device 0
[   16.873287] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" stops
[   16.959728] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 1021
[   17.046583] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   17.140443] UBIFS (ubi0:1): LEB size: 15872 bytes (15 KiB), min./max. I/O unit sizes: 512 bytes/512 bytes
[   17.255119] UBIFS (ubi0:1): FS size: 18824192 bytes (17 MiB, 1186 LEBs), journal size 936448 bytes (0 MiB, 59 LEBs)
[   17.380208] UBIFS (ubi0:1): reserved for root: 889112 bytes (868 KiB)
[   17.457391] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID B8615344-E6AD-4B1A-AB04-06EA22F30C5E, small LPT model
[   17.593291] UBIFS (ubi0:1): full atime support is enabled.
[   17.860321] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   17.945990] block: extroot: not configured
[   17.996251] mount_root: switching to ubifs overlay
[   18.061241] urandom-seed: Seeding with /etc/urandom.seed
[   18.190267] procd: - early -
[   18.224818] procd: - watchdog -
[   19.366208] procd: - watchdog -
[   19.423441] procd: - ubus -
[   19.560123] random: ubusd: uninitialized urandom read (4 bytes read, 46 bits of entropy available)
[   19.767225] random: ubusd: uninitialized urandom read (4 bytes read, 46 bits of entropy available)
[   19.979424] random: ubusd: uninitialized urandom read (4 bytes read, 47 bits of entropy available)
[   20.181227] random: ubusd: uninitialized urandom read (4 bytes read, 47 bits of entropy available)
[   21.107853] procd: - init -
Please press Enter to activate this console.

Maybe the eth0 connects to the switch with the PHY?
Re: Debian on QiZhiTong 501mv2
August 14, 2017 06:54PM
wacke,

I've just noticed that you have been running this set up.

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    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: QiZhiTong 501M V2
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: rootdelay=1 root=/ initrd=/boot/uInitrd console=ttyS0,9600

Your uInitrd might be a bad one? We might have been on a wild goose chase if that is true :)

Using the latest DTS. Boot Debian rootfs and try loading the module at command line:
modprobe mv88e6085

This is the latest DTS (repost from above).

/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "QiZhiTong 501M V2";
	compatible = "qizhitong,501m_v2","marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";

	chosen {
		bootargs = "console=ttyS0,9600n8 earlyprintk";
	};

	mbus {
		pcie-controller {
			status = "okay";

			pcie@1,0 {
				status = "okay";
			};

		};
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";

		};

		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};
		mvsdio@90000 {
			pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
			pinctrl-names = "default";
			status = "okay";
			cd-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
			/* No WP GPIO */
		};
	};

	dsa {
		status = "disabled";

		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;
		
		dsa,ethernet = <&eth0port>;
		dsa,mii-bus = <&mdio>;

		switch@10,0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <10 0>;	/* MDIO address 16, switch 0 in tree */
			
			port@0 {
				reg = <0>;
				label = "lan1";
			};

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

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

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

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

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

};

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x100000>;
		read-only;
	};

	partition@100000 {
		label = "kernel";
		reg = <0x0100000 0x400000>;
	};

	partition@500000 {
		label = "ubi";
		reg = <0x0500000 0x3b00000>;
	};
};

&mdio {
	status = "okay";

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

		ports {

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

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

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

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

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

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

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

&eth0 {
	status = "okay";	
	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

&eth1 {
	status = "okay";	
	ethernet1-port@0 {
	};
};

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 08/14/2017 07:56PM by bodhi.
Re: Debian on QiZhiTong 501mv2
August 15, 2017 02:29AM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>

> Your uInitrd might be a bad one? We might have bee
> n on a wild goose chase if that is true :)

Hi bodhi,
I don't know what's wrong about your latest rootfs.It can't mount my sd card propely and cause a kernel panic....It can't boot from mmc or am I missconfigured?
Re: Debian on QiZhiTong 501mv2
August 15, 2017 04:39AM
wacke,

> Hi bodhi,
> I don't know what's wrong about your latest ro
> otfs.It can't mount my sd card propely and cause a
> kernel panic....It can't boot from mmc or am I mis
> sconfigured?

You are running stock u-boot. So to boot with SD card, you will need to adjust u-boot envs. Simplest way is to boot is using a another USB flash drive. But you want to boot with SD card, then post the u-boot envs and its commands helps. Older u-boot have different syntax for loading kernel from MMC.

printenv
mmc
help

But it sounds like you are further, is the kernel trying to mounting to the rootfs? post the serial boot log (in addition to the above), if it fails to mount rootfs.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 15, 2017 09:59AM
Hi bodhi,
I've finally got the debian rootfs mounting,boot log:
bootm: BOOTCMD4                        

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: JMicron                                  Firm: 100415   Ser#: 00000000002E9       
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3836.0 MB = 3.7 GB (7856128 x 512)


3832261 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.12.1-KIRKWOOD-TLD-1
   Created:      2017-08-15   7:27:35 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3832197 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    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: QiZhiTong 501M V2
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: rootdelay=10 root=/dev/sda1 console=ttyS0,9600
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 506352K/524288K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 17936K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000038] Switching to timer-based delay loop, resolution 5ns
[    0.000483] Console: colour dummy device 80x30
[    0.000513] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000534] pid_max: default: 32768 minimum: 301
[    0.000724] Security Framework initialized
[    0.000841] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000859] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001659] CPU: Testing write buffer coherency: ok
[    0.002556] Setting up static identity map for 0x100000 - 0x100058
[    0.002793] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.005834] devtmpfs: initialized
[    0.009648] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009673] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.010088] prandom: seed boundary self test passed
[    0.013840] prandom: 100 self tests passed
[    0.013851] pinctrl core: initialized pinctrl subsystem
[    0.014916] NET: Registered protocol family 16
[    0.015310] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.016799] cpuidle: using governor ladder
[    0.016863] cpuidle: using governor menu
[    0.017237] Feroceon L2: Enabling L2
[    0.017280] Feroceon L2: Cache support initialised.
[    0.017626] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.017733] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.022395] No ATAGs?
[    0.031357] vgaarb: loaded
[    0.031663] SCSI subsystem initialized
[    0.032128] usbcore: registered new interface driver usbfs
[    0.032205] usbcore: registered new interface driver hub
[    0.032290] usbcore: registered new device driver usb
[    0.033333] clocksource: Switched to clocksource orion_clocksource
[    0.121555] VFS: Disk quotas dquot_6.6.0
[    0.121630] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.132100] NET: Registered protocol family 2
[    0.132814] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.132875] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.132927] TCP: Hash tables configured (established 4096 bind 4096)
[    0.133007] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.133031] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.133198] NET: Registered protocol family 1
[    0.133644] RPC: Registered named UNIX socket transport module.
[    0.133657] RPC: Registered udp transport module.
[    0.133664] RPC: Registered tcp transport module.
[    0.133671] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.133989] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.134877] audit: initializing netlink subsys (disabled)
[    0.135319] Initialise system trusted keyrings
[    0.135370] Key type blacklist registered
[    0.135469] audit: type=2000 audit(0.131:1): state=initialized audit_enabled=0 res=1
[    0.135552] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.135618] zbud: loaded
[    0.136589] NFS: Registering the id_resolver key type
[    0.136618] Key type id_resolver registered
[    0.136626] Key type id_legacy registered
[    0.136643] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.136653] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.136860] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.137044] fuse init (API version 7.26)
[    0.137403] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.137658] orangefs_init: module version upstream loaded
[    0.137669] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.553344] random: fast init done
[    6.002439] Key type asymmetric registered
[    6.002454] Asymmetric key parser 'x509' registered
[    6.002516] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    6.002527] io scheduler noop registered
[    6.002535] io scheduler deadline registered
[    6.002605] io scheduler cfq registered (default)
[    6.003912] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.005667] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.064066] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.064280] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.124062] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.124452] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.125659] console [ttyS0] disabled
[    6.125721] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[   13.245609] console [ttyS0] enabled
[   13.295779] loop: module loaded
[   13.333927] sata_mv f1080000.sata: slots 32 ports 1
[   13.393866] scsi host0: sata_mv
[   13.431663] ata1: SATA max UDMA/133 irq 32
[   13.481299] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[   13.557478] nand: ST Micro NAND 64MiB 3,3V 8-bit
[   13.612754] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   13.700353] Scanning device for bad blocks
[   13.878535] Bad eraseblock 2455 at 0x00000265c000
[   14.021002] 3 ofpart partitions found on MTD device orion_nand
[   14.090849] Creating 3 MTD partitions on "orion_nand":
[   14.152426] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   14.227718] ata1.00: ATA-7: JMicron, 100415, max UDMA/133
[   14.227725] ata1.00: 7856128 sectors, multi 1: LBA48 
[   14.292713] ata1.00: configured for UDMA/133
[   14.353673] scsi 0:0:0:0: Direct-Access     ATA      JMicron          15   PQ: 0 ANSI: 5
[   14.355083] sd 0:0:0:0: [sda] 7856128 512-byte logical blocks: (4.02 GB/3.75 GiB)
[   14.355149] sd 0:0:0:0: [sda] Write Protect is off
[   14.355271] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   14.504925]  sda: sda1 sda2
[   14.506601] sd 0:0:0:0: [sda] Attached SCSI disk
[   14.851841] 0x000000000000-0x000000100000 : "u-boot"
[   14.912612] 0x000000100000-0x000000500000 : "kernel"
[   14.973547] 0x000000500000-0x000004000000 : "ubi"
[   15.035423] libphy: Fixed MDIO Bus: probed
[   15.085306] libphy: orion_mdio_bus: probed
[   15.134691] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   15.217369] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[   15.322174] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[   15.426507] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   15.504733] ehci-pci: EHCI PCI platform driver
[   15.557994] ehci-orion: EHCI orion driver
[   15.606137] orion-ehci f1050000.ehci: EHCI Host Controller
[   15.671926] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   15.763816] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[   15.863370] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   15.935543] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   16.016906] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   16.103429] usb usb1: Product: EHCI Host Controller
[   16.161864] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[   16.242167] usb usb1: SerialNumber: f1050000.ehci
[   16.299141] hub 1-0:1.0: USB hub found
[   16.344106] hub 1-0:1.0: 1 port detected
[   16.391640] usbcore: registered new interface driver usb-storage
[   16.463974] mousedev: PS/2 mouse device common for all mice
[   16.531371] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[   16.613869] i2c /dev entries driver
[   16.656657] hidraw: raw HID events driver (C) Jiri Kosina
[   16.721775] drop_monitor: Initializing network drop monitor service
[   16.797187] NET: Registered protocol family 17
[   16.850445] Key type dns_resolver registered
[   16.901626] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   16.982733] registered taskstats version 1
[   17.031836] Loading compiled-in X.509 certificates
[   17.089361] zswap: loaded using pool lzo/zbud
[   17.143937] Key type big_key registered
[   17.191793] Key type encrypted registered
[   17.241174] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[   17.342837] usb 1-1: New USB device found, idVendor=04cc, idProduct=1520
[   17.423318] Waiting 10 sec before mounting root device...
[   17.488077] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   17.574418] hub 1-1:1.0: USB hub found
[   17.619455] hub 1-1:1.0: 2 ports detected
[   28.003949] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   28.091126] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[   28.173527] EXT4-fs (sda1): write access will be enabled during recovery
[   28.268947] EXT4-fs (sda1): recovery complete
[   28.322094] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   28.413936] VFS: Mounted root (ext3 filesystem) readonly on device 8:1.
[   28.495695] devtmpfs: mounted
[   28.534068] Freeing unused kernel memory: 1024K
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
ERROR: could not open /proc/stat: No such file or directory
findfs: unable to resolve 'LABEL=rootfs'
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[ ok ] Synthesizing the initial hotplug events...done.
[....] Waiting for /dev to be fully populated...[   30.138684] marvell-cesa f1030000.crypto: CESA device successfully registered
[   30.269353] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   30.287373] mv88e6085 f1072004.mdio-bus-mii:0a: switch 0x161 detected: Marvell 88E6161, revision 2
[   30.400988] libphy: mv88e6xxx SMI: probed
[   30.401052] DSA: switch 0 0 parsed
[   30.401054] DSA: tree 0 parsed
[   31.275102] orion_wdt: Initial timeout 21 sec
[   31.331253] mvsdio f1090000.mvsdio: Got CD GPIO
[   31.855153] random: crng init done
[   31.904867] mv88e6085 f1072004.mdio-bus-mii:0a lan1: no phy at 0
[   31.976815] mv88e6085 f1072004.mdio-bus-mii:0a lan1: failed to connect to port 0: -19
[   32.070670] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.193401] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 0: -19
[   32.280404] mv88e6085 f1072004.mdio-bus-mii:0a lan2: no phy at 1
[   32.352458] mv88e6085 f1072004.mdio-bus-mii:0a lan2: failed to connect to port 1: -19
[   32.446267] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.563396] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 1: -19
[   32.650506] mv88e6085 f1072004.mdio-bus-mii:0a lan3: no phy at 2
[   32.722538] mv88e6085 f1072004.mdio-bus-mii:0a lan3: failed to connect to port 2: -19
[   32.816349] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.933398] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 2: -19
[   33.020505] mv88e6085 f1072004.mdio-bus-mii:0a lan4: no phy at 3
[   33.092516] mv88e6085 f1072004.mdio-bus-mii:0a lan4: failed to connect to port 3: -19
[   33.186516] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   33.303397] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 3: -19
[   33.390453] mv88e6085 f1072004.mdio-bus-mii:0a aux: no phy at 4
[   33.461449] mv88e6085 f1072004.mdio-bus-mii:0a aux: failed to connect to port 4: -19
[   33.554218] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   33.673397] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 4: -19
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   40.937604] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/sda1 
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 14453/196608 fi[   41.193645] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
les, 198268/786432 blocks
. ok 
[ ok ] Will now activate lvm and md swap:done.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..
[ ok ] Cleaning up temporary files....
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Initializing random number generator...done.
[ ok ] Setting kernel variables...done.
[   43.616298] mv643xx_eth: no PHY
[   43.616336] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:90:0b:19:ee:25
Sending on   LPF/eth0/00:90:0b:19:ee:25
Sending on   Socket/fallback
DHCPREQUEST of 192.168.0.14 on eth0 to 255.255.255.255 port 67



[  125.589432] NET: Registered protocol family 10
[  125.646164] Segment Routing with IPv6
DHCPREQUEST of 192.168.0.14 on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 2
No DHCPOFFERS received.
Trying recorded lease 192.168.0.14
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1288 (syslogd)
. ok 
[ ok ] Starting system message bus: dbus.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1286 (klogd)
. ok 
[ ok ] Running local boot scripts (/etc/rc.local).

But no lucky,the same error ....
Re: Debian on QiZhiTong 501mv2
August 15, 2017 05:35PM
wacke,

Good progress though! we got back to where we started with the switch detected correctly by the new binding.

[   30.287373] mv88e6085 f1072004.mdio-bus-mii:0a: switch 0x161 detected: Marvell 88E6161, revision 2
[   30.400988] libphy: mv88e6xxx SMI: probed
[   30.401052] DSA: switch 0 0 parsed
[   30.401054] DSA: tree 0 parsed
[   31.275102] orion_wdt: Initial timeout 21 sec
[   31.331253] mvsdio f1090000.mvsdio: Got CD GPIO
[   31.855153] random: crng init done
[   31.904867] mv88e6085 f1072004.mdio-bus-mii:0a lan1: no phy at 0
[   31.976815] mv88e6085 f1072004.mdio-bus-mii:0a lan1: failed to connect to port 0: -19
[   32.070670] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.193401] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 0: -19
[   32.280404] mv88e6085 f1072004.mdio-bus-mii:0a lan2: no phy at 1
[   32.352458] mv88e6085 f1072004.mdio-bus-mii:0a lan2: failed to connect to port 1: -19
[   32.446267] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.563396] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 1: -19
[   32.650506] mv88e6085 f1072004.mdio-bus-mii:0a lan3: no phy at 2
[   32.722538] mv88e6085 f1072004.mdio-bus-mii:0a lan3: failed to connect to port 2: -19
[   32.816349] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.933398] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 2: -19
[   33.020505] mv88e6085 f1072004.mdio-bus-mii:0a lan4: no phy at 3
[   33.092516] mv88e6085 f1072004.mdio-bus-mii:0a lan4: failed to connect to port 3: -19
[   33.186516] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   33.303397] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 3: -19
[   33.390453] mv88e6085 f1072004.mdio-bus-mii:0a aux: no phy at 4
[   33.461449] mv88e6085 f1072004.mdio-bus-mii:0a aux: failed to connect to port 4: -19
[   33.554218] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   33.673397] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 4: -19

So now it is a matter of whether the eth0 connection to the ports and why there are no PHY for the ports. Something is missing, or different from way the Linksys EA4500 setup.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 15, 2017 07:24PM
wacke,

One line seems wrong. I'm positive that this address is not at 0.


&mdio {
	status = "okay";

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

That might be either:
	switch@a {
or
	switch@10 {
or
	switch@16 {


And I think address 10 is most likely correct.
switch@10 {

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 2 time(s). Last edit at 08/15/2017 08:31PM by bodhi.
Re: Debian on QiZhiTong 501mv2
August 15, 2017 11:34PM
Hi bodhi,
I've tried switch@10,switch@16 and switch@a,nothing changed:
[   30.098888] mv88e6085 f1072004.mdio-bus-mii:0a: switch 0x161 detected: Marvell 88E6161, revision 2
[   30.213967] libphy: mv88e6xxx SMI: probed
[   30.214037] DSA: switch 0 0 parsed
[   30.214040] DSA: tree 0 parsed
[   31.329260] orion_wdt: Initial timeout 21 sec
[   31.385499] mvsdio f1090000.mvsdio: Got CD GPIO
[   31.658546] random: crng init done
[   31.911864] mv88e6085 f1072004.mdio-bus-mii:0a lan1: no phy at 0
[   31.983897] mv88e6085 f1072004.mdio-bus-mii:0a lan1: failed to connect to port 0: -19
[   32.077829] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.193386] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 0: -19
[   32.280474] mv88e6085 f1072004.mdio-bus-mii:0a lan2: no phy at 1
[   32.352452] mv88e6085 f1072004.mdio-bus-mii:0a lan2: failed to connect to port 1: -19
[   32.446270] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.563388] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 1: -19
[   32.650557] mv88e6085 f1072004.mdio-bus-mii:0a lan3: no phy at 2
[   32.722533] mv88e6085 f1072004.mdio-bus-mii:0a lan3: failed to connect to port 2: -19
[   32.816348] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   32.933383] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 2: -19
[   33.020540] mv88e6085 f1072004.mdio-bus-mii:0a lan4: no phy at 3
[   33.092587] mv88e6085 f1072004.mdio-bus-mii:0a lan4: failed to connect to port 3: -19
[   33.186561] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   33.303387] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 3: -19
[   33.390528] mv88e6085 f1072004.mdio-bus-mii:0a aux: no phy at 4
[   33.461548] mv88e6085 f1072004.mdio-bus-mii:0a aux: failed to connect to port 4: -19
[   33.554322] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   33.673386] mv88e6085 f1072004.mdio-bus-mii:0a: Failed to create slave 4: -19

And I see the document at:
https://www.kernel.org/doc/Documentation/devicetree/bindings/net/marvell-orion-net.txt
I'll try to add the mdio-bus node...
Re: Debian on QiZhiTong 501mv2
August 16, 2017 01:27AM
wacke,

You're very close to get it working. IMO, you should find out what is the difference between your box network architecture and the other boards such as kirkwood-linksys-ea4500, armada-370-rd, armada-385-turris-omnia.

In fact, the armada-370-rd.dts network setup is almost identical, except that it uses eth1 for the switch and eth0 for a real ethernet PHY.

We know other boards are mainline and working. So keep trying other approaches are really not productive.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 16, 2017 06:09PM
wacke,

What is your output of:
ls -lR /proc/device-tree/dsa -R
and
ls  -lR /sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii*

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on QiZhiTong 501mv2
August 16, 2017 09:03PM
Address 0x10 is correct

/usr/src/linux-4.12.1-tld/drivers/net/dsa/mv88e6xxx/chip.c

[MV88E6161] = {
                .prod_num = PORT_SWITCH_ID_PROD_NUM_6161,
                .family = MV88E6XXX_FAMILY_6165,
                .name = "Marvell 88E6161",
                .num_databases = 4096,
                .num_ports = 6,
                .max_vid = 4095,
                .port_base_addr = 0x10,
                .global1_addr = 0x1b,
                .age_time_coeff = 15000,
                .g1_irqs = 9,
                .atu_move_port_mask = 0xf,
                .pvt = true,
                .tag_protocol = DSA_TAG_PROTO_DSA,
                .flags = MV88E6XXX_FLAGS_FAMILY_6165,
                .ops = &mv88e6161_ops,
        },


And I am also confused by the numeric base of the address in the DTS! (decimal vs hex). Why don't we try 16 as below (assuming it is decimal). I'll need to search for a definitive answer later.


/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "QiZhiTong 501M V2";
	compatible = "qizhitong,501m_v2","marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";

	chosen {
		bootargs = "console=ttyS0,9600n8 earlyprintk";
	};

	mbus {
		pcie-controller {
			status = "okay";

			pcie@1,0 {
				status = "okay";
			};

		};
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";

		};

		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};
		mvsdio@90000 {
			pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
			pinctrl-names = "default";
			status = "okay";
			cd-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
			/* No WP GPIO */
		};
	};

	dsa {
		status = "disabled";

		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;
		
		dsa,ethernet = <&eth0port>;
		dsa,mii-bus = <&mdio>;

		switch@10,0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <10 0>;	/* MDIO address 16, switch 0 in tree */
			
			port@0 {
				reg = <0>;
				label = "lan1";
			};

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

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

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

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

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

};

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x100000>;
		read-only;
	};

	partition@100000 {
		label = "kernel";
		reg = <0x0100000 0x400000>;
	};

	partition@500000 {
		label = "ubi";
		reg = <0x0500000 0x3b00000>;
	};
};

&mdio {
	status = "okay";

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

		ports {

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

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

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

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

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

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

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

&eth0 {
	status = "okay";	
	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

&eth1 {
	status = "okay";	
	ethernet1-port@0 {
	};
};

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 08/16/2017 09:10PM by bodhi.
Re: Debian on QiZhiTong 501mv2
August 16, 2017 09:53PM
Hi dodhi,
I found some patches:

https://py3.patchwork.dja.id.au/cover/20383/
https://py3.patchwork.dja.id.au/patch/20381/
https://py3.patchwork.dja.id.au/patch/20382/

and apply one of patches to kernel 4.9.x:
the lede bootlog:
Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.37 (Wacke@HOME-Server) (gcc version 7.1.0 (LEDE GCC 7.1.0 r4235-61eb18d3f7) ) #0 Thu Jul 27 10:12:21 2017
[    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: QiZhiTong 501M V2
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,9600
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 513260K/524288K available (4433K kernel code, 282K rwdata, 1208K rodata, 240K init, 224K bss, 11028K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc045c700   (4434 kB)
[    0.000000]       .init : 0xc058c000 - 0xc05c8000   ( 240 kB)
[    0.000000]       .data : 0xc05c8000 - 0xc060e938   ( 283 kB)
[    0.000000]        .bss : 0xc060e938 - 0xc0646d30   ( 225 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 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.000098] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090090] pid_max: default: 32768 minimum: 301
[    0.090216] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090235] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090866] CPU: Testing write buffer coherency: ok
[    0.091172] Setting up static identity map for 0x81e0 - 0x821c
[    0.091434] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.096654] VFP support v0.3: not present
[    0.096858] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.096884] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.096982] pinctrl core: initialized pinctrl subsystem
[    0.097951] NET: Registered protocol family 16
[    0.098277] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.099696] cpuidle: using governor ladder
[    0.100070] Feroceon L2: Enabling L2
[    0.100111] Feroceon L2: Cache support initialised.
[    0.100394] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.100509] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.105111] No ATAGs?
[    0.122385] SCSI subsystem initialized
[    0.123168] usbcore: registered new interface driver usbfs
[    0.123255] usbcore: registered new interface driver hub
[    0.123323] usbcore: registered new device driver usb
[    0.125461] clocksource: Switched to clocksource orion_clocksource
[    0.141203] NET: Registered protocol family 2
[    0.141826] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.141886] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.141938] TCP: Hash tables configured (established 4096 bind 4096)
[    0.142001] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.142024] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.142183] NET: Registered protocol family 1
[    0.145083] Crashlog allocated RAM at address 0x3f00000
[    0.145602] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.154714] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.154727] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.162726] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.162741] io scheduler noop registered
[    0.162749] io scheduler deadline registered (default)
[    0.164004] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.199702] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.200746] console [ttyS0] disabled
[    0.200815] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    5.243790] console [ttyS0] enabled
[    5.286629] sata_mv f1080000.sata: slots 32 ports 1
[    5.347203] scsi host0: sata_mv
[    5.385251] ata1: SATA max UDMA/133 irq 32
[    5.434776] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[    5.510853] nand: ST Micro NAND 64MiB 3,3V 8-bit
[    5.566154] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[    5.653757] Scanning device for bad blocks
[    5.833475] Bad eraseblock 2455 at 0x00000265c000
[    5.977053] 3 ofpart partitions found on MTD device orion_nand
[    6.046957] Creating 3 MTD partitions on "orion_nand":
[    6.108519] 0x000000000000-0x000000100000 : "u-boot"
[    6.169817] 0x000000100000-0x000000500000 : "kernel"
[    6.230721] 0x000000500000-0x000004000000 : "ubi"
[    6.292070] libphy: Fixed MDIO Bus: probed
[    6.341687] libphy: mdio_driver_register: mv88e6085
[    6.400363] libphy: orion_mdio_bus: probed
[    6.449471] mdio_bus f1072004.mdio-bu:0a: mdio_device_register
[    6.521753] mv88e6085 f1072004.mdio-bu:0a: switch 0x161 detected: Marvell 88E6161, revision 2
[    6.629116] ata1: SATA link down (SStatus 0 SControl F300)
[    6.708636] random: fast init done
[    6.769318] libphy: /ocp@f1000000/mdio-bus@72004/switch@10: probed
[    6.843917] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    6.926876] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[    7.031870] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[    7.136212] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.214384] ehci-pci: EHCI PCI platform driver
[    7.267679] ehci-orion: EHCI orion driver
[    7.315791] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.381494] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.473346] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    7.565484] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.638239] hub 1-0:1.0: USB hub found
[    7.683318] hub 1-0:1.0: 1 port detected
[    7.730771] usbcore: registered new interface driver usb-storage
[    7.803128] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    7.885547] i2c /dev entries driver
[    7.927919] orion_wdt: Initial timeout 21 sec
[    7.980668] mvsdio f1090000.mvsdio: Got CD GPIO
[    8.091100] marvell-cesa f1030000.crypto: CESA device successfully registered
[    8.177462] NET: Registered protocol family 10
[    8.232583] NET: Registered protocol family 17
[    8.285954] 8021q: 802.1Q VLAN Support v1.8
[    8.340236] mv88e6085 f1072004.mdio-bu:0a: switch 0x161 detected: Marvell 88E6161, revision 2
[    8.442585] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.563474] libphy: /ocp@f1000000/mdio-bus@72004/switch@10: probed
[    8.637576] DSA: switch 0 0 parsed
[    8.678248] DSA: tree 0 parsed
[    8.826535] hub 1-1:1.0: USB hub found
[    8.871645] hub 1-1:1.0: 2 ports detected
[    9.779657] mv88e6085 f1072004.mdio-bu:0a lan1: failed to connect to port 0: -110
[    9.869329] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -110 setting up slave phy
[    9.963789] mv88e6085 f1072004.mdio-bu:0a: Failed to create slave 0: -110
[   10.889628] mv88e6085 f1072004.mdio-bu:0a lan2: failed to connect to port 1: -110
[   10.979257] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -110 setting up slave phy
[   11.073620] mv88e6085 f1072004.mdio-bu:0a: Failed to create slave 1: -110
[   11.999642] mv88e6085 f1072004.mdio-bu:0a lan3: failed to connect to port 2: -110
[   12.089292] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -110 setting up slave phy
[   12.183645] mv88e6085 f1072004.mdio-bu:0a: Failed to create slave 2: -110
[   13.109657] mv88e6085 f1072004.mdio-bu:0a lan4: failed to connect to port 3: -110
[   13.199322] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -110 setting up slave phy
[   13.293675] mv88e6085 f1072004.mdio-bu:0a: Failed to create slave 3: -110
[   14.219629] mv88e6085 f1072004.mdio-bu:0a aux: failed to connect to port 4: -110
[   14.308209] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -110 setting up slave phy
[   14.402563] mv88e6085 f1072004.mdio-bu:0a: Failed to create slave 4: -110
[   14.484352] UBI: auto-attach mtd2
[   14.524036] ubi0: attaching mtd2
[   14.888107] ubi0: scanning is finished
[   14.945216] ubi0: attached mtd2 (name "ubi", size 59 MiB)
[   15.009958] ubi0: PEB size: 16384 bytes (16 KiB), LEB size: 15872 bytes
[   15.089191] ubi0: min./max. I/O unit sizes: 512/512, sub-page size 256
[   15.167417] ubi0: VID header offset: 256 (aligned 256), data offset: 512
[   15.247724] ubi0: good PEBs: 3775, bad PEBs: 1, corrupted PEBs: 0
[   15.320741] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 92
[   15.406254] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1830178591
[   15.515729] ubi0: available PEBs: 0, total reserved PEBs: 3775, PEBs reserved for bad PEB handling: 79
[   15.627635] ubi0: background thread "ubi_bgt0d" started, PID 968
[   15.700342] block ubiblock0_0: created from ubi0:0(rootfs)
[   15.766041] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[   15.849483] rtc-mv f1010300.rtc: setting system clock to 2000-02-16 12:30:34 UTC (950704234)
[   15.955567] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[   16.041806] Freeing unused kernel memory: 240K (c058c000 - c05c8000)
[   16.117885] This architecture does not have kernel memory protection.
[   16.575454] init: Console is alive
[   16.616324] init: - watchdog -
[   17.870955] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   18.040229] exFAT: Version 1.2.9
[   18.082329] ehci-platform: EHCI generic platform driver
[   18.149792] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   18.225017] ohci-platform: OHCI generic platform driver
[   18.289302] uhci_hcd: USB Universal Host Controller Interface driver
[   18.371774] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   18.468657] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   22.541121] mount_root: loading kmods from internal overlay
[   22.637850] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   22.724337] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   23.216763] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 1065
[   23.303503] UBIFS (ubi0:1): recovery needed
[   23.374348] UBIFS (ubi0:1): recovery completed
[   23.427610] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   23.521475] UBIFS (ubi0:1): LEB size: 15872 bytes (15 KiB), min./max. I/O unit sizes: 512 bytes/512 bytes
[   23.636160] UBIFS (ubi0:1): FS size: 18824192 bytes (17 MiB, 1186 LEBs), journal size 936448 bytes (0 MiB, 59 LEBs)
[   23.761247] UBIFS (ubi0:1): reserved for root: 889112 bytes (868 KiB)
[   23.838430] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID B8615344-E6AD-4B1A-AB04-06EA22F30C5E, small LPT model
[   23.976288] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   24.062142] block: extroot: not configured
[   24.111396] UBIFS (ubi0:1): un-mount UBI device 0
[   24.167698] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" stops
[   24.255937] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 1067
[   24.342793] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   24.436631] UBIFS (ubi0:1): LEB size: 15872 bytes (15 KiB), min./max. I/O unit sizes: 512 bytes/512 bytes
[   24.551303] UBIFS (ubi0:1): FS size: 18824192 bytes (17 MiB, 1186 LEBs), journal size 936448 bytes (0 MiB, 59 LEBs)
[   24.676398] UBIFS (ubi0:1): reserved for root: 889112 bytes (868 KiB)
[   24.753578] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID B8615344-E6AD-4B1A-AB04-06EA22F30C5E, small LPT model
[   25.094642] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   25.180271] block: extroot: not configured
[   25.230443] mount_root: switching to ubifs overlay
[   25.318252] urandom-seed: Seeding with /etc/urandom.seed
[   25.441829] procd: - early -
[   25.476768] procd: - watchdog -
[   26.555302] procd: - watchdog -
[   26.593623] procd: - ubus -
[   26.827831] procd: - init -
Please press Enter to activate this console.
[   27.390919] kmodloader: loading kernel modules from /etc/modules.d/*
[   27.582980] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   27.752933] tun: Universal TUN/TAP device driver, 1.6
[   27.813408] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   28.026723] ipip: IPv4 and MPLS over IPv4 tunneling driver
[   28.163552] l2tp_core: L2TP core driver, V2.0
[   28.276605] l2tp_netlink: L2TP netlink interface
[   28.381796] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[   28.528022] gre: GRE over IPv4 demultiplexor driver
[   28.646969] ip_gre: GRE over IPv4 tunneling driver
[   28.768295] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   28.911347] Netfilter messages via NETLINK v0.30.
[   29.028037] ip_set: protocol 6
[   29.155664] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[   29.251634] Backport generated by backports.git backports-20160324-13-g24da7d3c
[   29.668940] u32 classifier
[   29.701297]     input device check on
[   29.745125]     Actions configured
[   29.907381] Mirror/redirect action on
[   29.994772] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[   30.199722] fuse init (API version 7.26)
[   30.363527] usbcore: registered new interface driver cdc_wdm
[   30.508389] ip_tables: (C) 2000-2006 Netfilter Core Team
[   30.640146] lib80211: common routines for IEEE802.11 drivers
[   30.785114] ctnetlink v0.93: registering with nfnetlink.
[   31.038574] wireguard: WireGuard 0.0.20170706 loaded. See www.wireguard.io for information.
[   31.138725] wireguard: Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   31.530034] xt_time: kernel timezone is -0000
[   31.649967] usbcore: registered new interface driver ath9k_htc
[   31.842103] PPP generic driver version 2.4.2
[   31.949656] PPP MPPE Compression module registered
[   32.066995] NET: Registered protocol family 24
[   32.176907] PPTP driver version 0.8.5
[   32.256409] usbcore: registered new interface driver qmi_wwan
[   32.428717] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[   32.551599] kmodloader: done loading kernel modules from /etc/modules.d/*
[   48.347387] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   48.779243] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   49.501489] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   50.095392] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  104.325508] random: crng init done

Seems that the driver found the phy,but still failed to connect to the port,maybe we need to add phy node to the DTS?
And can you compile the debain kernel with these patches?

output of ls -lR /proc/device-tree/dsa -R
root@debian:~# ls -lR /proc/device-tree/dsa -R
/proc/device-tree/dsa:
total 0
-r--r--r--  1 root root  4 Dec 31 16:03 #address-cells
-r--r--r--  1 root root  4 Dec 31 16:03 #size-cells
drwxr-xr-x  3 root root  0 Dec 31 16:03 .
drwxr-xr-x 10 root root  0 Dec 31 16:03 ..
-r--r--r--  1 root root 12 Dec 31 16:03 compatible
-r--r--r--  1 root root  4 Dec 31 16:03 dsa,ethernet
-r--r--r--  1 root root  4 Dec 31 16:03 dsa,mii-bus
-r--r--r--  1 root root  4 Dec 31 16:03 name
-r--r--r--  1 root root  9 Dec 31 16:03 status
drwxr-xr-x  8 root root  0 Dec 31 16:03 switch@10,0

/proc/device-tree/dsa/switch@10,0:
total 0
-r--r--r-- 1 root root 4 Dec 31 16:03 #address-cells
-r--r--r-- 1 root root 4 Dec 31 16:03 #size-cells
drwxr-xr-x 8 root root 0 Dec 31 16:03 .
drwxr-xr-x 3 root root 0 Dec 31 16:03 ..
-r--r--r-- 1 root root 7 Dec 31 16:03 name
drwxr-xr-x 2 root root 0 Dec 31 16:03 port@0
drwxr-xr-x 2 root root 0 Dec 31 16:03 port@1
drwxr-xr-x 2 root root 0 Dec 31 16:03 port@2
drwxr-xr-x 2 root root 0 Dec 31 16:03 port@3
drwxr-xr-x 2 root root 0 Dec 31 16:03 port@4
drwxr-xr-x 2 root root 0 Dec 31 16:03 port@5
-r--r--r-- 1 root root 8 Dec 31 16:03 reg

/proc/device-tree/dsa/switch@10,0/port@0:
total 0
drwxr-xr-x 2 root root 0 Dec 31 16:03 .
drwxr-xr-x 8 root root 0 Dec 31 16:03 ..
-r--r--r-- 1 root root 5 Dec 31 16:03 label
-r--r--r-- 1 root root 5 Dec 31 16:03 name
-r--r--r-- 1 root root 4 Dec 31 16:03 reg

/proc/device-tree/dsa/switch@10,0/port@1:
total 0
drwxr-xr-x 2 root root 0 Dec 31 16:03 .
drwxr-xr-x 8 root root 0 Dec 31 16:03 ..
-r--r--r-- 1 root root 5 Dec 31 16:03 label
-r--r--r-- 1 root root 5 Dec 31 16:03 name
-r--r--r-- 1 root root 4 Dec 31 16:03 reg

/proc/device-tree/dsa/switch@10,0/port@2:
total 0
drwxr-xr-x 2 root root 0 Dec 31 16:03 .
drwxr-xr-x 8 root root 0 Dec 31 16:03 ..
-r--r--r-- 1 root root 5 Dec 31 16:03 label
-r--r--r-- 1 root root 5 Dec 31 16:03 name
-r--r--r-- 1 root root 4 Dec 31 16:03 reg

/proc/device-tree/dsa/switch@10,0/port@3:
total 0
drwxr-xr-x 2 root root 0 Dec 31 16:03 .
drwxr-xr-x 8 root root 0 Dec 31 16:03 ..
-r--r--r-- 1 root root 5 Dec 31 16:03 label
-r--r--r-- 1 root root 5 Dec 31 16:03 name
-r--r--r-- 1 root root 4 Dec 31 16:03 reg

/proc/device-tree/dsa/switch@10,0/port@4:
total 0
drwxr-xr-x 2 root root 0 Dec 31 16:03 .
drwxr-xr-x 8 root root 0 Dec 31 16:03 ..
-r--r--r-- 1 root root 4 Dec 31 16:03 label
-r--r--r-- 1 root root 5 Dec 31 16:03 name
-r--r--r-- 1 root root 4 Dec 31 16:03 reg

/proc/device-tree/dsa/switch@10,0/port@5:
total 0
drwxr-xr-x 2 root root 0 Dec 31 16:03 .
drwxr-xr-x 8 root root 0 Dec 31 16:03 ..
-r--r--r-- 1 root root 4 Dec 31 16:03 label
-r--r--r-- 1 root root 5 Dec 31 16:03 name
-r--r--r-- 1 root root 4 Dec 31 16:03 reg

output of ls -lR /sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii*

us-mii*bian:~# ls  -lR /sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bu
/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a:
total 0
drwxr-xr-x 4 root root    0 Dec 31 16:03 .
drwxr-xr-x 4 root root    0 Dec 31 16:03 ..
lrwxrwxrwx 1 root root    0 Dec 31 16:03 driver -> ../../../../../../../bus/mdio_bus/drivers/mv88e6085
drwxr-xr-x 3 root root    0 Dec 31 16:03 mdio_bus
lrwxrwxrwx 1 root root    0 Dec 31 16:03 of_node -> ../../../../../../../firmware/devicetree/base/ocp@f1000000/mdio-bus@72004/switch@10
drwxr-xr-x 2 root root    0 Dec 31 16:03 power
lrwxrwxrwx 1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../bus/mdio_bus
-rw-r--r-- 1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus:
total 0
drwxr-xr-x  3 root root 0 Dec 31 16:03 .
drwxr-xr-x  4 root root 0 Dec 31 16:03 ..
drwxr-xr-x 10 root root 0 Dec 31 16:03 mv88e6xxx-0

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0:
total 0
drwxr-xr-x 10 root root    0 Dec 31 16:03 .
drwxr-xr-x  3 root root    0 Dec 31 16:03 ..
lrwxrwxrwx  1 root root    0 Dec 31 16:03 device -> ../../../f1072004.mdio-bus-mii:0a
drwxr-xr-x  3 root root    0 Dec 31 16:03 mv88e6xxx-0:10
drwxr-xr-x  3 root root    0 Dec 31 16:03 mv88e6xxx-0:11
drwxr-xr-x  3 root root    0 Dec 31 16:03 mv88e6xxx-0:12
drwxr-xr-x  3 root root    0 Dec 31 16:03 mv88e6xxx-0:13
drwxr-xr-x  3 root root    0 Dec 31 16:03 mv88e6xxx-0:14
drwxr-xr-x  3 root root    0 Dec 31 16:03 mv88e6xxx-0:15
drwxr-xr-x  3 root root    0 Dec 31 16:03 mv88e6xxx-0:1b
drwxr-xr-x  2 root root    0 Dec 31 16:03 power
lrwxrwxrwx  1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../../../class/mdio_bus
-rw-r--r--  1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:10:
total 0
drwxr-xr-x  3 root root    0 Dec 31 16:03 .
drwxr-xr-x 10 root root    0 Dec 31 16:03 ..
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_has_fixups
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_id
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_interface
drwxr-xr-x  2 root root    0 Dec 31 16:03 power
lrwxrwxrwx  1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../../../../bus/mdio_bus
-rw-r--r--  1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:10/power:
total 0
drwxr-xr-x 2 root root    0 Dec 31 16:03 .
drwxr-xr-x 3 root root    0 Dec 31 16:03 ..
-rw-r--r-- 1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Dec 31 16:03 control
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_suspended_time

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:11:
total 0
drwxr-xr-x  3 root root    0 Dec 31 16:03 .
drwxr-xr-x 10 root root    0 Dec 31 16:03 ..
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_has_fixups
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_id
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_interface
drwxr-xr-x  2 root root    0 Dec 31 16:03 power
lrwxrwxrwx  1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../../../../bus/mdio_bus
-rw-r--r--  1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:11/power:
total 0
drwxr-xr-x 2 root root    0 Dec 31 16:03 .
drwxr-xr-x 3 root root    0 Dec 31 16:03 ..
-rw-r--r-- 1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Dec 31 16:03 control
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_suspended_time

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:12:
total 0
drwxr-xr-x  3 root root    0 Dec 31 16:03 .
drwxr-xr-x 10 root root    0 Dec 31 16:03 ..
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_has_fixups
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_id
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_interface
drwxr-xr-x  2 root root    0 Dec 31 16:03 power
lrwxrwxrwx  1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../../../../bus/mdio_bus
-rw-r--r--  1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:12/power:
total 0
drwxr-xr-x 2 root root    0 Dec 31 16:03 .
drwxr-xr-x 3 root root    0 Dec 31 16:03 ..
-rw-r--r-- 1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Dec 31 16:03 control
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_suspended_time

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:13:
total 0
drwxr-xr-x  3 root root    0 Dec 31 16:03 .
drwxr-xr-x 10 root root    0 Dec 31 16:03 ..
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_has_fixups
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_id
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_interface
drwxr-xr-x  2 root root    0 Dec 31 16:03 power
lrwxrwxrwx  1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../../../../bus/mdio_bus
-rw-r--r--  1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:13/power:
total 0
drwxr-xr-x 2 root root    0 Dec 31 16:03 .
drwxr-xr-x 3 root root    0 Dec 31 16:03 ..
-rw-r--r-- 1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Dec 31 16:03 control
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_suspended_time

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:14:
total 0
drwxr-xr-x  3 root root    0 Dec 31 16:03 .
drwxr-xr-x 10 root root    0 Dec 31 16:03 ..
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_has_fixups
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_id
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_interface
drwxr-xr-x  2 root root    0 Dec 31 16:03 power
lrwxrwxrwx  1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../../../../bus/mdio_bus
-rw-r--r--  1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:14/power:
total 0
drwxr-xr-x 2 root root    0 Dec 31 16:03 .
drwxr-xr-x 3 root root    0 Dec 31 16:03 ..
-rw-r--r-- 1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Dec 31 16:03 control
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_suspended_time

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:15:
total 0
drwxr-xr-x  3 root root    0 Dec 31 16:03 .
drwxr-xr-x 10 root root    0 Dec 31 16:03 ..
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_has_fixups
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_id
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_interface
drwxr-xr-x  2 root root    0 Dec 31 16:03 power
lrwxrwxrwx  1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../../../../bus/mdio_bus
-rw-r--r--  1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:15/power:
total 0
drwxr-xr-x 2 root root    0 Dec 31 16:03 .
drwxr-xr-x 3 root root    0 Dec 31 16:03 ..
-rw-r--r-- 1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Dec 31 16:03 control
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_suspended_time

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:1b:
total 0
drwxr-xr-x  3 root root    0 Dec 31 16:03 .
drwxr-xr-x 10 root root    0 Dec 31 16:03 ..
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_has_fixups
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_id
-r--r--r--  1 root root 4096 Dec 31 16:03 phy_interface
drwxr-xr-x  2 root root    0 Dec 31 16:03 power
lrwxrwxrwx  1 root root    0 Dec 31 16:03 subsystem -> ../../../../../../../../../../bus/mdio_bus
-rw-r--r--  1 root root 4096 Dec 31 16:03 uevent

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:1b/power:
total 0
drwxr-xr-x 2 root root    0 Dec 31 16:03 .
drwxr-xr-x 3 root root    0 Dec 31 16:03 ..
-rw-r--r-- 1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Dec 31 16:03 control
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_suspended_time

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/mdio_bus/mv88e6xxx-0/power:
total 0
drwxr-xr-x  2 root root    0 Dec 31 16:03 .
drwxr-xr-x 10 root root    0 Dec 31 16:03 ..
-rw-r--r--  1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r--  1 root root 4096 Dec 31 16:03 control
-r--r--r--  1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r--  1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r--  1 root root 4096 Dec 31 16:03 runtime_suspended_time

/sys/class/mdio_bus/f1072004.mdio-bus-mii/f1072004.mdio-bus-mii:0a/power:
total 0
drwxr-xr-x 2 root root    0 Dec 31 16:03 .
drwxr-xr-x 4 root root    0 Dec 31 16:03 ..
-rw-r--r-- 1 root root 4096 Dec 31 16:03 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Dec 31 16:03 control
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_active_time
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_status
-r--r--r-- 1 root root 4096 Dec 31 16:03 runtime_suspended_time
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: