Add support for Mikrotik RB912UAG-2HPnD r2

I trying add support for new RB912UAG-2HPnD r2. System runs from initramfs, new flash require little patch, gpio looks the same. But wifi is not detected (ath9k is loaded, but nothing in system log about detected radio0, ath etc). Maybe somebody already tried this new version? PCI init looks identical like on "old" version:

[    0.090000] MIPS: machine is Mikrotik RouterBOARD 912UAG-2HPnD
[    0.320000] ar724x-pci ar724x-pci: PCIe link is down
[    0.320000] registering PCI controller with io_map_base unset
[    0.340000] PCI host bridge to bus 0000:00
[    0.340000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.350000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.350000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.360000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00

@cezary

Can you please run this command and provide the output?

cat /proc/cpuinfo

Thanks

They could have easily added a GPIO to turn on/off PCI slot power, not rare.

No, toggling gpio does nothing. At least from userland level.

system type		: Atheros AR9342 rev 3
machine			: Mikrotik RouterBOARD 912UAG-2HPnD
processor		: 0
cpu model		: MIPS 74Kc V4.12
BogoMIPS		: 299.82
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 32
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp dsp2
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not availab

Can you also provide the contents of this one please?

cat /etc/board.json

Also,
Is this master, 19.07 or 18.06?

Thanks

19.07 and older. I'll put board.json later.

{
	"model": {
		"id": "rb-912uag-2hpnd",
		"name": "Mikrotik RouterBOARD 912UAG-2HPnD"
	},
	"network": {
		"lan": {
			"ifname": "eth0",
			"protocol": "static"
		}
	},
	"gpioswitch": {
		"usb_power_switch": {
			"name": "USB Power Switch",
			"pin": 61,
			"default": 1
		}
	}
}

And new command line:

[ 0.000000] Kernel command line: benand_no_swecc parts=1 boot_part_size=4194304 gpio=97839 HZ=300000000 mem=64M kmac=74:4D:28:EB:AE:0F board=711Gr100 board=711Gr100 board_rev=r2 hw_opt=00600005 boot=0 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd

hmz ..
Board detection seems to be OK.

Can you provide a full dmesg?

Thanks

From old kernel:

[    0.000000] Linux version 3.18.23 (compiler@compiler) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r46499) ) #2 Fri Sep 20 19:20:34 CEST 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9342 rev 3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 803480f0, node_mem_map 81000000
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  no-uart benand_no_swecc parts=1 boot_part_size=4194304 gpio=97839 HZ=300000000 mem=64M kmac=74:4D:28:EB:AE:0F board=711Gr100 Board=711Gr100 board_rev=r2 hw_opt=00600005 boot=0 mlc=11 console=ttyS0,115200 rootfstype=yaffs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 57044K/65536K available (2428K kernel code, 149K rwdata, 516K rodata, 4192K init, 184K bss, 8492K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:600.000MHz, DDR:350.000MHz, AHB:350.000MHz, Ref:25.000MHz
[    0.000000] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] NET: Registered protocol family 16
[    0.090000] MIPS: machine is Mikrotik RouterBOARD 912UAG-2HPnD
[    0.320000] ar724x-pci ar724x-pci: PCIe link is down
[    0.320000] registering PCI controller with io_map_base unset
[    0.340000] PCI host bridge to bus 0000:00
[    0.340000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.350000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.350000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.360000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.360000] Switched to clocksource MIPS
[    0.360000] NET: Registered protocol family 2
[    0.370000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.370000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.380000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.390000] TCP: reno registered
[    0.390000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.400000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.400000] NET: Registered protocol family 1
[    0.410000] PCI: CLS 0 bytes, default 32
[    5.410000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    5.430000] yaffs: yaffs built Sep 20 2019 19:19:23 Installing.
[    5.430000] msgmni has been set to 111
[    5.440000] io scheduler noop registered
[    5.440000] io scheduler deadline registered (default)
[    5.450000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    5.450000] console [ttyS0] disabled
[    5.480000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    5.490000] console [ttyS0] enabled
[    5.490000] bootconsole [early0] disabled
[    5.500000] m25p80 spi0.0: found gd25q08, expected m25p80
[    5.510000] m25p80 spi0.0: gd25q08 (1024 Kbytes)
[    5.520000] Creating 4 MTD partitions on "spi0.0":
[    5.520000] 0x000000000000-0x00000000c000 : "routerboot"
[    5.530000] 0x00000000c000-0x00000000d000 : "hard_config"
[    5.530000] 0x00000000d000-0x00000000e000 : "bios"
[    5.540000] 0x00000000e000-0x00000000f000 : "soft_config"
[    5.550000] NAND flash driver for the RouterBOARD 91x series
[    5.550000] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    5.560000] nand: Winbond W29N01HV
[    5.560000] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    5.570000] Scanning device for bad blocks
[    5.620000] Creating 3 MTD partitions on "W29N01HV":
[    5.630000] 0x000000000000-0x000000040000 : "booter"
[    5.630000] 0x000000040000-0x000000400000 : "kernel"
[    5.640000] 0x000000400000-0x000008000000 : "rootfs"
[    5.650000] mtd: device 6 (rootfs) set to be root filesystem
[    5.650000] mtdsplit: no squashfs found in "rootfs"
[    5.660000] mtdsplit: no squashfs found in "W29N01HV"
[    5.680000] libphy: ag71xx_mdio: probed
[    6.350000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd074, driver=Atheros 8031 ethernet]
[    6.360000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    6.360000] TCP: cubic registered
[    6.370000] NET: Registered protocol family 17
[    6.370000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    6.390000] 8021q: 802.1Q VLAN Support v1.8
[    6.420000] Freeing unused kernel memory: 4192K (80368000 - 80780000)
[    6.450000] init: Console is alive
[    6.450000] init: - watchdog -
[    6.480000] usbcore: registered new interface driver usbfs
[    6.490000] usbcore: registered new interface driver hub
[    6.490000] usbcore: registered new device driver usb
[    6.510000] SCSI subsystem initialized
[    6.520000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.530000] ehci-platform: EHCI generic platform driver
[    6.540000] ehci-platform ehci-platform: EHCI Host Controller
[    6.540000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.550000] ehci-platform ehci-platform: TX-TX IDP fix enabled
[    6.560000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.590000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.590000] hub 1-0:1.0: USB hub found
[    6.600000] hub 1-0:1.0: 1 port detected
[    6.600000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.610000] ohci-platform: OHCI generic platform driver
[    6.620000] usbcore: registered new interface driver usb-storage
[    7.450000] init: - preinit -
[    7.640000] random: procd urandom read with 11 bits of entropy available
[   10.800000] procd: - early -
[   10.810000] procd: - watchdog -
[   11.390000] procd: - ubus -
[   12.400000] procd: - init -
[   15.120000] tun: Universal TUN/TAP device driver, 1.6
[   15.120000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   15.140000] usbcore: registered new interface driver cdc_acm
[   15.150000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   15.160000] usbcore: registered new interface driver cdc_wdm
[   15.170000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   15.180000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   15.190000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.210000] nf_conntrack version 0.5.0 (956 buckets, 3824 max)
[   15.240000] usbcore: registered new interface driver usbserial
[   15.240000] usbcore: registered new interface driver usbserial_generic
[   15.250000] usbserial: USB Serial support registered for generic
[   15.280000] xt_time: kernel timezone is -0000
[   15.290000] usbcore: registered new interface driver cdc_ether
[   15.300000] usbcore: registered new interface driver cdc_ncm
[   15.330000] cfg80211: Calling CRDA to update world regulatory domain
[   15.330000] cfg80211: World regulatory domain updated:
[   15.340000] cfg80211:  DFS Master region: unset
[   15.340000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   15.350000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   15.360000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   15.370000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   15.380000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   15.390000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   15.400000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   15.410000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   15.420000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   15.510000] PPP generic driver version 2.4.2
[   15.520000] NET: Registered protocol family 24
[   15.520000] usbcore: registered new interface driver qmi_wwan
[   15.530000] usbcore: registered new interface driver rndis_host
[   15.540000] usbcore: registered new interface driver sierra
[   15.550000] usbserial: USB Serial support registered for Sierra USB modem
[   15.560000] usbcore: registered new interface driver sierra_net
[   15.600000] usbcore: registered new interface driver cdc_mbim
[   15.610000] usbcore: registered new interface driver option
[   15.620000] usbserial: USB Serial support registered for GSM modem (1-port)
[   15.630000] usbcore: registered new interface driver qcserial
[   15.640000] usbserial: USB Serial support registered for Qualcomm USB modem
[   26.250000] device eth0 entered promiscuous mode
[   26.310000] device eth0.15 entered promiscuous mode
[   26.600000] eth0: link up (1000Mbps/Full duplex)
[   26.600000] br-lan: port 1(eth0) entered forwarding state
[   26.610000] br-lan: port 1(eth0) entered forwarding state
[   26.640000] br-wifispot: port 1(eth0.15) entered forwarding state
[   26.650000] br-wifispot: port 1(eth0.15) entered forwarding state
[   28.610000] br-lan: port 1(eth0) entered forwarding state
[   28.650000] br-wifispot: port 1(eth0.15) entered forwarding state
[   78.840000] random: nonblocking pool is initialized

What are you doing with 3.18 kernel?

Various tests. In the evening I will present bootlog from 19.07.

To avoid all confusion and having to request separate parts, please:

  • Build the latest 19.07 state
  • Provide output from: cat /proc/cpuinfo
  • Provide output from: cat /etc/board.json
  • Provide output from: dmesg

So all information is properly synced.

Thanks

root@OpenWrt:~# cat /proc/cpuinfo 
system type		: Atheros AR9342 rev 3
machine			: Mikrotik RouterBOARD 912UAG-2HPnD
processor		: 0
cpu model		: MIPS 74Kc V4.12
BogoMIPS		: 299.82
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 32
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp dsp2
Options implemented	: tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases perf_cntr_intr_bit nan_legacy nan_2008 perf
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not available

root@OpenWrt:~# cat /etc/board.json 
{
	"model": {
		"id": "rb-912uag-2hpnd",
		"name": "Mikrotik RouterBOARD 912UAG-2HPnD"
	},
	"network": {
		"lan": {
			"ifname": "eth0",
			"protocol": "static"
		}
	},
	"gpioswitch": {
		"usb_power_switch": {
			"name": "USB Power Switch",
			"pin": 61,
			"default": 1
		}
	}
}
[    0.000000] Linux version 4.14.146 (cezary@eko.one.pl) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10532-cf3b50377e)) #0 Thu Sep 26 08:25:01 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9342 rev 3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 80530080, node_mem_map 81000020
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: get_random_bytes called from 0x80533740 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: benand_no_swecc parts=1 boot_part_size=4194304 gpio=97839 HZ=300000000 mem=64M kmac=74:4D:28:EB:AE:0F board=711Gr100 board=711Gr100 board_rev=r2 hw_opt=00600005 boot=0 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 56504K/65536K available (4230K kernel code, 177K rwdata, 524K rodata, 2868K init, 212K bss, 9032K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] Clocks: CPU:600.000MHz, DDR:350.000MHz, AHB:350.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000011] sched_clock: 32 bits at 300MHz, resolution 3ns, wraps every 7158278654ns
[    0.008882] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[    0.086016] pid_max: default: 32768 minimum: 301
[    0.091508] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.099022] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109877] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.121102] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.129696] NET: Registered protocol family 16
[    0.138999] MIPS: machine is Mikrotik RouterBOARD 912UAG-2HPnD
[    0.390845] ar724x-pci ar724x-pci: PCIe link is down
[    0.396551] registering PCI controller with io_map_base unset
[    0.419397] PCI host bridge to bus 0000:00
[    0.424068] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.431936] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.438256] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.445983] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.454996] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.459205] clocksource: Switched to clocksource MIPS
[    0.466262] NET: Registered protocol family 2
[    0.472263] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.480262] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.487492] TCP: Hash tables configured (established 1024 bind 1024)
[    0.494901] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.501614] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.509018] NET: Registered protocol family 1
[    0.514051] PCI: CLS 0 bytes, default 32
[    2.579248] random: fast init done
[    4.646653] Crashlog allocated RAM at address 0x3f00000
[    4.654394] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    4.667399] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.674089] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    4.887935] io scheduler noop registered
[    4.892459] io scheduler deadline registered (default)
[    4.898784] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    4.908427] console [ttyS0] disabled
[    4.932713] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    4.942535] console [ttyS0] enabled
[    4.950114] bootconsole [early0] disabled
[    4.969091] m25p80 spi0.0: found gd25q08, expected m25p80
[    4.976347] m25p80 spi0.0: gd25q08 (1024 Kbytes)
[    5.044409] Creating 4 MTD partitions on "spi0.0":
[    5.049454] 0x000000000000-0x00000000c000 : "routerboot"
[    5.088382] 0x00000000c000-0x00000000d000 : "hard_config"
[    5.127695] 0x00000000d000-0x00000000e000 : "bios"
[    5.166245] 0x00000000e000-0x00000000f000 : "soft_config"
[    5.205518] NAND flash driver for the RouterBOARD 91x series
[    5.213755] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    5.220398] nand: Winbond W29N01HV
[    5.223916] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.231776] Scanning device for bad blocks
[    5.363753] Creating 3 MTD partitions on "W29N01HV":
[    5.368916] 0x000000000000-0x000000040000 : "booter"
[    5.407850] 0x000000040000-0x000000400000 : "kernel"
[    5.446650] 0x000000400000-0x000008000000 : "ubi"
[    5.489114] libphy: Fixed MDIO Bus: probed
[    5.535689] libphy: ag71xx_mdio: probed
[    6.270086] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd074, driver=Atheros 8031 ethernet]
[    6.281162] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    6.293277] NET: Registered protocol family 10
[    6.302608] Segment Routing with IPv6
[    6.306515] NET: Registered protocol family 17
[    6.311242] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    6.324652] 8021q: 802.1Q VLAN Support v1.8
[    6.334026] UBI error: no valid UBI magic found inside mtd6
[    6.339892] hctosys: unable to open rtc device (rtc0)
[    6.365976] Freeing unused kernel memory: 2868K
[    6.370708] This architecture does not have kernel memory protection.
[    6.395843] init: Console is alive
[    6.399759] init: - watchdog -
[    6.435422] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.492718] usbcore: registered new interface driver usbfs
[    6.498506] usbcore: registered new interface driver hub
[    6.504192] usbcore: registered new device driver usb
[    6.551206] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.568460] SCSI subsystem initialized
[    6.578540] ehci-platform: EHCI generic platform driver
[    6.584147] ehci-platform ehci-platform: EHCI Host Controller
[    6.590172] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.600491] ehci-platform ehci-platform: TX-TX IDP fix enabled
[    6.606536] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.639236] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.646698] hub 1-0:1.0: USB hub found
[    6.651141] hub 1-0:1.0: 1 port detected
[    6.660988] usbcore: registered new interface driver usb-storage
[    6.670237] usbcore: registered new interface driver uas
[    6.676526] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.694590] init: - preinit -
[    6.899711] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    6.932296] random: procd: uninitialized urandom read (4 bytes read)
[   10.118019] procd: - early -
[   10.121992] procd: - watchdog -
[   10.732230] procd: - watchdog -
[   10.735876] procd: - ubus -
[   10.747092] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.788832] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.796060] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.804008] procd: - init -
[   11.350772] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.361924] urngd: v1.0.0 started.
[   11.407127] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.433848] Loading modules backported from Linux version v4.19.66-0-g893af1c79e42
[   11.441745] Backport generated by backports.git v4.19.66-1-0-g354501da
[   11.472199] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.500406] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   11.659521] xt_time: kernel timezone is -0000
[   11.706957] random: crng init done
[   11.710566] random: 6 urandom warning(s) missed due to ratelimiting
[   11.768979] PPP generic driver version 2.4.2
[   11.776517] NET: Registered protocol family 24
[   11.828158] kmodloader: done loading kernel modules from /etc/modules.d/*
[   34.723694] eth0: link up (100Mbps/Full duplex)
[   34.729080] br-lan: port 1(eth0) entered blocking state
[   34.734587] br-lan: port 1(eth0) entered disabled state
[   34.740372] device eth0 entered promiscuous mode
[   34.758825] br-lan: port 1(eth0) entered blocking state
[   34.764308] br-lan: port 1(eth0) entered forwarding state
[   34.770128] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   35.789330] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

And build:

DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='19.07-SNAPSHOT'
DISTRIB_REVISION='r10565-151bd9ee25'
DISTRIB_TARGET='ar71xx/mikrotik'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 19.07-SNAPSHOT r10565-151bd9ee25'
DISTRIB_TAINTS=''

Just an FYI,

The USB bus can be sent to the mPCIE header via a GPIO on the RouterBOARD 912. This way you can toggle between true PCI and USB ( LTE modems and such ) via the mPCIE header.

Looking at the older RB91X definitions:

#define RB91X_SSR_BIT_LED1              0
#define RB91X_SSR_BIT_LED2              1
#define RB91X_SSR_BIT_LED3              2
#define RB91X_SSR_BIT_LED4              3
#define RB91X_SSR_BIT_LED5              4
#define RB91X_SSR_BIT_5                 5
#define RB91X_SSR_BIT_USB_POWER         6
#define RB91X_SSR_BIT_PCIE_POWER        7
#define RB91X_SSR_BIT_PINHOLE           14

#define RB91X_GPIO_SSR_STROBE   RB91X_LATCH_GPIO(0)
#define RB91X_GPIO_LED_POWER    RB91X_LATCH_GPIO(1)
#define RB91X_GPIO_LED_USER     RB91X_LATCH_GPIO(2)
#define RB91X_GPIO_NAND_READ    RB91X_LATCH_GPIO(3)
#define RB91X_GPIO_NAND_RDY     RB91X_LATCH_GPIO(4)
#define RB91X_GPIO_NLE          RB91X_LATCH_GPIO(11)
#define RB91X_GPIO_NAND_NRW     RB91X_LATCH_GPIO(12)
#define RB91X_GPIO_NAND_NCE     RB91X_LATCH_GPIO(13)
#define RB91X_GPIO_NAND_CLE     RB91X_LATCH_GPIO(14)
#define RB91X_GPIO_NAND_ALE     RB91X_LATCH_GPIO(15)

#define RB91X_GPIO_LED_1        RB91X_SSR_GPIO(RB91X_SSR_BIT_LED1)
#define RB91X_GPIO_LED_2        RB91X_SSR_GPIO(RB91X_SSR_BIT_LED2)
#define RB91X_GPIO_LED_3        RB91X_SSR_GPIO(RB91X_SSR_BIT_LED3)
#define RB91X_GPIO_LED_4        RB91X_SSR_GPIO(RB91X_SSR_BIT_LED4)
#define RB91X_GPIO_LED_5        RB91X_SSR_GPIO(RB91X_SSR_BIT_LED5)
#define RB91X_GPIO_USB_POWER    RB91X_SSR_GPIO(RB91X_SSR_BIT_USB_POWER)
#define RB91X_GPIO_PCIE_POWER   RB91X_SSR_GPIO(RB91X_SSR_BIT_PCIE_POWER)
#define RB91X_GPIO_PINHOLE      RB91X_SSR_GPIO(RB91X_SSR_BIT_PINHOLE)

The PCIE GPIO was +1 from the USB ( so probably pin 62 ). I remember if you brought the USB header GPIO high, then the MPCIE Power GPIO needed to be low. If you wanted to bring USB to the mPCIE header, you would set the USB GPIO low and MPCIE GPIO high.

Since your USB GPIO looks to already be high, check the MPCIE GPIO and verify it's low. You may need to add a "gpioswitch" definition and label it mpcie_power_switch and set it to pin 62 and default 0.

I'm talking about missing embedded wifi, not problem with switching power between usb and mini pcie.

I misunderstood,

I usually put a 2nd wireless mPCIE module in there. When I saw the PCI errors, I assumed you were trying to do the same.

Try this for internal WiFi:

in target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c

look for this code snippet ( near line 297 ):

info = rb_init_info((void *) KSEG1ADDR(0x1f000000), 0x10000);
        if (!info)
                 return;

Replace with:

info = rb_init_info((void *) KSEG1ADDR(0x1f000000), 0x20000);
        if (!info)
                 return;

See if you get a different result.

No change.

[    0.000000] Linux version 4.14.146 (cezary@eko.one.pl) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10532-cf3b50377e)) #0 Thu Sep 26 08:25:01 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9342 rev 3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 80530080, node_mem_map 81000020
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: get_random_bytes called from 0x80533740 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: benand_no_swecc parts=1 boot_part_size=4194304 gpio=97839 HZ=300000000 mem=64M kmac=74:4D:28:EB:AE:0F board=711Gr100 board=711Gr100 board_rev=r2 hw_opt=00600005 boot=0 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 56504K/65536K available (4230K kernel code, 177K rwdata, 524K rodata, 2868K init, 212K bss, 9032K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] Clocks: CPU:600.000MHz, DDR:350.000MHz, AHB:350.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000011] sched_clock: 32 bits at 300MHz, resolution 3ns, wraps every 7158278654ns
[    0.008882] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[    0.086016] pid_max: default: 32768 minimum: 301
[    0.091508] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.099022] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109877] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.121100] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.129697] NET: Registered protocol family 16
[    0.139008] MIPS: machine is Mikrotik RouterBOARD 912UAG-2HPnD
[    0.390850] ar724x-pci ar724x-pci: PCIe link is down
[    0.396561] registering PCI controller with io_map_base unset
[    0.419421] PCI host bridge to bus 0000:00
[    0.424095] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.431962] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.438283] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.446000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.455014] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.459223] clocksource: Switched to clocksource MIPS
[    0.466286] NET: Registered protocol family 2
[    0.472289] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.480289] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.487519] TCP: Hash tables configured (established 1024 bind 1024)
[    0.494929] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.501640] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.509044] NET: Registered protocol family 1
[    0.514078] PCI: CLS 0 bytes, default 32
[    2.579266] random: fast init done
[    4.646855] Crashlog allocated RAM at address 0x3f00000
[    4.654608] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    4.667602] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.674296] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    4.887864] io scheduler noop registered
[    4.892388] io scheduler deadline registered (default)
[    4.898711] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    4.908350] console [ttyS0] disabled
[    4.932640] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    4.942465] console [ttyS0] enabled
[    4.950044] bootconsole [early0] disabled
[    4.968987] m25p80 spi0.0: found gd25q08, expected m25p80
[    4.976251] m25p80 spi0.0: gd25q08 (1024 Kbytes)
[    5.044394] Creating 4 MTD partitions on "spi0.0":
[    5.049440] 0x000000000000-0x00000000c000 : "routerboot"
[    5.088503] 0x00000000c000-0x00000000d000 : "hard_config"
[    5.127866] 0x00000000d000-0x00000000e000 : "bios"
[    5.166315] 0x00000000e000-0x00000000f000 : "soft_config"
[    5.205791] NAND flash driver for the RouterBOARD 91x series
[    5.214016] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    5.220650] nand: Winbond W29N01HV
[    5.224169] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.232029] Scanning device for bad blocks
[    5.364131] Creating 3 MTD partitions on "W29N01HV":
[    5.369361] 0x000000000000-0x000000040000 : "booter"
[    5.407946] 0x000000040000-0x000000400000 : "kernel"
[    5.446702] 0x000000400000-0x000008000000 : "ubi"
[    5.488902] libphy: Fixed MDIO Bus: probed
[    5.535540] libphy: ag71xx_mdio: probed
[    6.270104] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd074, driver=Atheros 8031 ethernet]
[    6.281190] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    6.293289] NET: Registered protocol family 10
[    6.302622] Segment Routing with IPv6
[    6.306526] NET: Registered protocol family 17
[    6.311254] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    6.324665] 8021q: 802.1Q VLAN Support v1.8
[    6.334033] UBI error: no valid UBI magic found inside mtd6
[    6.339902] hctosys: unable to open rtc device (rtc0)
[    6.365991] Freeing unused kernel memory: 2868K
[    6.370718] This architecture does not have kernel memory protection.
[    6.395891] init: Console is alive
[    6.399803] init: - watchdog -
[    6.435487] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.490921] usbcore: registered new interface driver usbfs
[    6.496679] usbcore: registered new interface driver hub
[    6.502368] usbcore: registered new device driver usb
[    6.552468] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.570455] SCSI subsystem initialized
[    6.580541] ehci-platform: EHCI generic platform driver
[    6.586102] ehci-platform ehci-platform: EHCI Host Controller
[    6.592129] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.602457] ehci-platform ehci-platform: TX-TX IDP fix enabled
[    6.608498] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.639255] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.646724] hub 1-0:1.0: USB hub found
[    6.651159] hub 1-0:1.0: 1 port detected
[    6.660986] usbcore: registered new interface driver usb-storage
[    6.670256] usbcore: registered new interface driver uas
[    6.676572] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.694644] init: - preinit -
[    6.898548] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    6.931120] random: procd: uninitialized urandom read (4 bytes read)
[   10.112811] procd: - early -
[   10.115934] procd: - watchdog -
[   10.721256] procd: - watchdog -
[   10.724893] procd: - ubus -
[   10.736027] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.778743] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.785946] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.793815] procd: - init -
[   11.327422] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.354854] urngd: v1.0.0 started.
[   11.385242] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.415616] Loading modules backported from Linux version v4.19.66-0-g893af1c79e42
[   11.423513] Backport generated by backports.git v4.19.66-1-0-g354501da
[   11.452214] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.480410] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   11.637886] xt_time: kernel timezone is -0000
[   11.694227] random: crng init done
[   11.697760] random: 6 urandom warning(s) missed due to ratelimiting
[   11.753635] PPP generic driver version 2.4.2
[   11.761179] NET: Registered protocol family 24
[   11.815971] kmodloader: done loading kernel modules from /etc/modules.d/*
[   50.933766] eth0: link up (100Mbps/Full duplex)
[   50.939157] br-lan: port 1(eth0) entered blocking state
[   50.944660] br-lan: port 1(eth0) entered disabled state
[   50.950451] device eth0 entered promiscuous mode
[   50.969366] br-lan: port 1(eth0) entered blocking state
[   50.974786] br-lan: port 1(eth0) entered forwarding state
[   50.980618] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   51.949355] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

Anyone has a clue?