From: Marcin Juszkiewicz marcin@juszkiewicz.com.pl
On RockPro64:
[root@klapouchy ~]# lspci 00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port 01:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01) --- redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP | 1 + redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP_HOST | 2 +- redhat/configs/fedora/generic/arm/CONFIG_PHY_ROCKCHIP_PCIE | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP
diff --git a/redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP b/redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP new file mode 100644 index 000000000000..dc8453f9303c --- /dev/null +++ b/redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP @@ -0,0 +1 @@ +CONFIG_PCIE_ROCKCHIP=y diff --git a/redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP_HOST b/redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP_HOST index d2deb65e4830..416bd56dfa57 100644 --- a/redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP_HOST +++ b/redhat/configs/fedora/generic/arm/CONFIG_PCIE_ROCKCHIP_HOST @@ -1 +1 @@ -# CONFIG_PCIE_ROCKCHIP_HOST is not set +CONFIG_PCIE_ROCKCHIP_HOST=m diff --git a/redhat/configs/fedora/generic/arm/CONFIG_PHY_ROCKCHIP_PCIE b/redhat/configs/fedora/generic/arm/CONFIG_PHY_ROCKCHIP_PCIE index 8112067fc452..20fb6074bd9d 100644 --- a/redhat/configs/fedora/generic/arm/CONFIG_PHY_ROCKCHIP_PCIE +++ b/redhat/configs/fedora/generic/arm/CONFIG_PHY_ROCKCHIP_PCIE @@ -1 +1 @@ -# CONFIG_PHY_ROCKCHIP_PCIE is not set +CONFIG_PHY_ROCKCHIP_PCIE=m
From: Marcin “hrw” Juszkiewicz on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/381#note_34781912...
Booting with more complex cards (Geforce GT210, Matrox G550) make kernel panic:
``` [ 20.487689] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges: [ 20.488550] rockchip-pcie f8000000.pcie: MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000 [ 20.490014] rockchip-pcie f8000000.pcie: IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000 [ 20.492742] rockchip-pcie f8000000.pcie: PCI host bridge to bus 0000:00 [ 20.493480] pci_bus 0000:00: root bus resource [bus 00-1f] [ 20.494084] pci_bus 0000:00: root bus resource [mem 0xfa000000-0xfbdfffff] [ 20.494826] pci_bus 0000:00: root bus resource [io 0x0000-0xfffff] (bus address [0xfbe00000-0xfbefffff]) [ 20.496153] pci 0000:00:00.0: [1d87:0100] type 01 class 0x060400 [ 20.497393] pci 0000:00:00.0: supports D1 [ 20.497844] pci 0000:00:00.0: PME# supported from D0 D1 D3hot [ 20.504783] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 20.506556] pci 0000:01:00.0: [104c:8231] type 01 class 0x060400 [ 20.507567] pci 0000:01:00.0: Max Payload Size set to 256 (was 128, max 512) [ 20.508742] pci 0000:01:00.0: supports D1 D2 [ 20.519024] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force' [ 20.524581] pci 0000:01:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 20.525828] pci_bus 0000:02: extended config space not accessible [ 20.527145] pci 0000:02:00.0: [102b:2527] type 00 class 0x030000 [ 20.527910] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x01ffffff pref] [ 20.528674] pci 0000:02:00.0: reg 0x14: [mem 0x00000000-0x00003fff] [ 20.530098] pci 0000:02:00.0: reg 0x18: [mem 0x00000000-0x007fffff] [ 20.530949] pci 0000:02:00.0: reg 0x30: [mem 0x00000000-0x0001ffff pref] [ 20.533142] pci 0000:02:00.0: vgaarb: VGA device added: decodes=io+mem,owns=none,locks=none [ 20.539825] SError Interrupt on CPU5, code 0xbf000002 -- SError [ 20.539831] CPU: 5 PID: 403 Comm: kworker/5:4 Not tainted 5.7.0-0.rc6.20200522git051143e1602d.1.hrw.fc33.aarch64 #1 [ 20.539836] Hardware name: pine64 rockpro64_rk3399/rockpro64_rk3399, BIOS 2020.07-rc2-hrw-video-rng-00240-g2f28984069-dirty 05/23/2020 [ 20.539839] Workqueue: events deferred_probe_work_func [ 20.539843] pstate: 60400085 (nZCv daIf +PAN -UAO) [ 20.539846] pc : rockchip_pcie_rd_conf+0x18c/0x230 [pcie_rockchip_host] [ 20.539849] lr : rockchip_pcie_rd_conf+0x94/0x230 [pcie_rockchip_host] [ 20.539851] sp : ffff80001042b7a0 [ 20.539853] x29: ffff80001042b7a0 x28: ffff0000e3aad000 [ 20.539859] x27: 0000000000000001 x26: 0000000000000000 [ 20.539865] x25: 0000000000000008 x24: 0000000000000000 [ 20.539870] x23: ffffd942bbe23060 x22: ffff80001042b81c [ 20.539875] x21: ffff0000e3aaae80 x20: 0000000000000004 [ 20.539881] x19: 0000000000000000 x18: 00000000fffffffb [ 20.539886] x17: 0000000000000000 x16: ffffd942ba3ccfb0 [ 20.539891] x15: 0000000000000020 x14: 0000000000000040 [ 20.539896] x13: 0000000000000000 x12: 0000000000000030 [ 20.539902] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f [ 20.539907] x9 : ffffd94283383bb4 x8 : 0000000000000080 [ 20.539912] x7 : 000000008dce7602 x6 : 0000000000000000 [ 20.539917] x5 : ffff0000e3aac000 x4 : 0000000000000000 [ 20.539923] x3 : 0000000000c00008 x2 : 000000000080000b [ 20.539928] x1 : ffff800015c00008 x0 : ffff800012000000 [ 20.539934] Kernel panic - not syncing: Asynchronous SError Interrupt [ 20.539938] CPU: 5 PID: 403 Comm: kworker/5:4 Not tainted 5.7.0-0.rc6.20200522git051143e1602d.1.hrw.fc33.aarch64 #1 [ 20.539942] Hardware name: pine64 rockpro64_rk3399/rockpro64_rk3399, BIOS 2020.07-rc2-hrw-video-rng-00240-g2f28984069-dirty 05/23/2020 [ 20.539944] Workqueue: events deferred_probe_work_func [ 20.539948] Call trace: [ 20.539950] dump_backtrace+0x0/0x1a0 [ 20.539953] show_stack+0x20/0x2c [ 20.539955] dump_stack+0xe4/0x15c [ 20.539957] panic+0x15c/0x324 [ 20.539959] print_tainted+0x0/0xb4 [ 20.539961] arm64_serror_panic+0x88/0x94 [ 20.539963] do_serror+0xb0/0x1b0 [ 20.539965] el1_error+0xbc/0x168 [ 20.539968] rockchip_pcie_rd_conf+0x18c/0x230 [pcie_rockchip_host] [ 20.539971] pci_bus_read_config_dword+0x70/0xc0 [ 20.539974] pci_bus_generic_read_dev_vendor_id+0x3c/0x1bc [ 20.539976] pci_scan_single_device+0x80/0x134 [ 20.539978] pci_scan_slot+0x48/0x130 [ 20.539981] pci_scan_child_bus_extend+0x60/0x340 [ 20.539983] pci_scan_bridge_extend+0x2ec/0x570 [ 20.539985] pci_scan_child_bus_extend+0x20c/0x340 [ 20.539988] pci_scan_bridge_extend+0x2ec/0x570 [ 20.539990] pci_scan_child_bus_extend+0x20c/0x340 [ 20.539993] pci_scan_root_bus_bridge+0x64/0xf0 [ 20.539995] rockchip_pcie_probe+0x23c/0x2fc [pcie_rockchip_host] [ 20.539998] platform_drv_probe+0x5c/0xb0 [ 20.540000] really_probe+0xe8/0x49c [ 20.540002] driver_probe_device+0xec/0x140 [ 20.540005] __device_attach_driver+0x94/0x11c [ 20.540007] bus_for_each_drv+0x70/0xb0 [ 20.540009] __device_attach+0xe0/0x190 [ 20.540011] device_initial_probe+0x1c/0x30 [ 20.540014] bus_probe_device+0xa4/0xb0 [ 20.540016] deferred_probe_work_func+0xa8/0x100 [ 20.540018] process_one_work+0x240/0x440 [ 20.540021] worker_thread+0x78/0x3b0 [ 20.540023] kthread+0x140/0x144 [ 20.540025] ret_from_fork+0x10/0x18 [ 20.540064] SMP: stopping secondary CPUs [ 20.540067] Kernel Offset: 0x5942a9c00000 from 0xffff800010000000 [ 20.540070] PHYS_OFFSET: 0xffffb6a840000000 [ 20.540072] CPU features: 0x090002,2180600c [ 20.540074] Memory Limit: none
```
From: Marcin “hrw” Juszkiewicz on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/381#note_34781937...
Boot with SATA controller: ``` [ 20.658317] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges: [ 20.659181] rockchip-pcie f8000000.pcie: MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000 [ 20.660126] rockchip-pcie f8000000.pcie: IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000 [ 20.663042] rockchip-pcie f8000000.pcie: PCI host bridge to bus 0000:00 [ 20.663781] pci_bus 0000:00: root bus resource [bus 00-1f] [ 20.664385] pci_bus 0000:00: root bus resource [mem 0xfa000000-0xfbdfffff] [ 20.665127] pci_bus 0000:00: root bus resource [io 0x0000-0xfffff] (bus address [0xfbe00000-0xfbefffff]) [ 20.669827] pci 0000:00:00.0: [1d87:0100] type 01 class 0x060400 [ 20.671121] pci 0000:00:00.0: supports D1 [ 20.671578] pci 0000:00:00.0: PME# supported from D0 D1 D3hot [ 20.678641] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 20.686168] pci 0000:01:00.0: [1095:3132] type 00 class 0x018000 [ 20.687014] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000007f 64bit] [ 20.687823] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit] [ 20.688594] pci 0000:01:00.0: reg 0x20: initial BAR value 0x00000000 invalid [ 20.689347] pci 0000:01:00.0: reg 0x20: [io size 0x0080] [ 20.690019] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0007ffff pref] [ 20.690790] pci 0000:01:00.0: Max Payload Size set to 256 (was 128, max 1024) [ 20.692023] pci 0000:01:00.0: supports D1 D2 [ 20.694221] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force' [ 20.700509] pci_bus 0000:01: busn_res: [bus 01-1f] end is updated to 01 [ 20.701375] pci 0000:00:00.0: BAR 14: assigned [mem 0xfa000000-0xfa0fffff] [ 20.702246] pci 0000:01:00.0: BAR 6: assigned [mem 0xfa000000-0xfa07ffff pref] [ 20.703054] pci 0000:01:00.0: BAR 2: assigned [mem 0xfa080000-0xfa083fff 64bit] [ 20.703908] pci 0000:01:00.0: BAR 0: assigned [mem 0xfa084000-0xfa08407f 64bit] [ 20.704751] pci 0000:01:00.0: BAR 4: no space for [io size 0x0080] [ 20.705425] pci 0000:01:00.0: BAR 4: failed to assign [io size 0x0080] [ 20.706251] pci 0000:00:00.0: PCI bridge to [bus 01] [ 20.706812] pci 0000:00:00.0: bridge window [mem 0xfa000000-0xfa0fffff] [ 20.709102] pcieport 0000:00:00.0: enabling device (0000 -> 0002) [ 20.712031] pcieport 0000:00:00.0: PME: Signaling with IRQ 239 [ 20.723313] pcieport 0000:00:00.0: AER: enabled with IRQ 239 ```
From: Marcin “hrw” Juszkiewicz on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/381#note_34782243...
Hmm. Looks like it needs more testing first:
``` [ 20.784767] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout! ```
Board does not start when there is no card in the slot.
From: pbrobinson on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/381#note_34822468...
NAK: see details in https://bugzilla.redhat.com/show_bug.cgi?id=1704945
kernel@lists.fedoraproject.org