RK3588 RTL8125BG调试

RTL8125B是一款PCIE转RJ45的网卡控制器芯片,在底层调试时只需配置PCIE即可

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo.dtsi
index 798359eaf061..d8a7a43cdfa0 100755
--- a/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nvr-demo.dtsi
@@ -193,21 +193,44 @@
        pinctrl-0 = <&pwm11m2_pins>;
        status = "okay";
 };
- 
+
+&pcie2x1l0 {
+       phys = <&combphy1_ps PHY_TYPE_PCIE>;
+       reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
+       rockchip,init-delay-ms = <100>;
+       vpcie3v3-supply = <&vcc3v3_pcie30>;
+       status = "okay";
+};
+
+&pcie2x1l1 {
+       phys = <&combphy2_psu PHY_TYPE_PCIE>;
+       reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
+       vpcie3v3-supply = <&vcc3v3_pcie30>;
+       rockchip,init-delay-ms = <100>;
+       status = "disabled";
+};
+
+&pcie2x1l2 {
+       //reset-gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>;
+       vpcie3v3-supply = <&vcc3v3_pcie30>;
+       rockchip,init-delay-ms = <100>;
+       status = "disabled";
+};
+
 &combphy0_ps {
        pinctrl-names = "default";
-       pinctrl-0 = <&sata0_pm_reset>;
+       //pinctrl-0 = <&sata0_pm_reset>;
        status = "disabled";
 };
 
 &combphy1_ps {
        pinctrl-names = "default";
-       pinctrl-0 = <&sata1_pm_reset>;
-       status = "disabled";
+       //pinctrl-0 = <&sata1_pm_reset>;
+       status = "okay";
 };
 
 &combphy2_psu {
-       status = "okay";
+       status = "disabled";
 };
 
 &dp0 {
@@ -475,6 +498,7 @@
 };
 
 &pcie30phy {
+       rockchip,pcie30-phymode = <PHY_MODE_PCIE_AGGREGATION>;
        status = "okay";
 };
 
diff --git a/arch/arm64/configs/rockchip_linux_defconfig b/arch/arm64/configs/rockchip_linux_defconfig
index 54d2d56a68eb..db5fdc8f6d1a 100644
--- a/arch/arm64/configs/rockchip_linux_defconfig
+++ b/arch/arm64/configs/rockchip_linux_defconfig
@@ -1,3 +1,4 @@
+CONFIG_R8169=y
 CONFIG_VIDEO_ROCKCHIP_HDMIRX=y
 CONFIG_DEFAULT_HOSTNAME="localhost"
 CONFIG_SYSVIPC=y

查看pcie设备的pid和vid:

cat /sys/bus/pci/devices/0002\:21\:00.0/uevent 
DRIVER=r8169
PCI_CLASS=20000
PCI_ID=10EC:8125
PCI_SUBSYS_ID=10EC:8125
PCI_SLOT_NAME=0002:21:00.0
MODALIAS=pci:v000010ECd00008125sv000010ECsd00008125bc02sc00i00
相关推荐
Lary_Rock1 小时前
RK3576 LINUX RKNN SDK 测试
linux·运维·服务器
云飞云共享云桌面3 小时前
8位机械工程师如何共享一台图形工作站算力?
linux·服务器·网络
Peter_chq3 小时前
【操作系统】基于环形队列的生产消费模型
linux·c语言·开发语言·c++·后端
一坨阿亮4 小时前
Linux 使用中的问题
linux·运维
dsywws5 小时前
Linux学习笔记之vim入门
linux·笔记·学习
幺零九零零6 小时前
【C++】socket套接字编程
linux·服务器·网络·c++
小林熬夜学编程7 小时前
【Linux系统编程】第四十一弹---线程深度解析:从地址空间到多线程实践
linux·c语言·开发语言·c++·算法
程思扬8 小时前
为什么Uptime+Kuma本地部署与远程使用是网站监控新选择?
linux·服务器·网络·经验分享·后端·网络协议·1024程序员节
sun0077008 小时前
拷贝 cp -rdp 和 cp -a
linux·运维·服务器
wowocpp8 小时前
ubuntu 22.04 server 安装 anaconda3
linux·运维·ubuntu