22. PCI-E接口

LubanCat-RK3588系列板卡存在两种PCIE接口,一种是MINI-PCIE接口,另一种是PCIEx4接口。

具有MINI-PCIE接口有以下板卡:

  1. LubanCat-4

  2. LubanCat-5

  3. LubanCat-5IO

具有PCIEx4接口有以下板卡:

  1. LubanCat-5IO

22.1. MINI-PCIE接口

本章配套视频介绍:

../../../_images/video.png

《34-Mini-PCIe接口的使用》

https://www.bilibili.com/video/BV1yu4y1o75Q/?spm_id_from=333.788

MINI PCI-E接口的pcie类型: PCIe Gen2 x 1 lane

可接长度规格: 全高或半高

LubanCat-RK3588系列板卡都有MINI PCI-E接口,样式都几乎一致,这里以LubanCat-4为例,MINI PCI-E接口图片如下

未找到图片

注意

我们的LubanCat-RK系列板卡量产的MINI PCI-E接口的铜柱只贴在全高位置,半高网卡可以接MINI PCI-E延长片。

延长片参考链接: MINI PCI-E半高转全高延长片

22.1.1. MINI PCI-E的无线网卡安装说明

注意

MINI PCI-E接口不支持热插拔,请勿在上电的时候安装或者卸载, 上电时安装和卸载可能会导致板卡短路, 轻则板卡保护关机,重则损坏芯片的接口或者烧坏芯片

  • 安装MINI PCI-E接口的板子要注意,板子需要斜着插进去,如图所示

未找到图片
  • 然后按压到带有螺纹的铜柱,用螺丝刀把螺丝扭紧,固定网卡

未找到图片

22.1.2. 搭配4G网卡使用

物理连接接口为MINI PCI-E,实际通讯接口为usb

未找到图片

注意

猫4的Sim/TF二合一卡座太高,导致mini pcei接口无法接5G模块,如果需要使用5G请外接USB转接板,然后接入到USB接口。猫5/猫5IO则不存在这个问题。

22.1.3. 复用成msata接口

鲁班猫的mini-pcie接口除了能作为mini-pcie的功能使用外,还能作为msata接口使用,可以连接msata硬盘

操作方法:

修改板卡配置文件,根据自己的板卡添加相应的配置文件。

1
2
#修改配置文件
sudo vi /boot/uEnv/uEnv.txt

在#overlay_start后添加下列语句

1
dtoverlay=/dtb/overlay/rk3588-lubancat-msata-overlay.dtbo

如果想关闭msata就在把添加的语句前添加 #

如下图

  • 打开msata功能

未找到图片
  • 关闭msata功能

未找到图片

22.2. PCIEx4接口

PCIEx4接口的pcie类型: PCIE3.0 x 2Lanes

LubanCat-RK3588系列板卡的PCIEx4接口以鲁班猫5IO为例,接口如下图,可以接入PCIE设备或者PCIE转网卡:

未找到图片

以下接入PCIE转2.5G网卡为例,型号为RTL8125:

未找到图片

接入后,查看系统信息,执行以下命令:

1
2
3
4
5
6
    #查看pcie设备
    lspci

    #信息输出如下
    0001:10:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3588 (rev 01)
    0001:11:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 04)

只有pcie有设备lspci才会有信息输出,以上可以看到存在RTL8125 2.5G网卡。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    #查看RTL8125启动打印信息
    dmesg | grep 8125

    #信息输出如下
    [    2.946481] pci 0001:11:00.0: [10ec:8125] type 00 class 0x020000
    [    2.990039] r8169 0001:11:00.0 eth1: RTL8125B, ec:60:73:64:55:b0, XID 641, IRQ 162

    #查看系统网络接口
    ifconfig

    #信息输出如下
    eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
                    ether e2:4d:07:f4:d6:90  txqueuelen 1000  (Ethernet)
                    RX packets 0  bytes 0 (0.0 B)
                    RX errors 0  dropped 0  overruns 0  frame 0
                    TX packets 0  bytes 0 (0.0 B)
                    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
                    device interrupt 89

    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
                    inet 192.168.103.147  netmask 255.255.255.0  broadcast 192.168.103.255
                    inet6 fe80::21f3:2370:80a4:6f8b  prefixlen 64  scopeid 0x20<link>
                    ether ec:60:73:64:55:b0  txqueuelen 1000  (Ethernet)
                    RX packets 2037  bytes 208228 (203.3 KiB)
                    RX errors 0  dropped 0  overruns 0  frame 0
                    TX packets 255  bytes 24944 (24.3 KiB)
                    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    eth2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
                    ether de:4d:07:f4:d6:90  txqueuelen 1000  (Ethernet)
                    RX packets 0  bytes 0 (0.0 B)
                    RX errors 0  dropped 0  overruns 0  frame 0
                    TX packets 0  bytes 0 (0.0 B)
                    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
                    device interrupt 144

可以发现,系统多了一个网卡,并且根据启动信息可知,RTL8125网卡的mac地址为ec:60:73:64:55:b0,可以确定对应的网卡为eth1。