Welcome! Log In Create A New Profile

Advanced

Debian on QiZhiTong 501mv2

Posted by wacke 
Re: Debian on QiZhiTong 501mv2
April 20, 2017 03:27PM
wacke,

> I found the barebox project,is there anyway to get
> the marvell sdk?I want to get the armada 370 soc w
> ith 88e6171 switch working on barebox.
> I also found this project: https://github.com/Marv
> ellEmbeddedProcessors/u-boot-marvell,is there have
> the switch driver?

I've looked into the u-boot 88e6171 switch driver before for the EA4500, and stopped because it was too time consuming for me, and there are only a few people who have that device . And I also wanted to wait until the 6175 switch is stable in mainline (I think it is now). My plan will be adapting the 6175 driver for the 6171.

If you are interested in that, then I'd suggest you start with the 6175.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
April 20, 2017 08:01PM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>
> > I found the barebox project,is there anyway to g
> et
> > the marvell sdk?I want to get the armada 370 soc
> w
> > ith 88e6171 switch working on barebox.
> > I also found this project: https://github.com/Ma
> rv
> > ellEmbeddedProcessors/u-boot-marvell,is there ha
> ve
> > the switch driver?
>
> I've looked into the u-boot 88e6171 switch driver
> before for the EA4500, and stopped because it was
> too time consuming for me, and there are only a fe
> w people who have that device . And I also wanted
> to wait until the 6175 switch is stable in mainlin
> e (I think it is now). My plan will be adapting th
> e 6175 driver for the 6171.
>
> If you are interested in that, then I'd suggest yo
> u start with the 6175.

Can this project on github (https://github.com/MarvellEmbeddedProcessors/u-boot-marvell) compile the uboot?
I've cloned this project,but I don't know how to start...
Re: Debian on QiZhiTong 501mv2
April 25, 2017 02:09PM
Got it!!!!!
I have driven one port wan port !!! ping-able!!!

MB302# ping 192.168.1.10   
Using egiga1 device
host 192.168.1.10 is alive
MB302# version

U-Boot 2017.05-rc2 (Apr 26 2017 - 02:55:18 +0800)
Marvell-MB302
arm-linux-gnueabi-gcc (Debian 6.3.0-12) 6.3.0 20170406
GNU ld (GNU Binutils for Debian) 2.28
MB302# mii info
PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00, 100baseT, FDX
MB302#


but 1116 driver only 100Mbps,to be continued!!!


beijing time 3:10 26 april, 2017!!!!
Re: Debian on QiZhiTong 501mv2
April 26, 2017 09:38PM
youxiaojie Wrote:
-------------------------------------------------------
> Got it!!!!!
> I have driven one port wan port !!! ping-able!!!
>
>
> MB302# ping 192.168.1.10
> Using egiga1 device
> host 192.168.1.10 is alive
> MB302# version
> 
> U-Boot 2017.05-rc2 (Apr 26 2017 - 02:55:18 +0800)
> Marvell-MB302
> arm-linux-gnueabi-gcc (Debian 6.3.0-12) 6.3.0 2017
> 0406
> GNU ld (GNU Binutils for Debian) 2.28
> MB302# mii info
> PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00,
> 100baseT, FDX
> MB302#
>
>
>
> but 1116 driver only 100Mbps,to be continued!!!
>
>
> beijing time 3:10 26 april, 2017!!!!

牛。。。可以加个QQ不。。。我的QQ:120634404
Re: Debian on QiZhiTong 501mv2
April 26, 2017 10:03PM
Hey guys,

Please post in English. If it is a output of Linux commands in your installation then it's is OK. But here we communicate in English for all other questions/answer/log...

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
April 27, 2017 12:17PM
sure....thank you.

"牛。。。可以加个QQ不。。。我的QQ:120634404"
this means " I wan't to chat with you. my QQ is 120634404"
thank you bodhi.
by the way, I make your source, but could not generate u-boot.kwb, where I get mistake?
eg.
make guruplug-defconfig
make CROSS_COMPILE=arm-linux-gnueabi-
above commands are ok for mainline uboot source. get u-boot.kwb automatically.
Re: Debian on QiZhiTong 501mv2
April 27, 2017 04:29PM
youxiaojie Wrote:
-------------------------------------------------------
> sure....thank you.
>
> "牛。。。可以加个QQ不。。。我的QQ:120634404"
> this means " I wan't to chat with you. my QQ is 12
> 0634404"
> thank you bodhi.
> by the way, I make your source, but could not gene
> rate u-boot.kwb, where I get mistake?
> eg.
>
> make guruplug-defconfig
> make CROSS_COMPILE=arm-linux-gnueabi-
>
> above commands are ok for mainline uboot source. g
> et u-boot.kwb automatically.

Try

make guruplug_config

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
April 27, 2017 07:50PM
youxiaojie Wrote:
-------------------------------------------------------
> sure....thank you.
>
> "牛。。。可以加个QQ不。。。我的QQ:120634404"
> this means " I wan't to chat with you. my QQ is 12
> 0634404"
> thank you bodhi.
> by the way, I make your source, but could not gene
> rate u-boot.kwb, where I get mistake?
> eg.
>
> make guruplug-defconfig
> make CROSS_COMPILE=arm-linux-gnueabi-
>
> above commands are ok for mainline uboot source. g
> et u-boot.kwb automatically.

So what's your QQ number? Thanks.
Re: Debian on QiZhiTong 501mv2
April 28, 2017 03:34AM
MB302 #mii info            
PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00, 1000baseT, FDX //plugged to pc
MB302 #ping 192.168.1.10
Using egiga1 device
host 192.168.1.10 is alive
MB302 #mii info         
PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00,  10baseT, HDX //unplugged
MB302 #mii info
PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00, 1000baseT, FDX //plugged to router
MB302 #

ok, I make it 1000Mbps. pingable ether through switch or direct connexion.

20170408 16:32 CST
Re: Debian on QiZhiTong 501mv2
April 29, 2017 03:32AM
youxiaojie Wrote:
-------------------------------------------------------
>
> MB302 #mii info
> PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00,
> 1000baseT, FDX //plugged to pc
> MB302 #ping 192.168.1.10
> Using egiga1 device
> host 192.168.1.10 is alive
> MB302 #mii info
> PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00,
> 10baseT, HDX //unplugged
> MB302 #mii info
> PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00,
> 1000baseT, FDX //plugged to router
> MB302 #
>
>
> ok, I make it 1000Mbps. pingable ether through swi
> tch or direct connexion.
>
> 20170408 16:32 CST

Good job :) keep going. When you got stuck somewhere, post the question.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 11, 2017 06:33AM
bodhi Wrote:
-------------------------------------------------------
> youxiaojie Wrote:
> --------------------------------------------------
> -----
> >
> > MB302 #mii info
> > PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00
> ,
> > 1000baseT, FDX //plugged to pc
> > MB302 #ping 192.168.1.10
> > Using egiga1 device
> > host 192.168.1.10 is alive
> > MB302 #mii info
> > PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00
> ,
> > 10baseT, HDX //unplugged
> > MB302 #mii info
> > PHY 0x01: OUI = 0x5043, Model = 0x24, Rev = 0x00
> ,
> > 1000baseT, FDX //plugged to router
> > MB302 #
> >
> >
> > ok, I make it 1000Mbps. pingable ether through s
> wi
> > tch or direct connexion.
> >
> > 20170408 16:32 CST
>
> Good job :) keep going. When you got stuck somewhe
> re, post the question.

Hi bodhi,
As the lede update the kernel to 4.9.x,the 88e6161 switch stop working again,below is the kernel log:


NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ffe00 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 02000000 ...
   Image Name:   ARM LEDE Linux-4.9.36
   Created:      2017-07-08  21:19:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2027604 Bytes =  1.9 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.36 (Wacke@HOME-Server) (gcc version 7.1.0 (LEDE GCC 7.1.0 r4235-61eb18d3f7) ) #0 Sat Jul 8 21:19:31 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: 513276K/524288K available (4418K kernel code, 281K rwdata, 1208K rodata, 248K init, 225K bss, 11012K 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 - 0xc0458dc8   (4420 kB)
[    0.000000]       .init : 0xc0588000 - 0xc05c6000   ( 248 kB)
[    0.000000]       .data : 0xc05c6000 - 0xc060c540   ( 282 kB)
[    0.000000]        .bss : 0xc060c540 - 0xc0644970   ( 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.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000087] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090092] pid_max: default: 32768 minimum: 301
[    0.090226] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090245] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091034] CPU: Testing write buffer coherency: ok
[    0.091408] Setting up static identity map for 0x81e0 - 0x821c
[    0.091674] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.096847] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.096874] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.096985] pinctrl core: initialized pinctrl subsystem
[    0.098091] NET: Registered protocol family 16
[    0.098829] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.100380] cpuidle: using governor ladder
[    0.100715] Feroceon L2: Enabling L2
[    0.100755] Feroceon L2: Cache support initialised.
[    0.101032] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.101139] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.106041] No ATAGs?
[    0.126316] SCSI subsystem initialized
[    0.127238] usbcore: registered new interface driver usbfs
[    0.127335] usbcore: registered new interface driver hub
[    0.127416] usbcore: registered new device driver usb
[    0.129868] clocksource: Switched to clocksource orion_clocksource
[    0.147993] NET: Registered protocol family 2
[    0.148681] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.148758] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.148831] TCP: Hash tables configured (established 4096 bind 4096)
[    0.148975] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.149005] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.149210] NET: Registered protocol family 1
[    0.152485] Crashlog allocated RAM at address 0x3f00000
[    0.153012] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.162570] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.162585] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.171478] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.171494] io scheduler noop registered
[    0.171503] io scheduler deadline registered (default)
[    0.172828] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.216307] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.217423] console [ttyS0] disabled
[    0.217494] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    5.218748] console [ttyS0] enabled
[    5.261699] sata_mv f1080000.sata: slots 32 ports 1
[    5.322665] scsi host0: sata_mv
[    5.360753] ata1: SATA max UDMA/133 irq 32
[    5.410348] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[    5.486435] nand: ST Micro NAND 64MiB 3,3V 8-bit
[    5.541736] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[    5.629342] Scanning device for bad blocks
[    5.809076] Bad eraseblock 2455 at 0x00000265c000
[    5.952634] 3 ofpart partitions found on MTD device orion_nand
[    6.022539] Creating 3 MTD partitions on "orion_nand":
[    6.084106] 0x000000000000-0x000000100000 : "u-boot"
[    6.145509] 0x000000100000-0x000000500000 : "kernel"
[    6.206449] 0x000000500000-0x000004000000 : "ubi"
[    6.267732] libphy: Fixed MDIO Bus: probed
[    6.316807] libphy: mdio_driver_register: mv88e6085
[    6.375537] libphy: orion_mdio_bus: probed
[    6.424768] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    6.507682] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[    6.612609] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[    6.716941] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.795094] ehci-pci: EHCI PCI platform driver
[    6.848395] ehci-orion: EHCI orion driver
[    6.896511] orion-ehci f1050000.ehci: EHCI Host Controller
[    6.962206] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.054094] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    7.149893] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.222625] hub 1-0:1.0: USB hub found
[    7.267554] ata1: SATA link down (SStatus 0 SControl F300)
[    7.333492] hub 1-0:1.0: 1 port detected
[    7.381007] usbcore: registered new interface driver usb-storage
[    7.453263] rtc-mv f1010300.rtc: invalid RTC date, resetting to January 1st, 2013
[    7.543202] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    7.625629] i2c /dev entries driver
[    7.668199] orion_wdt: Initial timeout 21 sec
[    7.721023] mvsdio f1090000.mvsdio: Got CD GPIO
[    7.835630] marvell-cesa f1030000.crypto: CESA device successfully registered
[    7.922043] NET: Registered protocol family 10
[    7.977256] NET: Registered protocol family 17
[    8.030612] Distributed Switch Architecture driver version 0.1
[    8.101239] dsa dsa@0: switch 0x161 detected: Marvell 88E6161, revision 2
[    8.182764] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.268239] libphy: mv88e6xxx SMI: probed
[    8.316279] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Marvell 88E6161 switch
[    8.418951] random: fast init done
[    8.530925] hub 1-1:1.0: USB hub found
[    8.577118] hub 1-1:1.0: 2 ports detected
[    8.684623] dsa dsa@0 lan1: no phy at 0
[    8.730513] dsa dsa@0 lan1: failed to connect to port 0: -19
[    8.798303] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[    8.892152] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 0(lan1): -19
[    9.012813] dsa dsa@0 lan2: no phy at 1
[    9.058730] dsa dsa@0 lan2: failed to connect to port 1: -19
[    9.126515] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[    9.220246] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 1(lan2): -19
[    9.340886] dsa dsa@0 lan3: no phy at 2
[    9.386815] dsa dsa@0 lan3: failed to connect to port 2: -19
[    9.454618] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[    9.548303] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 2(lan3): -19
[    9.668873] dsa dsa@0 lan4: no phy at 3
[    9.714819] dsa dsa@0 lan4: failed to connect to port 3: -19
[    9.782620] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[    9.876292] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 3(lan4): -19
[    9.996879] dsa dsa@0 aux: no phy at 4
[   10.041777] dsa dsa@0 aux: failed to connect to port 4: -19
[   10.108535] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   10.202232] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 4(aux): -19
[   10.321108] 8021q: 802.1Q VLAN Support v1.8
[   10.374745] UBI: auto-attach mtd2
[   10.414491] ubi0: attaching mtd2
[   10.780000] ubi0: scanning is finished
[   10.837309] ubi0: attached mtd2 (name "ubi", size 59 MiB)
[   10.902052] ubi0: PEB size: 16384 bytes (16 KiB), LEB size: 15872 bytes
[   10.981283] ubi0: min./max. I/O unit sizes: 512/512, sub-page size 256
[   11.059513] ubi0: VID header offset: 256 (aligned 256), data offset: 512
[   11.139814] ubi0: good PEBs: 3775, bad PEBs: 1, corrupted PEBs: 0
[   11.212834] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 92
[   11.298347] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1944562274
[   11.407822] ubi0: available PEBs: 0, total reserved PEBs: 3775, PEBs reserved for bad PEB handling: 79
[   11.520057] ubi0: background thread "ubi_bgt0d" started, PID 928
[   11.592765] block ubiblock0_0: created from ubi0:0(rootfs)
[   11.658449] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[   11.741893] rtc-mv f1010300.rtc: setting system clock to 2013-01-01 07:30:38 UTC (1357025438)
[   11.849226] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[   11.935643] Freeing unused kernel memory: 248K (c0588000 - c05c6000)
[   12.011789] This architecture does not have kernel memory protection.
[   12.468476] init: Console is alive
[   12.509386] init: - watchdog -
[   12.586961] 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
[   16.669118] mount_root: loading kmods from internal overlay
[   16.742047] mount_root: failed to launch kmodloader from internal overlay
[   17.246647] UBIFS (ubi0:1): recovery needed
[   17.296939] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 991
[   17.401698] UBIFS (ubi0:1): recovery completed
[   17.455036] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   17.548907] UBIFS (ubi0:1): LEB size: 15872 bytes (15 KiB), min./max. I/O unit sizes: 512 bytes/512 bytes
[   17.663576] UBIFS (ubi0:1): FS size: 18141696 bytes (17 MiB, 1143 LEBs), journal size 904704 bytes (0 MiB, 57 LEBs)
[   17.788672] UBIFS (ubi0:1): reserved for root: 856876 bytes (836 KiB)
[   17.865850] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID 02F58B8F-FB81-4062-A392-A88D1F70FEB1, small LPT model
[   18.003790] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   18.089520] block: extroot: not configured
[   18.138712] UBIFS (ubi0:1): un-mount UBI device 0
[   18.195013] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" stops
[   18.280441] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 993
[   18.370784] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   18.464569] UBIFS (ubi0:1): LEB size: 15872 bytes (15 KiB), min./max. I/O unit sizes: 512 bytes/512 bytes
[   18.579246] UBIFS (ubi0:1): FS size: 18141696 bytes (17 MiB, 1143 LEBs), journal size 904704 bytes (0 MiB, 57 LEBs)
[   18.704337] UBIFS (ubi0:1): reserved for root: 856876 bytes (836 KiB)
[   18.781519] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID 02F58B8F-FB81-4062-A392-A88D1F70FEB1, small LPT model
[   19.119249] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   19.204742] block: extroot: not configured
[   19.255001] mount_root: switching to ubifs overlay
[   19.320062] urandom-seed: Seeding with /etc/urandom.seed
[   19.443355] procd: - early -
[   19.478369] procd: - watchdog -
[   20.559439] procd: - watchdog -
[   20.598323] procd: - ubus -
[   20.825977] procd: - init -
Please press Enter to activate this console.
[  116.349916] random: crng init done

and the latest dts file:
/*
 * 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";
};

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

&eth1 {
	status = "okay";	
};

the boot log of debian:
## Booting image at 00800000 ...
   Image Name:   Linux-4.11.3-kirkwood-tld-2
   Created:      2017-07-11  13:03:23 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3912680 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: 506312K/524288K available (8192K kernel code, 786K rwdata, 2016K rodata, 1024K init, 280K bss, 17976K 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.000456] Console: colour dummy device 80x30
[    0.000490] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090106] pid_max: default: 32768 minimum: 301
[    0.090311] 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.091308] CPU: Testing write buffer coherency: ok
[    0.092302] Setting up static identity map for 0x100000 - 0x100058
[    0.092533] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.095988] devtmpfs: initialized
[    0.100436] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.100461] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.100762] prandom: seed boundary self test passed
[    0.104514] prandom: 100 self tests passed
[    0.104525] pinctrl core: initialized pinctrl subsystem
[    0.105709] NET: Registered protocol family 16
[    0.106552] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.108091] cpuidle: using governor ladder
[    0.108152] cpuidle: using governor menu
[    0.108569] Feroceon L2: Enabling L2
[    0.108610] Feroceon L2: Cache support initialised.
[    0.108934] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.109039] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.114174] No ATAGs?
[    0.123156] vgaarb: loaded
[    0.123472] SCSI subsystem initialized
[    0.123955] usbcore: registered new interface driver usbfs
[    0.124030] usbcore: registered new interface driver hub
[    0.124111] usbcore: registered new device driver usb
[    0.125211] clocksource: Switched to clocksource orion_clocksource
[    0.217434] VFS: Disk quotas dquot_6.6.0
[    0.217514] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.228166] NET: Registered protocol family 2
[    0.228946] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.229022] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.229092] TCP: Hash tables configured (established 4096 bind 4096)
[    0.229267] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.229298] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.229514] NET: Registered protocol family 1
[    0.229957] RPC: Registered named UNIX socket transport module.
[    0.229970] RPC: Registered udp transport module.
[    0.229977] RPC: Registered tcp transport module.
[    0.229984] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.230391] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.231314] audit: initializing netlink subsys (disabled)
[    0.231767] Initialise system trusted keyrings
[    0.231911] audit: type=2000 audit(0.220:1): state=initialized audit_enabled=0 res=1
[    0.231980] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.232069] zbud: loaded
[    0.233055] NFS: Registering the id_resolver key type
[    0.233082] Key type id_resolver registered
[    0.233091] Key type id_legacy registered
[    0.233108] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.233117] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.233619] Key type cifs.spnego registered
[    0.233639] Key type cifs.idmap registered
[    0.233652] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.233913] fuse init (API version 7.26)
[    0.234298] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.234576] orangefs_init: module version upstream loaded
[    0.234587] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.555218] random: fast init done
[    4.344272] Key type asymmetric registered
[    4.344288] Asymmetric key parser 'x509' registered
[    4.344356] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.344368] io scheduler noop registered
[    4.344376] io scheduler deadline registered
[    4.344449] io scheduler cfq registered (default)
[    4.345737] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.347518] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    4.347538] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    4.347552] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    4.347565] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.347877] PCI: bus0: Fast back to back transfers disabled
[    4.347901] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.348061] PCI: bus1: Fast back to back transfers enabled
[    4.348132] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.348339] pcie_pme: probe of 0000:00:01.0:pcie001 failed with error -22
[    4.348786] mv_xor f1060800.xor: Marvell shared XOR driver
[    4.406002] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.406227] mv_xor f1060900.xor: Marvell shared XOR driver
[    4.466000] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.466457] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.467735] console [ttyS0] disabled
[    4.467796] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[   12.284535] console [ttyS0] enabled
[   12.336919] loop: module loaded
[   12.375014] sata_mv f1080000.sata: slots 32 ports 1
[   12.435361] scsi host0: sata_mv
[   12.473207] ata1: SATA max UDMA/133 irq 32
[   12.522882] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[   12.599012] nand: ST Micro NAND 64MiB 3,3V 8-bit
[   12.654288] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   12.741896] Scanning device for bad blocks
[   12.921919] Bad eraseblock 2455 at 0x00000265c000
[   12.978241] ata1: SATA link down (SStatus 0 SControl F300)
[   13.131174] 3 ofpart partitions found on MTD device orion_nand
[   13.201029] Creating 3 MTD partitions on "orion_nand":
[   13.262584] 0x000000000000-0x000000100000 : "u-boot"
[   13.323381] 0x000000100000-0x000000300000 : "uImage"
[   13.384243] 0x000000300000-0x000000800000 : "rootfs"
[   13.446337] libphy: Fixed MDIO Bus: probed
[   13.496345] libphy: orion_mdio_bus: probed
[   13.545406] mdio_bus f1072004.mdio-bus-mii: /ocp@f1000000/mdio-bus@72004/switch@0 has invalid PHY address
[   13.660061] mdio_bus f1072004.mdio-bus-mii: /ocp@f1000000/mdio-bus@72004/ethernet-phy@1 has invalid PHY address
[   13.780988] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 0
[   13.861304] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 1
[   13.941608] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 2
[   14.021917] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 3
[   14.102223] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 4
[   14.182530] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 5
[   14.262837] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 6
[   14.343145] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 7
[   14.423456] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 8
[   14.503761] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 9
[   14.584066] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 10
[   14.665416] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 11
[   14.746764] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 12
[   14.828114] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 13
[   14.909462] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 14
[   14.990812] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 15
[   15.072161] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 16
[   15.153595] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 17
[   15.234970] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 18
[   15.316313] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 19
[   15.397662] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 20
[   15.479013] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 21
[   15.560358] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 22
[   15.641707] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 23
[   15.723056] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 24
[   15.804405] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 25
[   15.885755] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 26
[   15.967104] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 27
[   16.048453] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 28
[   16.129831] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 29
[   16.211153] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 30
[   16.292500] mdio_bus f1072004.mdio-bus-mii: scan phy switch at address 31
[   16.373851] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 0
[   16.460580] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 1
[   16.547778] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 2
[   16.634569] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 3
[   16.721304] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 4
[   16.808083] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 5
[   16.894817] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 6
[   16.981514] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 7
[   17.068249] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 8
[   17.155073] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 9
[   17.241764] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 10
[   17.329457] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 11
[   17.417192] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 12
[   17.504972] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 13
[   17.592708] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 14
[   17.680489] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 15
[   17.768181] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 16
[   17.855918] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 17
[   17.943698] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 18
[   18.031390] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 19
[   18.119127] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 20
[   18.206906] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 21
[   18.294643] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 22
[   18.382423] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 23
[   18.470116] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 24
[   18.557852] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 25
[   18.645632] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 26
[   18.733324] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 27
[   18.821061] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 28
[   18.908841] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 29
[   18.996577] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 30
[   19.084357] mdio_bus f1072004.mdio-bus-mii: scan phy ethernet-phy at address 31
[   19.172305] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   19.255196] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[   20.455749] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[   20.560141] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   20.638383] ehci-pci: EHCI PCI platform driver
[   20.691643] ehci-orion: EHCI orion driver
[   20.739772] orion-ehci f1050000.ehci: EHCI Host Controller
[   20.805465] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   20.897375] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[   20.995243] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   21.067441] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   21.148834] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   21.235415] usb usb1: Product: EHCI Host Controller
[   21.293838] usb usb1: Manufacturer: Linux 4.11.3-kirkwood-tld-2 ehci_hcd
[   21.374143] usb usb1: SerialNumber: f1050000.ehci
[   21.431115] hub 1-0:1.0: USB hub found
[   21.476084] hub 1-0:1.0: 1 port detected
[   21.523861] mousedev: PS/2 mouse device common for all mice
[   21.591173] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[   21.673769] i2c /dev entries driver
[   21.716452] hidraw: raw HID events driver (C) Jiri Kosina
[   21.781540] drop_monitor: Initializing network drop monitor service
[   21.857061] NET: Registered protocol family 17
[   21.910935] dsa dsa@0: switch 0x161 detected: Marvell 88E6161, revision 2
[   21.992252] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   22.105361] libphy: mv88e6xxx SMI: probed
[   22.153572] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Marvell 88E6161 switch
[   22.295766] usb 1-1: New USB device found, idVendor=04cc, idProduct=1520
[   22.376095] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   22.462538] hub 1-1:1.0: USB hub found
[   22.507649] hub 1-1:1.0: 2 ports detected
[   22.658969] dsa dsa@0 lan1: no phy at 0
[   22.704947] dsa dsa@0 lan1: failed to connect to port 0: -19
[   22.772767] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   22.895379] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 0(lan1): -19
[   23.015873] dsa dsa@0 lan2: no phy at 1
[   23.061783] dsa dsa@0 lan2: failed to connect to port 1: -19
[   23.129635] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   23.245266] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 1(lan2): -19
[   23.365759] dsa dsa@0 lan3: no phy at 2
[   23.411754] dsa dsa@0 lan3: failed to connect to port 2: -19
[   23.479535] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   23.595265] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 2(lan3): -19
[   23.715749] dsa dsa@0 lan4: no phy at 3
[   23.761731] dsa dsa@0 lan4: failed to connect to port 3: -19
[   23.829512] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   23.945265] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 3(lan4): -19
[   24.065709] dsa dsa@0 aux: no phy at 4
[   24.110582] dsa dsa@0 aux: failed to connect to port 4: -19
[   24.177304] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   24.295264] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 4(aux): -19
[   24.414193] Key type dns_resolver registered
[   24.466146] registered taskstats version 1
[   24.515257] Loading compiled-in X.509 certificates
[   24.572641] zswap: loaded using pool lzo/zbud
[   24.627497] Key type big_key registered
[   24.675375] Key type encrypted registered
[   24.724896] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[   24.826453] Waiting 1 sec before mounting root device...
[   25.925262] Waiting for root device /...


I think we need to modify the dts file again,any idea to fix this?Thanks.



Edited 1 time(s). Last edit at 07/11/2017 08:09AM by wacke.
Re: Debian on QiZhiTong 501mv2
July 11, 2017 02:10PM
Hi wacke,

> As the lede update the kernel to 4.9.x,the 88e6161
> switch stop working again,below is the kernel log:

I'm not quite sure what you meant? did LEDE submit patch that effect the 88e6161 driver? or did they change these include files?
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 11, 2017 09:11PM
bodhi Wrote:
-------------------------------------------------------
> Hi wacke,
>
> > As the lede update the kernel to 4.9.x,the 88e61
> 61
> > switch stop working again,below is the kernel lo
> g:
>
> I'm not quite sure what you meant? did LEDE submit
> patch that effect the 88e6161 driver? or did they
> change these include files?
>
> #include "kirkwood.dtsi"
> #include "kirkwood-6281.dtsi"
>

I think the 4.9.x kernel change the dsa driver,before LEDE change kernel to 4.9.x,the 88e6161 driver works fine with kernel 4.4.x.
I've tried modify the dts file,but no lucky,the boot log says:
[    8.684623] dsa dsa@0 lan1: no phy at 0
[    8.730513] dsa dsa@0 lan1: failed to connect to port 0: -19

seems that driver can't find phy on 88e6161 switch?
Re: Debian on QiZhiTong 501mv2
July 12, 2017 03:11AM
wacke,

> [ 8.684623] dsa dsa@0 lan1: no phy at 0
> [ 8.730513] dsa dsa@0 lan1: failed to connect t
> o port 0: -19

> seems that driver can't find phy on 88e6161 switch

That's true. Sometime after kernel 4.4.x, all the Marvell ethernet devices were converted registered in PHY driver. The "compatible" field in DTS became obsolete. That's probably the reason why it said "no phy".

I still use "compatible" field in the DTS for the NSA3xx boxes to manage the auto-negotiation quirks of Zyxel boxes. But the actuall device was detected as a PHY.

I think we need to look at and modify the DTS a bit to accomodate that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 12, 2017 07:27AM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>
> > [ 8.684623] dsa dsa@0 lan1: no phy at 0
> > [ 8.730513] dsa dsa@0 lan1: failed to connect
> t
> > o port 0: -19
>
> > seems that driver can't find phy on 88e6161 swit
> ch
>
> That's true. Sometime after kernel 4.4.x, all the
> Marvell ethernet devices were converted registered
> in PHY driver. The "compatible" field in DTS becam
> e obsolete. That's probably the reason why it said
> "no phy".
>
> I still use "compatible" field in the DTS for the
> NSA3xx boxes to manage the auto-negotiation quirks
> of Zyxel boxes. But the actuall device was detecte
> d as a PHY.
>
> I think we need to look at and modify the DTS a bi
> t to accomodate that.


Do you know how to modify the DTS? I've tried a lot,but no lucky. Thanks.
Re: Debian on QiZhiTong 501mv2
July 12, 2017 06:05PM
wacke,

I will take a look at the DTS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 12, 2017 06:32PM
wacke,

I'm still looking, but here is some minor changes. The correct convention is to specify the register in the PHY. And device_type is not needed.


&mdio {
 	status = "okay";
 	ethphy1: ethernet-phy@1 {
-		device_type = "ethernet-phy";
-        /* overwrite reg property in board file */
+                reg = <1>;  		/* not sure reg 0 or reg 1 here */
 	};
 };

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 12, 2017 06:55PM
wacke,

I've doublechecked and sure that this switch is fully supported in kernel 4.11.3. I think it is just a matter adjusting the DTS. The Marvell DSA 88E6xxx has been restructured quite a bit since kernel 4.4 to 4.11.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 12, 2017 07:05PM
I see, this was the problem:

[   13.545406] mdio_bus f1072004.mdio-bus-mii: /ocp@f1000000/mdio-bus@72004/switch@0 has invalid PHY address
[   13.660061] mdio_bus f1072004.mdio-bus-mii: /ocp@f1000000/mdio-bus@72004/ethernet-phy@1 has invalid PHY address

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 12, 2017 08:40PM
bodhi Wrote:
-------------------------------------------------------
> I see, this was the problem:
>
>
> [   13.545406] mdio_bus f1072004.mdio-bus-mii: /oc
> p@f1000000/mdio-bus@72004/switch@0 has invalid PHY
> address
> [   13.660061] mdio_bus f1072004.mdio-bus-mii: /oc
> p@f1000000/mdio-bus@72004/ethernet-phy@1 has inval
> id PHY address
>

Thanks,I'll get a try later.
Re: Debian on QiZhiTong 501mv2
July 13, 2017 07:13AM
bodhi Wrote:
-------------------------------------------------------
> I see, this was the problem:
>
>
> [   13.545406] mdio_bus f1072004.mdio-bus-mii: /oc
> p@f1000000/mdio-bus@72004/switch@0 has invalid PHY
> address
> [   13.660061] mdio_bus f1072004.mdio-bus-mii: /oc
> p@f1000000/mdio-bus@72004/ethernet-phy@1 has inval
> id PHY address
>
Hi bodhi,
I've tried to modify the DTS,but still no lucky.
boot log(reg =1 or reg=0 are the same):
3911879 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.11.3-kirkwood-tld-2
   Created:      2017-07-13  11:47:16 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3911815 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.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000450] Console: colour dummy device 80x30
[    0.000483] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090105] pid_max: default: 32768 minimum: 301
[    0.090312] Security Framework initialized
[    0.090434] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090452] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091298] CPU: Testing write buffer coherency: ok
[    0.092298] Setting up static identity map for 0x100000 - 0x100058
[    0.092529] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.096008] devtmpfs: initialized
[    0.100113] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.100139] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.100437] prandom: seed boundary self test passed
[    0.104187] prandom: 100 self tests passed
[    0.104199] pinctrl core: initialized pinctrl subsystem
[    0.105392] NET: Registered protocol family 16
[    0.106247] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.107753] cpuidle: using governor ladder
[    0.107816] cpuidle: using governor menu
[    0.108233] Feroceon L2: Enabling L2
[    0.108274] Feroceon L2: Cache support initialised.
[    0.108612] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.108713] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.113638] No ATAGs?
[    0.122478] vgaarb: loaded
[    0.122803] SCSI subsystem initialized
[    0.123272] usbcore: registered new interface driver usbfs
[    0.123347] usbcore: registered new interface driver hub
[    0.123428] usbcore: registered new device driver usb
[    0.124501] clocksource: Switched to clocksource orion_clocksource
[    0.216561] VFS: Disk quotas dquot_6.6.0
[    0.216641] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.227303] NET: Registered protocol family 2
[    0.228067] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.228144] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.228212] TCP: Hash tables configured (established 4096 bind 4096)
[    0.228381] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.228411] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.228632] NET: Registered protocol family 1
[    0.229075] RPC: Registered named UNIX socket transport module.
[    0.229088] RPC: Registered udp transport module.
[    0.229095] RPC: Registered tcp transport module.
[    0.229102] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.229507] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.230423] audit: initializing netlink subsys (disabled)
[    0.230876] Initialise system trusted keyrings
[    0.231020] audit: type=2000 audit(0.220:1): state=initialized audit_enabled=0 res=1
[    0.231091] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.231179] zbud: loaded
[    0.232174] NFS: Registering the id_resolver key type
[    0.232198] Key type id_resolver registered
[    0.232207] Key type id_legacy registered
[    0.232224] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.232233] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.232732] Key type cifs.spnego registered
[    0.232752] Key type cifs.idmap registered
[    0.232765] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.233026] fuse init (API version 7.26)
[    0.233402] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.233675] orangefs_init: module version upstream loaded
[    0.233687] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.554509] random: fast init done
[    4.343232] Key type asymmetric registered
[    4.343248] Asymmetric key parser 'x509' registered
[    4.343313] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.343325] io scheduler noop registered
[    4.343333] io scheduler deadline registered
[    4.343408] io scheduler cfq registered (default)
[    4.344741] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.346511] mv_xor f1060800.xor: Marvell shared XOR driver
[    4.405295] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.405524] mv_xor f1060900.xor: Marvell shared XOR driver
[    4.465290] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.465731] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.466938] console [ttyS0] disabled
[    4.466998] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[   11.589062] console [ttyS0] enabled
[   11.641475] loop: module loaded
[   11.679562] sata_mv f1080000.sata: slots 32 ports 1
[   11.739844] scsi host0: sata_mv
[   11.777733] ata1: SATA max UDMA/133 irq 32
[   11.827414] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x76
[   11.903543] nand: ST Micro NAND 64MiB 3,3V 8-bit
[   11.958815] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   12.046421] Scanning device for bad blocks
[   12.225946] ata1: SATA link down (SStatus 0 SControl F300)
[   12.292165] Bad eraseblock 2455 at 0x00000265c000
[   12.435736] 3 ofpart partitions found on MTD device orion_nand
[   12.435740] Creating 3 MTD partitions on "orion_nand":
[   12.435757] 0x000000000000-0x000000100000 : "u-boot"
[   12.437035] 0x000000100000-0x000000500000 : "kernel"
[   12.438445] 0x000000500000-0x000004000000 : "ubi"
[   12.443765] libphy: Fixed MDIO Bus: probed
[   12.444740] libphy: orion_mdio_bus: probed
[   12.636287] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   12.637842] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:90:0b:19:ee:25
[   14.038271] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:90:0b:19:ee:26
[   14.142663] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   14.220878] ehci-pci: EHCI PCI platform driver
[   14.274145] ehci-orion: EHCI orion driver
[   14.322274] orion-ehci f1050000.ehci: EHCI Host Controller
[   14.387972] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   14.479880] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[   14.574534] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   14.646676] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   14.728019] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   14.814568] usb usb1: Product: EHCI Host Controller
[   14.873001] usb usb1: Manufacturer: Linux 4.11.3-kirkwood-tld-2 ehci_hcd
[   14.953307] usb usb1: SerialNumber: f1050000.ehci
[   15.010300] hub 1-0:1.0: USB hub found
[   15.055265] hub 1-0:1.0: 1 port detected
[   15.103101] mousedev: PS/2 mouse device common for all mice
[   15.170495] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[   15.253149] i2c /dev entries driver
[   15.295798] hidraw: raw HID events driver (C) Jiri Kosina
[   15.360910] drop_monitor: Initializing network drop monitor service
[   15.436431] NET: Registered protocol family 17
[   15.490280] dsa dsa@0: switch 0x161 detected: Marvell 88E6161, revision 2
[   15.571624] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   15.684661] libphy: mv88e6xxx SMI: probed
[   15.732838] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Marvell 88E6161 switch
[   15.875024] usb 1-1: New USB device found, idVendor=04cc, idProduct=1520
[   15.955366] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   16.041805] hub 1-1:1.0: USB hub found
[   16.086909] hub 1-1:1.0: 2 ports detected
[   16.238210] dsa dsa@0 lan1: no phy at 0
[   16.284219] dsa dsa@0 lan1: failed to connect to port 0: -19
[   16.352037] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   16.474636] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 0(lan1): -19
[   16.595053] dsa dsa@0 lan2: no phy at 1
[   16.641048] dsa dsa@0 lan2: failed to connect to port 1: -19
[   16.708827] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   16.824556] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 1(lan2): -19
[   16.945009] dsa dsa@0 lan3: no phy at 2
[   16.990918] dsa dsa@0 lan3: failed to connect to port 2: -19
[   17.058700] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   17.174556] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 2(lan3): -19
[   17.295002] dsa dsa@0 lan4: no phy at 3
[   17.340895] dsa dsa@0 lan4: failed to connect to port 3: -19
[   17.408677] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   17.524555] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 3(lan4): -19
[   17.644956] dsa dsa@0 aux: no phy at 4
[   17.689831] dsa dsa@0 aux: failed to connect to port 4: -19
[   17.756571] mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy
[   17.874553] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: can't create dsa slave device for port 4(aux): -19
[   17.993575] Key type dns_resolver registered
[   18.045506] registered taskstats version 1
[   18.094601] Loading compiled-in X.509 certificates
[   18.152011] zswap: loaded using pool lzo/zbud
[   18.206886] Key type big_key registered
[   18.254752] Key type encrypted registered
[   18.304251] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)

And I found some info from the kernel documentation at https://www.kernel.org/doc/Documentation/devicetree/bindings/net/dsa/dsa.txt
But I don't know how to change the current binding.
Re: Debian on QiZhiTong 501mv2
July 13, 2017 05:29PM
wacke,

> And I found some info from the kernel documentati
> on at https://www.kernel.org/doc/Documentation/dev
> icetree/bindings/net/dsa/dsa.txt
> But I don't know how to change the current binding
> .

We are using current binding with mdio node.

Note that the error we had before is gone.

[   13.545406] mdio_bus f1072004.mdio-bus-mii: /ocp@f1000000/mdio-bus@72004/switch@0 has invalid PHY address
[   13.660061] mdio_bus f1072004.mdio-bus-mii: /ocp@f1000000/mdio-bus@72004/ethernet-phy@1 has invalid PHY address

So it is correct PHY.

Unfortunately I don't have a lot of free time right now. You can try to model this DTS using kirkwood-dir665.dts

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 13, 2017 10:14PM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>
> > And I found some info from the kernel documenta
> ti
> > on at https://www.kernel.org/doc/Documentation/d
> ev
> > icetree/bindings/net/dsa/dsa.txt
> > But I don't know how to change the current bindi
> ng
> > .
>
> We are using current binding with mdio node.
>
> Note that the error we had before is gone.
>
>
> [   13.545406] mdio_bus f1072004.mdio-bus-mii: /oc
> p@f1000000/mdio-bus@72004/switch@0 has invalid PHY
> address
> [   13.660061] mdio_bus f1072004.mdio-bus-mii: /oc
> p@f1000000/mdio-bus@72004/ethernet-phy@1 has inval
> id PHY address
>
>
> So it is correct PHY.
>
> Unfortunately I don't have a lot of free time rig
> ht now. You can try to model this DTS using kirkwo
> od-dir665.dts

OK,I'll try later.
Re: Debian on QiZhiTong 501mv2
July 26, 2017 08:33PM
bodhi Wrote:
-------------------------------------------------------
> So it is correct PHY.
>
> Unfortunately I don't have a lot of free time rig
> ht now. You can try to model this DTS using kirkwo
> od-dir665.dts

Hi,bodhi

I've tried lot of times,and the DTS was using kirkwood-dir665.dts,but still no lucky,the dsa driver can't found the phy...
Any ideas?Thanks.
Re: Debian on QiZhiTong 501mv2
July 26, 2017 10:27PM
Hi wacke,

> I've tried lot of times,and the DTS was using kirk
> wood-dir665.dts,but still no lucky,the dsa driver
> can't found the phy...
> Any ideas?Thanks.

I'll take a look to see if I can modify it a bit.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 28, 2017 04:17PM
wacke,

Notice how the ports were repeated in the mdio node in the dir655 DTS. Have you tried that syntax? I'm not sure why they had to do that, but it's worth a try, since the dir655 is mainline.


kirkwood-qizhitong_501m_v2.dts

dsa@0 {
		compatible = "marvell,dsa","marvell,mv88e6161";
		#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";
			};
		};
	};

&mdio {
	status = "okay";
	ethphy1: ethernet-phy@1 {
                reg = <1>;  		/* not sure reg 0 or reg 1 here */
	};
};

kirkwood-dir665.dts

dsa {
		status = "disabled";

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

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

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

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

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

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

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

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

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

&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 = "lan4";
			};

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

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

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

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

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

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
July 29, 2017 01:26AM
bodhi Wrote:
-------------------------------------------------------
> wacke,
>
> Notice how the ports were repeated in the mdio nod
> e in the dir655 DTS. Have you tried that syntax? I
> 'm not sure why they had to do that, but it's wort
> h a try, since the dir655 is mainline.
>
>

Hi,bodhi

They add "status = "disabled";" to disable the dsa node in the dts.
See this url:https://patchwork.kernel.org/patch/9499609/

And I've already tried this syntax from dir665,the dsa driver did not find the 88e6161 switch at all...

I think the new dsa driver from kernel cause the problem,report this issue to kernel.org?



Edited 1 time(s). Last edit at 07/29/2017 04:08AM by wacke.
Re: Debian on QiZhiTong 501mv2
August 04, 2017 01:24AM
Hi,bodhi

Any updates for the 88e6161 switch?thanks.
Re: Debian on QiZhiTong 501mv2
August 04, 2017 02:39AM
No, I have not studied this issue much because of other things going on.

Let's recap. With your current DTS, the switch was OK in kernel linux-4.11.3-kirkwood-tld-2? but not with kernel linux-4.12.1-kirkwood-tld-1? or which kernel that was working?

Please attach your current DTS if it is different from the one I have in the linux-4.12.1-kirkwood-tld-1.patch.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on QiZhiTong 501mv2
August 04, 2017 03:07AM
bodhi Wrote:
-------------------------------------------------------
> No, I have not studied this issue much because of
> other things going on.
>
> Let's recap. With your current DTS, the switch was
> OK in kernel linux-4.11.3-kirkwood-tld-2? but not
> with kernel linux-4.12.1-kirkwood-tld-1? or which
> kernel that was working?
>
> Please attach your current DTS if it is different
> from the one I have in the linux-4.12.1-kirkwood-
> tld-1.patch.

The switch only working on kernel 4.4.x.
I've tried the lede kernel (4.9.x),and your kernel (linux-4.11.3-kirkwood-tld-2),both not working,same error:

dsa dsa@0 lan1: failed to connect to port 0: -19
mv643xx_eth_port mv643xx_eth_port.0 eth0: error -19 setting up slave phy

I also tried to modify the dts with new syntax from dir665,but after that,the kernel won't detect the switch at all.

After some google,I found that the driver for the 88e6xxx switch was changed in the kernel above 4.9.x,I think the changed driver cause the problem...
Author:

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: