I was finally able to enable Realtek RTL8111F PCIE x1 GbE network card utilizing Nanopi-Neo4 GPIO 40 pin slot. It seems to be working as expected. Armbian Focal / kernel 5.6.14

- IMG_20200605_202615.jpg (118.7 KiB) Viewed 8610 times
Only 8(9) wires used:
PCI-E TX0n/TX0p - 1 pair
PCI-E RX0n/RX0p - 1 pair
PCIE_REF_CLKP/CLKN - 1 pair
GND, 3V3_SYS - connected to 3v3 and 3v3 AUX on realtek card.
I guess separate 3v3 voltage regulator should be used instead of engaging 3V3_SYS pin.
Patching dtbs was required in my particular case:
Code: Select all
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi 2020-06-05 20:23:07.690753634 +0300
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi 2020-06-05 20:23:58.906751560 +0300
@@ -550,8 +550,8 @@
&pcie0 {
ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
- max-link-speed = <2>;
- num-lanes = <2>;
+ max-link-speed = <1>;
+ num-lanes = <1>;
vpcie0v9-supply = <&vcca0v9_s3>;
vpcie1v8-supply = <&vcca1v8_s3>;
status = "okay";
Setting
num-lanes = <1> was not really necessary but
max-link-speed = <1> was mandatory, otherwise kernel panics during pcie probe. I am not sure was it software issue or something else like impedance mismatching.
Code: Select all
pi@nanopineo4:~$ uname -a
Linux nanopineo4 5.6.14+ #55 SMP PREEMPT Wed Jun 3 06:13:21 EEST 2020 aarch64 aarch64 aarch64 GNU/Linux
Code: Select all
pi@nanopineo4:~$ sudo lspci -v
00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 242
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00000000-00000fff [size=4K]
Memory behind bridge: fa000000-fa0fffff [size=1M]
Prefetchable memory behind bridge: 00000000-000fffff [size=1M]
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable+ 64bit+
Capabilities: [b0] MSI-X: Enable- Count=1 Masked-
Capabilities: [c0] Express Root Port (Slot+), MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [274] Transaction Processing Hints
Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -12
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
Flags: bus master, fast devsel, latency 0, IRQ 243
I/O ports at <unassigned> [disabled]
Memory at fa004000 (64-bit, prefetchable) [size=4K]
Memory at fa000000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
Kernel driver in use: r8168