็็How to build OpenWrt 18 with SATA support for BPI-R2

Again…which kernel do you use…i see only defconfig for 4.14

https://git.openwrt.org/?p=openwrt/openwrt.git;a=tree;f=target/linux/mediatek/mt7623;h=c636338b865551c240b61e97461a3f634ac4d5e5;hb=HEAD

Here is tphy and pcie_mediatek set…but if you use 4.19 i guess it’s not

And you need to compare dts in your sourcetree with mine regarding pcie/sata

So look in your kernelconfig if these are set:

CONFIG_PHY_MTK_TPHY
CONFIG_PCIE_MEDIATEK

For sata additional these (not found in openwrt config)

CONFIG_ATA=y
CONFIG_SATA_AHCI=y
CONFIG_AHCI_MTK=m

Kernel 4.14.162 Tomorrow i will compare kernelconfig files.

I meant master branch with kernel 4.19 not 4.14 because related patches are in patches-4.19 folder, thanks.

Afair in 4.14 the pcie dts nodes were missing…but it looks they are added with patch.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/patches-4.14/0225-arm-dts-Add-missing-mt7623-pcie-nodes.patch;h=c5eb54ae445ae059d65a21052f7038e31366f2fb;hb=HEAD

But they are disabled…and i don’t see patch/dts enabling them…

Are you mean status = "disabled"; in the code? What if i comment out that lines or change it to ‘enabled’?

Right,but they have to “okay”. You can test in running system too

[07:58] frank@bpi-r2-e:~$ cat /sys/firmware/devicetree/base/pcie-*/status
okayokayokay[07:58] frank@bpi-r2-e:~$

But maybe you need pinctrl too…

Seems that sata has no additional dts definition…it uses one of the pcie with an pcie2sata converter

I have 3 dts files on different places. Witch one i must edit with ‘status=‘okay’’ openwrt/build_dir/host/u-boot-2019.07/arch/arm/dts openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.167/arch/arm/boot/dts openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.3.0_musl_eabi/linux-4.14.167/arch/arm/boot/dts

mt7623n-bananapi-bpi-r2.dts (3.9 КБ) mt7623n-bananapi-bpi-r2-1.dts (10.3 КБ) mt7623n-bananapi-bpi-r2-2.dts (9.7 КБ) In all there my files no pci sections!

Also i have 3 files in different places with name ‘mt7623.dtsi’ and in all that files disabled pci sections present. May be i must edit that files instead of mt.7623n-bananapi-bpi-r2.dts files?

the first one is for uboot…there i think you don’t need pcie atm.

i see no difference in last 2 dts…but i guess you need to add the pcie-section like in my dts


&pcie {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie_default>;
	status = "okay";


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


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

and this in the &pio {} section:

	pcie_default: pcie_pin_default {
		pins_cmd_dat {
			pinmux = <MT7623_PIN_208_AUD_EXT_CK1_FUNC_PCIE0_PERST_N>,
				 <MT7623_PIN_209_AUD_EXT_CK2_FUNC_PCIE1_PERST_N>;
			bias-disable;
		};
	};

like it’s done here

U-Boot 2014.04-rc1 (Mar 05 2019 - 02:09:09)

g_nr_bank = 1.
g_total_rank_size = 0x80000000
DRAM:  2 GiB
WARNING: Caches not enabled
MMC:     emmc: 0,  sdcard: 1
booting from SD card
dev_num = 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
bootargs = board=bpi-r2 earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 vmalloc=496M debug=7 initcall_debug=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
Net:   Eth0
Uip activated
Hit any key to stop autoboot:  0 
dev_num = 1
mmc1 is current device
dev_num = 1

MMC read: dev # 1, block # 4096, count 24576 ... 24576 blocks read: OK
bootm flag=0, states=70f
## Booting kernel from Legacy Image at 84000000 ...
   Image Name:   ARM OpenWrt Linux-4.14.167
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    8565365 Bytes = 8.2 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.167 (andrey@andrey-notebook) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r12138-1e3bfbafd3)) #0 SMP PREEMPT Sun Jan 26 22:00:26 2020
[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Bananapi BPI-R2
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x3f0 with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s29708 r8192 d23540 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: earlyprintk console=ttyS0,115200 block2mtd.block2mtd=/dev/mmcblk1,65536,RootFs,5 mtdparts=RootFs:512k(mbr)ro,512k(uboot)ro,512k(config)ro,512k(factory)ro,32M(kernel),32M(reco2
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1008052K/1048576K available (6144K kernel code, 177K rwdata, 1392K rodata, 21504K init, 234K bss, 40524K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc1e00000   (21504 kB)
[    0.000000]       .data : 0xc1e00000 - 0xc1e2c400   ( 177 kB)
[    0.000000]        .bss : 0xc1e31410 - 0xc1e6bc58   ( 235 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000005] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.000017] Switching to timer-based delay loop, resolution 76ns
[    0.000147] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns
[    0.000162] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns
[    0.000376] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000391] pid_max: default: 32768 minimum: 301
[    0.000517] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000534] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001114] CPU: Testing write buffer coherency: ok
[    0.040017] Setting up static identity map for 0x80100000 - 0x80100060
[    0.060010] Hierarchical SRCU implementation.
[    0.100069] smp: Bringing up secondary CPUs ...
[    0.310504] smp: Brought up 1 node, 4 CPUs
[    0.310518] SMP: Total of 4 processors activated (104.00 BogoMIPS).
[    0.310525] CPU: All CPU(s) started in SVC mode.
[    0.320507] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 3
[    0.320716] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.320736] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.320909] pinctrl core: initialized pinctrl subsystem
[    0.321552] NET: Registered protocol family 16
[    0.321814] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.322488] No ATAGs?
[    0.383752] usbcore: registered new interface driver usbfs
[    0.383808] usbcore: registered new interface driver hub
[    0.383869] usbcore: registered new device driver usb
[    0.384986] clocksource: Switched to clocksource arch_sys_counter
[    0.386019] NET: Registered protocol family 2
[    0.386467] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.386538] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.386650] TCP: Hash tables configured (established 8192 bind 8192)
[    0.386751] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.386799] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.386985] NET: Registered protocol family 1
[    0.525398] No memory allocated for crashlog
[    0.525592] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.529572] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.529583] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.534192] bounce: pool size: 64 pages
[    0.534219] io scheduler noop registered
[    0.534228] io scheduler deadline registered (default)
[    0.539895] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.540731] console [ttyS0] disabled
[    0.561135] 11004000.serial: ttyS0 at MMIO 0x11004000 (irq = 194, base_baud = 1625000) is a ST16650V2
[    1.044646] console [ttyS0] enabled
[    1.048673] mtk_rng 1020f000.rng: registered RNG driver
[    1.048816] random: fast init done
[    1.057471] random: crng init done
[    1.060814] loop: module loaded
[    1.064619] mt6323-regulator mt6323-regulator: Chip ID = 0x2023
[    1.079954] libphy: Fixed MDIO Bus: probed
[    1.107390] mtk_soc_eth 1b100000.ethernet: chip id = 7623
[    1.112946] libphy: mdio: probed
[    1.116186] drivers/net/ethernet/mediatek/mtk_eth_soc.c:mtk_mdio_init[412]0 ee957000
[    1.123892] mtk_soc_eth 1b100000.ethernet: generated random MAC address 76:88:b0:a7:51:d0
[    1.141925] mtk_soc_eth 1b100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    1.152641] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xf08e0000, irq 204
[    1.161062] mtk_soc_eth 1b100000.ethernet: generated random MAC address 22:30:f7:36:52:2c
[    1.179670] mtk_soc_eth 1b100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY]
[    1.190359] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xf08e0000, irq 204
[    1.199800] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    1.205026] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 1
[    1.215409] xhci-mtk 1a1c0000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    1.224447] xhci-mtk 1a1c0000.usb: irq 202, io mem 0x1a1c0000
[    1.230713] hub 1-0:1.0: USB hub found
[    1.234464] hub 1-0:1.0: 1 port detected
[    1.238705] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    1.243896] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 2
[    1.251261] xhci-mtk 1a1c0000.usb: Host supports USB 3.0  SuperSpeed
[    1.257647] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.266138] hub 2-0:1.0: USB hub found
[    1.269885] hub 2-0:1.0: 1 port detected
[    1.274520] xhci-mtk 1a240000.usb: xHCI Host Controller
[    1.279743] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 3
[    1.290114] xhci-mtk 1a240000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    1.299161] xhci-mtk 1a240000.usb: irq 203, io mem 0x1a240000
[    1.305368] hub 3-0:1.0: USB hub found
[    1.309117] hub 3-0:1.0: 1 port detected
[    1.313305] xhci-mtk 1a240000.usb: xHCI Host Controller
[    1.318532] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 4
[    1.325891] xhci-mtk 1a240000.usb: Host supports USB 3.0  SuperSpeed
[    1.332255] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.340726] hub 4-0:1.0: USB hub found
[    1.344471] hub 4-0:1.0: 1 port detected
[    1.348799] i2c /dev entries driver
[    1.353644] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values
[    1.363179] mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.371271] cpu cpu0: dummy supplies not allowed for exclusive requests
[    1.378791] sdhci: Secure Digital Host Controller Interface driver
[    1.384919] sdhci: Copyright(c) Pierre Ossman
[    1.445515] mtk-msdc 11240000.mmc: Got CD GPIO
[    1.500346] mmc0: new high speed MMC card at address 0001
[    1.506340] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.512124] mmcblk0: mmc0:0001 8GTF4R 0 B 
[    1.516508] mmcblk0boot0: mmc0:0001 8GTF4R partition 1 4.00 MiB
[    1.522696] mmcblk0boot1: mmc0:0001 8GTF4R partition 2 4.00 MiB
[    1.530700] NET: Registered protocol family 10
[    1.535893] mmcblk0gp0: mmc0:0001 8GTF4R partition 4 3.64 GiB
[    1.536051] Segment Routing with IPv6
[    1.543693] mmcblk0rpmb: mmc0:0001 8GTF4R partition 3 512 KiB, chardev (250:0)
[    1.545287] NET: Registered protocol family 17
[    1.553487]  mmcblk0gp0: p1
[    1.557126] 8021q: 802.1Q VLAN Support v1.8
[    1.563798] ThumbEE CPU extension supported.
[    1.568061] Registering SWP/SWPB emulation handler
[    1.582629] mmc1: host does not support reading read-only switch, assuming write-enable
[    1.592966] mmc1: new high speed SDHC card at address 0002
[    1.598852] mmcblk1: mmc1:0002 N/A   7.44 GiB 
[   22.644976] INFO: rcu_preempt detected stalls on CPUs/tasks:
[   22.650601]  1-...: (0 ticks this GP) idle=97e/140000000000000/0 softirq=75/75 fqs=1050 
[   22.658621]  (detected by 2, t=2102 jiffies, g=-276, c=-277, q=1)
[   22.664669] Sending NMI from CPU 2 to CPUs 1:
[   85.694974] INFO: rcu_preempt detected stalls on

hang on booting after add that lines

strange because i see no info that pcie is already probed…have you had any compiletime warnings/infos?

Nothing. Now i try rm-rf openwrt dir, gitclone again and start from beginning. What i must check in kernel_menuconfig?

i posted options here: ็็How to build OpenWrt 18 with SATA support for BPI-R2

but a dts-change alone should not stall cpu…i see no fix in driver in my 4.14 branch so it should be ok…maybe backporting of openwrt breaks pcie-driver…you can download drivers/pci/host/pcie-mediatek.* from my repo and compare with yours

U-Boot 2014.04-rc1 (Mar 05 2019 - 02:09:09)

g_nr_bank = 1.
g_total_rank_size = 0x80000000
DRAM:  2 GiB
WARNING: Caches not enabled
MMC:     emmc: 0,  sdcard: 1
booting from SD card
dev_num = 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
bootargs = board=bpi-r2 earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 vmalloc=496M debug=7 initcall_debug=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
Net:   Eth0
Uip activated
Hit any key to stop autoboot:  0 
dev_num = 1
mmc1 is current device
dev_num = 1

MMC read: dev # 1, block # 4096, count 24576 ... 24576 blocks read: OK
bootm flag=0, states=70f
## Booting kernel from Legacy Image at 84000000 ...
   Image Name:   ARM OpenWrt Linux-4.14.167
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    7814049 Bytes = 7.5 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.167 (andrey@andrey-notebook) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r12138-1e3bfbafd3)) #0 SMP PREEMPT Sun Jan 26 22:00:26 2020
[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Bananapi BPI-R2
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x3f0 with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s29708 r8192 d23540 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260974
[    0.000000] Kernel command line: earlyprintk console=ttyS0,115200 vmalloc=496M block2mtd.block2mtd=/dev/mmcblk1,65536,RootFs,5 mtdparts=RootFs:512k(mbr)ro,512k(uboot)ro,512k(config)ro,512k(factory)ro,32M(ker2
[    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: 1011520K/1048576K available (6144K kernel code, 177K rwdata, 1392K rodata, 18432K init, 234K bss, 37056K reserved, 0K cma-reserved, 516096K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe1000000 - 0xff800000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0800000   ( 520 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc1b00000   (18432 kB)
[    0.000000]       .data : 0xc1b00000 - 0xc1b2c400   ( 177 kB)
[    0.000000]        .bss : 0xc1b31410 - 0xc1b6bc58   ( 235 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000006] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.000017] Switching to timer-based delay loop, resolution 76ns
[    0.000146] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns
[    0.000161] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns
[    0.000373] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000388] pid_max: default: 32768 minimum: 301
[    0.000512] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000526] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001102] CPU: Testing write buffer coherency: ok
[    0.040016] Setting up static identity map for 0x80100000 - 0x80100060
[    0.060014] Hierarchical SRCU implementation.
[    0.100072] smp: Bringing up secondary CPUs ...
[    0.310509] smp: Brought up 1 node, 4 CPUs
[    0.310523] SMP: Total of 4 processors activated (104.00 BogoMIPS).
[    0.310531] CPU: All CPU(s) started in SVC mode.
[    0.320513] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 3
[    0.320722] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.320743] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.320926] pinctrl core: initialized pinctrl subsystem
[    0.321575] NET: Registered protocol family 16
[    0.321845] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.322523] No ATAGs?
[    0.383604] usbcore: registered new interface driver usbfs
[    0.383661] usbcore: registered new interface driver hub
[    0.383730] usbcore: registered new device driver usb
[    0.384858] clocksource: Switched to clocksource arch_sys_counter
[    0.385875] NET: Registered protocol family 2
[    0.386334] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.386378] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.386439] TCP: Hash tables configured (established 4096 bind 4096)
[    0.386537] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.386568] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.386733] NET: Registered protocol family 1
[    0.511604] No memory allocated for crashlog
[    0.511820] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.516106] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.516117] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.520675] bounce: pool size: 64 pages
[    0.520697] io scheduler noop registered
[    0.520706] io scheduler deadline registered (default)
[    0.525559] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.526387] console [ttyS0] disabled
[    0.546947] 11004000.serial: ttyS0 at MMIO 0x11004000 (irq = 194, base_baud = 1625000) is a ST16650V2
[    1.031234] console [ttyS0] enabled
[    1.035282] mtk_rng 1020f000.rng: registered RNG driver
[    1.035426] random: fast init done
[    1.044047] random: crng init done
[    1.047472] loop: module loaded
[    1.051250] mt6323-regulator mt6323-regulator: Chip ID = 0x2023
[    1.066560] libphy: Fixed MDIO Bus: probed
[    1.093915] mtk_soc_eth 1b100000.ethernet: chip id = 7623
[    1.099494] libphy: mdio: probed
[    1.102696] drivers/net/ethernet/mediatek/mtk_eth_soc.c:mtk_mdio_init[412]0 df143000
[    1.110438] mtk_soc_eth 1b100000.ethernet: generated random MAC address f2:67:d8:64:44:ea
[    1.128629] mtk_soc_eth 1b100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    1.139342] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xe10e0000, irq 204
[    1.147764] mtk_soc_eth 1b100000.ethernet: generated random MAC address ca:21:8c:8d:87:b9
[    1.166650] mtk_soc_eth 1b100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY]
[    1.177348] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xe10e0000, irq 204
[    1.186781] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    1.191991] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 1
[    1.202393] xhci-mtk 1a1c0000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    1.211447] xhci-mtk 1a1c0000.usb: irq 202, io mem 0x1a1c0000
[    1.217706] hub 1-0:1.0: USB hub found
[    1.221459] hub 1-0:1.0: 1 port detected
[    1.225700] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    1.230891] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 2
[    1.238258] xhci-mtk 1a1c0000.usb: Host supports USB 3.0  SuperSpeed
[    1.244626] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.253100] hub 2-0:1.0: USB hub found
[    1.256874] hub 2-0:1.0: 1 port detected
[    1.261490] xhci-mtk 1a240000.usb: xHCI Host Controller
[    1.266720] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 3
[    1.277092] xhci-mtk 1a240000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    1.286145] xhci-mtk 1a240000.usb: irq 203, io mem 0x1a240000
[    1.292316] hub 3-0:1.0: USB hub found
[    1.296083] hub 3-0:1.0: 1 port detected
[    1.300278] xhci-mtk 1a240000.usb: xHCI Host Controller
[    1.305491] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 4
[    1.312834] xhci-mtk 1a240000.usb: Host supports USB 3.0  SuperSpeed
[    1.319212] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.327680] hub 4-0:1.0: USB hub found
[    1.331432] hub 4-0:1.0: 1 port detected
[    1.335760] i2c /dev entries driver
[    1.340591] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values
[    1.350115] mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.358197] cpu cpu0: dummy supplies not allowed for exclusive requests
[    1.365715] sdhci: Secure Digital Host Controller Interface driver
[    1.371844] sdhci: Copyright(c) Pierre Ossman
[    1.435377] mtk-msdc 11240000.mmc: Got CD GPIO
[    1.490215] mmc0: new high speed MMC card at address 0001
[    1.496210] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.501991] mmcblk0: mmc0:0001 8GTF4R 0 B 
[    1.506370] mmcblk0boot0: mmc0:0001 8GTF4R partition 1 4.00 MiB
[    1.512575] mmcblk0boot1: mmc0:0001 8GTF4R partition 2 4.00 MiB
[    1.520570] NET: Registered protocol family 10
[    1.525781] mmcblk0gp0: mmc0:0001 8GTF4R partition 4 3.64 GiB
[    1.525953] Segment Routing with IPv6
[    1.533574] mmcblk0rpmb: mmc0:0001 8GTF4R partition 3 512 KiB, chardev (250:0)
[    1.535179] NET: Registered protocol family 17
[    1.543397]  mmcblk0gp0: p1
[    1.547023] 8021q: 802.1Q VLAN Support v1.8
[    1.553691] ThumbEE CPU extension supported.
[    1.557951] Registering SWP/SWPB emulation handler
[    1.572501] mmc1: host does not support reading read-only switch, assuming write-enable
[    1.572876] DSA: switch 0 0 parsed
[    1.582849] mmc1: new high speed SDHC card at address 0002
[    1.583870] DSA: tree 0 parsed
[    1.592450] mmcblk1: mmc1:0002 N/A   7.44 GiB 
[    1.784039] libphy: dsa slave smi: probed
[    1.788307] Generic PHY dsa-0.0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:00, irq=POLL)
[    1.798888] Generic PHY dsa-0.0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:01, irq=POLL)
[    1.809538] Generic PHY dsa-0.0:02: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:02, irq=POLL)
[    1.820018] Generic PHY dsa-0.0:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:03, irq=POLL)
[    1.830511] Generic PHY dsa-0.0:04: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:04, irq=POLL)
[    1.867051] 9 cmdlinepart partitions found on MTD device RootFs
[    1.872928] Creating 9 MTD partitions on "RootFs":
[    1.877840] 0x000000000000-0x000000080000 : "mbr"
[    1.883046] 0x000000080000-0x000000100000 : "uboot"
[    1.888329] 0x000000100000-0x000000180000 : "config"
[    1.893651] 0x000000180000-0x000000200000 : "factory"
[    1.899176] 0x000000200000-0x000002200000 : "kernel"
[    1.904522] 0x000002200000-0x000004200000 : "recovery"
[    1.910046] 0x000004200000-0x000044200000 : "rootfs"
[    1.915499] mtd: device 6 (rootfs) set to be root filesystem
[    1.922441] 1 squashfs-split partitions found on MTD device rootfs
[    1.928593] 0x0000047a0000-0x000044200000 : "rootfs_data"
[    1.934418] 0x000044200000-0x0000c4200000 : "usrdata"
[    1.939869] 0x0000c4200000-0x0001dc400000 : "bmtpool"
[    1.945346] block2mtd: mtd0: [RootFs] erase_size = 64KiB [65536]
[    1.951443] hctosys: unable to open rtc device (rtc0)
[    1.956604] clk: Not disabling unused clocks
[    1.960877] vusb: disabling
[    1.963650] vmc: disabling
[    1.966358] vgp1: disabling
[    1.969148] vcamaf: disabling
[    1.990437] Freeing unused kernel memory: 18432K
[    2.003154] init: Console is alive
[    2.007334] init: - watchdog -
[    2.018782] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.195158] raid6: int32x1  gen()   217 MB/s
[    2.364955] raid6: int32x1  xor()   188 MB/s
[    2.535084] raid6: int32x2  gen()   260 MB/s
[    2.705004] raid6: int32x2  xor()   189 MB/s
[    2.874942] raid6: int32x4  gen()   253 MB/s
[    3.044962] raid6: int32x4  xor()   175 MB/s
[    3.215112] raid6: int32x8  gen()   217 MB/s
[    3.385065] raid6: int32x8  xor()   142 MB/s
[    3.554886] raid6: neonx1   gen()   539 MB/s
[    3.724905] raid6: neonx1   xor()   511 MB/s
[    3.894907] raid6: neonx2   gen()   821 MB/s
[    4.064883] raid6: neonx2   xor()   715 MB/s
[    4.234879] raid6: neonx4   gen()   954 MB/s
[    4.404881] raid6: neonx4   xor()   794 MB/s
[    4.574921] raid6: neonx8   gen()   833 MB/s
[    4.744861] raid6: neonx8   xor()   747 MB/s
[    4.749092] raid6: using algorithm neonx4 gen() 954 MB/s
[    4.754356] raid6: .... xor() 794 MB/s, rmw enabled
[    4.759200] raid6: using neon recovery algorithm
[    4.766894] xor: measuring software checksum speed
[    4.864856]    arm4regs  :  1249.200 MB/sec
[    4.964892]    8regs     :  1083.200 MB/sec
[    5.064866]    32regs    :   911.600 MB/sec
[    5.164851]    neon      :  1642.400 MB/sec
[    5.168997] xor: using function: neon (1642.400 MB/sec)
[    5.186119] Btrfs loaded, crc32c=crc32c-generic
[    5.196064] SCSI subsystem initialized
[    5.208973] usbcore: registered new interface driver usb-storage
[    5.215094] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.228349] init: - preinit -
[    5.289498] IPv6: ADDRCONF(NETDEV_UP): lan1: link is not ready
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
[    6.315253] mt7530 3.switch lan1: Link is Down
[    9.357040] procd: - early -
[    9.359949] procd: - watchdog -
[   10.029345] procd: - watchdog -
[   10.033242] procd: - ubus -
[   10.086405] procd: - init -
Please press Enter to activate this console.
[   10.204171] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.221107] RPC: Registered named UNIX socket transport module.
[   10.222308] urngd: v1.0.2 started.
[   10.227016] RPC: Registered udp transport module.
[   10.235073] RPC: Registered tcp transport module.
[   10.239735] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   10.254717] Installing knfsd (copyright (C) 1996 [email protected]).
[   10.264991] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.275694] Loading modules backported from Linux version v5.4-rc8-0-gaf42d3466bdc
[   10.283205] Backport generated by backports.git v5.4-rc8-1-0-g368e8c51
[   10.290975] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.300788] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[   10.323807] usbcore: registered new interface driver ums-alauda
[   10.330554] usbcore: registered new interface driver ums-cypress
[   10.337500] usbcore: registered new interface driver ums-datafab
[   10.344206] usbcore: registered new interface driver ums-freecom
[   10.350988] usbcore: registered new interface driver ums-isd200
[   10.357716] usbcore: registered new interface driver ums-jumpshot
[   10.364483] usbcore: registered new interface driver ums-karma
[   10.371211] usbcore: registered new interface driver ums-sddr09
[   10.378048] usbcore: registered new interface driver ums-sddr55
[   10.384808] usbcore: registered new interface driver ums-usbat
[   10.397124] xt_time: kernel timezone is -0000
[   10.415559] Intel(R) Wireless WiFi driver for Linux
[   10.420401] Copyright(c) 2003- 2015 Intel Corporation
[   10.446860] PPP generic driver version 2.4.2
[   10.452232] NET: Registered protocol family 24
[   10.465657] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.680377] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.686268] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   15.693877] br-lan: port 1(lan0) entered blocking state
[   15.699374] br-lan: port 1(lan0) entered disabled state
[   15.705197] device lan0 entered promiscuous mode
[   15.709792] device eth0 entered promiscuous mode
[   15.716003] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   15.727883] br-lan: port 2(lan1) entered blocking state
[   15.733120] br-lan: port 2(lan1) entered disabled state
[   15.739318] device lan1 entered promiscuous mode
[   15.746883] br-lan: port 3(lan2) entered blocking state
[   15.752120] br-lan: port 3(lan2) entered disabled state
[   15.758412] device lan2 entered promiscuous mode
[   15.765706] br-lan: port 4(lan3) entered blocking state
[   15.770940] br-lan: port 4(lan3) entered disabled state
[   15.777561] device lan3 entered promiscuous mode
[   15.791393] IPv6: ADDRCONF(NETDEV_UP): wan: link is not ready
[   16.715485] mt7530 3.switch lan0: Link is Down
[   16.795569] mt7530 3.switch wan: Link is Down
[   16.800159] mt7530 3.switch lan3: Link is Down
[   16.800502] mt7530 3.switch lan2: Link is Down

No any probing of pci. What im do:

  • git clone openwrt
  • update and install all packages
  • menuconfig - select target and some needed packages - save and exit
  • kernel_menuconfig - change bootargs - save and exit
  • check dts file, add frank-w’s code from above, save
  • check kernel .config file pcie_mediatec already enabled
  • make j5 And when i start it - nothing new, no pcie initialised, empty lspci, no sata no minipci wifi

What does cat say on your system?

Do you have /proc/config.gz? (print using zcat/zless)

Please post output of both

At least no stalled cpu :slight_smile:

root@OpenWrt:/# cat /sys/firmware/devicetree/base/pcie-*/status
disableddisabledroot@penWrt:/# 

There is no config.gz in /proc

as you can see your pcie nodes are still disabled…maybe you need to change the other dts-file.

As you need to compile again you can add /proc/config.gz (imho config_ikconfig in kernel_config)