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
相关推荐
orion5720 小时前
Missing Semester Class1:course overview and introduction of shell
linux
用户120487221611 天前
Linux驱动编译与加载
linux·嵌入式
用户805533698031 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698031 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
tntxia3 天前
linux curl命令详解_curl详解
linux
扛枪的书生3 天前
Linux 网络管理器用法速查
linux
顺风尿一寸3 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
XIAOHEZIcode3 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
唐青枫3 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux