I attached full logs.
Here is relevant part on cold boot:
PCIE Reset Done PCIe1: Root Complex, Outbound memory range: e0000000:f0000000
PCICSRBAR @ 0xff000000
R0 bus_start: 0 phys_start: 0 size: 80000000
R64 bus_start: 1000000000 phys_start: 0 size: 80000000
PCI reg:0 0000000c00000000:00000000e0000000 0000000010000000 00000000
PCI reg:1 0000000ff8000000:0000000000000000 0000000000010000 00000001
PCI reg:2 0000000ffe000000:00000000ff000000 0000000001000000 00000100
PCI reg:3 0000000000000000:0000000000000000 0000000080000000 00000108
PCI reg:4 0000000000000000:0000001000000000 0000000080000000 00000108
PCI Autoconfig: Bus Memory region: [e0000000-efffffff],
Physical Memory [c00000000-c0fffffffx]
PCI Autoconfig: Bus I/O region: [0-ffff],
Physical Memory [ff8000000-ff800ffffx]
no link, regs @ 0xfe240000
PCIe1: Bus 00 - 00
PCIe2: Root Complex, with errors. Clearing. Now 0x00000000Outbound memory range: e0000000:f0000000
PCICSRBAR @ 0xff000000
R0 bus_start: 0 phys_start: 0 size: 80000000
R64 bus_start: 1000000000 phys_start: 0 size: 80000000
PCI reg:0 0000000c10000000:00000000e0000000 0000000010000000 00000000
PCI reg:1 0000000ff8010000:0000000000000000 0000000000010000 00000001
PCI reg:2 0000000ffe000000:00000000ff000000 0000000001000000 00000100
PCI reg:3 0000000000000000:0000000000000000 0000000080000000 00000108
PCI reg:4 0000000000000000:0000001000000000 0000000080000000 00000108
PCI Autoconfig: Bus Memory region: [e0000000-efffffff],
Physical Memory [c10000000-c1fffffffx]
PCI Autoconfig: Bus I/O region: [0-ffff],
Physical Memory [ff8010000-ff801ffffx]
x1 gen2, regs @ 0xfe250000
Scanning PCI bus 02
PCI Scan: Found Bus 2, Device 0, Function 0
02:00.0 - 11ab:f400 - Network controller
PCI Autoconfig: BAR 0, Mem, size=0x100000, address=0xe0000000 bus_lower=0xe0100000
PCI Autoconfig: BAR 1, Mem, size=0x4000000, address=0xe4000000 bus_lower=0xe8000000
PCI Autoconfig: BAR 2, Mem, size=0x800000, address=0xe8000000 bus_lower=0xe8800000
PCIe2: Bus 01 - 02
PCIe3: Root Complex, with errors. Clearing. Now 0x00000000Outbound memory range: d0000000:e0000000
PCICSRBAR @ 0xff000000
R0 bus_start: 0 phys_start: 0 size: 80000000
R64 bus_start: 1000000000 phys_start: 0 size: 80000000
PCI reg:0 0000000c20000000:00000000d0000000 0000000010000000 00000000
PCI reg:1 0000000ff8020000:0000000000000000 0000000000010000 00000001
PCI reg:2 0000000ffe000000:00000000ff000000 0000000001000000 00000100
PCI reg:3 0000000000000000:0000000000000000 0000000080000000 00000108
PCI reg:4 0000000000000000:0000001000000000 0000000080000000 00000108
PCI Autoconfig: Bus Memory region: [d0000000-dfffffff],
Physical Memory [c20000000-c2fffffffx]
PCI Autoconfig: Bus I/O region: [0-ffff],
Physical Memory [ff8020000-ff802ffffx]
x1 gen2, regs @ 0xfe260000
Scanning PCI bus 04
PCI Scan: Found Bus 4, Device 0, Function 0
04:00.0 - 12d8:2608 - Bridge device
PCI Autoconfig: Found P2P bridge, device 0
PCI Scan: Found Bus 5, Device 1, Function 0
05:01.0 - 12d8:2608 - Bridge device
PCI Autoconfig: Found P2P bridge, device 1
PCI Scan: Found Bus 5, Device 2, Function 0
05:02.0 - 12d8:2608 - Bridge device
PCI Autoconfig: Found P2P bridge, device 2
PCI Scan: Found Bus 5, Device 3, Function 0
05:03.0 - 12d8:2608 - Bridge device
PCI Autoconfig: Found P2P bridge, device 3
PCI Scan: Found Bus 5, Device 4, Function 0
05:04.0 - 12d8:2608 - Bridge device
PCI Autoconfig: Found P2P bridge, device 4
PCI Scan: Found Bus 5, Device 5, Function 0
05:05.0 - 12d8:2608 - Bridge device
PCI Autoconfig: Found P2P bridge, device 5
PCI Scan: Found Bus 10, Device 0, Function 0
0a:00.0 - aaaa:0001 - Base system peripheral
PCI Autoconfig: BAR 0, Mem, size=0x100000, address=0xd0000000 bus_lower=0xd0100000
PCIe3: Bus 03 - 0a
On hot boot (host CPU Reset with no power interruption and at the beginning of u-boot we have code that use GPIO to generate reset pulses to rest of hardware including PCIe switch):
PCIE Reset Done PCIe1: Root Complex, Outbound memory range: e0000000:f0000000
PCICSRBAR @ 0xff000000
R0 bus_start: 0 phys_start: 0 size: 80000000
R64 bus_start: 1000000000 phys_start: 0 size: 80000000
PCI reg:0 0000000c00000000:00000000e0000000 0000000010000000 00000000
PCI reg:1 0000000ff8000000:0000000000000000 0000000000010000 00000001
PCI reg:2 0000000ffe000000:00000000ff000000 0000000001000000 00000100
PCI reg:3 0000000000000000:0000000000000000 0000000080000000 00000108
PCI reg:4 0000000000000000:0000001000000000 0000000080000000 00000108
PCI Autoconfig: Bus Memory region: [e0000000-efffffff],
Physical Memory [c00000000-c0fffffffx]
PCI Autoconfig: Bus I/O region: [0-ffff],
Physical Memory [ff8000000-ff800ffffx]
no link, regs @ 0xfe240000
PCIe1: Bus 00 - 00
PCIe2: Root Complex, with errors. Clearing. Now 0x00000000Outbound memory range: e0000000:f0000000
PCICSRBAR @ 0xff000000
R0 bus_start: 0 phys_start: 0 size: 80000000
R64 bus_start: 1000000000 phys_start: 0 size: 80000000
PCI reg:0 0000000c10000000:00000000e0000000 0000000010000000 00000000
PCI reg:1 0000000ff8010000:0000000000000000 0000000000010000 00000001
PCI reg:2 0000000ffe000000:00000000ff000000 0000000001000000 00000100
PCI reg:3 0000000000000000:0000000000000000 0000000080000000 00000108
PCI reg:4 0000000000000000:0000001000000000 0000000080000000 00000108
PCI Autoconfig: Bus Memory region: [e0000000-efffffff],
Physical Memory [c10000000-c1fffffffx]
PCI Autoconfig: Bus I/O region: [0-ffff],
Physical Memory [ff8010000-ff801ffffx]
x1 gen2, regs @ 0xfe250000
Scanning PCI bus 02
PCI Scan: Found Bus 2, Device 0, Function 0
02:00.0 - 11ab:f400 - Network controller
PCI Autoconfig: BAR 0, Mem, size=0x100000, address=0xe0000000 bus_lower=0xe0100000
PCI Autoconfig: BAR 1, Mem, size=0x4000000, address=0xe4000000 bus_lower=0xe8000000
PCI Autoconfig: BAR 2, Mem, size=0x800000, address=0xe8000000 bus_lower=0xe8800000
PCIe2: Bus 01 - 02
PCIe3: Root Complex, with errors. Clearing. Now 0x00000000Outbound memory range: d0000000:e0000000
PCICSRBAR @ 0xff000000
R0 bus_start: 0 phys_start: 0 size: 80000000
R64 bus_start: 1000000000 phys_start: 0 size: 80000000
PCI reg:0 0000000c20000000:00000000d0000000 0000000010000000 00000000
PCI reg:1 0000000ff8020000:0000000000000000 0000000000010000 00000001
PCI reg:2 0000000ffe000000:00000000ff000000 0000000001000000 00000100
PCI reg:3 0000000000000000:0000000000000000 0000000080000000 00000108
PCI reg:4 0000000000000000:0000001000000000 0000000080000000 00000108
PCI Autoconfig: Bus Memory region: [d0000000-dfffffff],
Physical Memory [c20000000-c2fffffffx]
PCI Autoconfig: Bus I/O region: [0-ffff],
Physical Memory [ff8020000-ff802ffffx]
x1 gen2, regs @ 0xfe260000
Scanning PCI bus 04
PCIe3: Bus 03 - 04
Technically I don't see difference or hints in logs. If I add debug print into drivers/pci/pci.c function
int pci_hose_scan_bus(struct pci_controller *hose, int bus)
I can see that on hot boot pci_hose_read_config_word(hose, dev, PCI_VENDOR_ID, &vendor); returned vendor is 0xffff for entire bus 4. However, later I can access device on bus 4 from command prompt.