I have a device using modifed dts myself,it worked fine with 4.4.x kernel.
Below is the hardware info of my device:
CPU:1.2 GHz ARM Marvell 88F6281
Memory:64M NAND Flash,512M DDR2 800
Storage:SDx1,SATAx1,USB 2.0x2
Network:88E6161 Switch chip with 5 gigabit port,88E1116 with 1 gigabit wan port
And the device tree modified by myself:
/*
* 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 = <ð0port>;
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";
};
ð0 {
status = "okay";
ethernet0-port@0 {
speed = <1000>;
duplex = <1>;
};
};
ð1 {
status = "okay";
};
Boot log after the kernel upgrade to 4.9.x:
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
Seems that driver can't find phy on 88e6161 switch.
Is there anyone can help me to get this switch working on kernel 4.9.x?Thanks.