cat /sys/kernel/debug/pinctrl/pinctrl-rockchip-pinctrl/pinmux-pins
cat /sys/kernel/debug/gpio
20251213给飞凌OK3588-C开发板适配Rockchip原厂的Buildroot【linux-6.1】系统时适配ETH1实测网速936 Mbits/sec
2025/12/13 9:24
缘起:飞凌OK3588-C开发板跑Rockchip原厂的Buildroot【linux-6.1】系统时,适配ETH1接口的网卡。
当你把荣品RD-RK3588开发板重新适配一把,就相当于从头做了一个项目:【荣品RD-RK3588开发板】。
当然,开发板的功能都是好的,你免除了调试的过程,也就没有解决相关硬件出错的经验/机会了!
1、
Y:\new_disk_4t\wyb\RD-RK3588\rk3588_linux6.1_release_v1.2.0_20241220\kernel-6.1\arch\arm64\boot\dts\rockchip\rk3588-evb7-v11.dtsi
&gmac1 {
/* Use rgmii-rxid mode to disable rx delay inside Soc */
phy-mode = "rgmii-rxid";
clock_in_out = "output";
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
/* Reset time is 20ms, 100ms for rtl8211f */
snps,reset-delays-us = <0 20000 100000>;
pinctrl-names = "default";
pinctrl-0 = <&gmac1_miim
&gmac1_tx_bus2
&gmac1_rx_bus2
&gmac1_rgmii_clk
&gmac1_rgmii_bus>;
tx_delay = <0x43>;
/* rx_delay = <0x3f>; */
phy-handle = <&rgmii_phy>;
status = "okay";
};
修改为:
&gmac1 {
/* Use rgmii-rxid mode to disable rx delay inside Soc */
phy-mode = "rgmii-rxid";
clock_in_out = "output";
snps,reset-gpio = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
/* Reset time is 20ms, 100ms for rtl8211f */
snps,reset-delays-us = <0 20000 100000>;
pinctrl-names = "default";
pinctrl-0 = <&gmac1_miim
&gmac1_tx_bus2
&gmac1_rx_bus2
&gmac1_rgmii_clk
&gmac1_rgmii_bus>;
tx_delay = <0x44>;
/* rx_delay = <0x4f>; */
phy-handle = <&rgmii_phy1>;
status = "okay";
};
&mdio1 {
rgmii_phy: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x1>;
};
};
修改为:
&mdio1 {
rgmii_phy1: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x2>;
};
};
cat /sys/kernel/debug/pinctrl/pinctrl-rockchip-pinctrl/pinmux-pins
cat /sys/kernel/debug/gpio
2、刷机开发板OK3588-C后,没有eth0/eth1,根据以前的经验比对GPIO口的复用!
错误的GPIO复用:
pin 95 (gpio2-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 96 (gpio3-0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 97 (gpio3-1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 98 (gpio3-2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 99 (gpio3-3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 100 (gpio3-4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 101 (gpio3-5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 102 (gpio3-6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 103 (gpio3-7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 104 (gpio3-8): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 105 (gpio3-9): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 106 (gpio3-10): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 107 (gpio3-11): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 108 (gpio3-12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 109 (gpio3-13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 110 (gpio3-14): 2-0022 (GPIO UNCLAIMED) function usb-typec group usbc0-int
pin 111 (gpio3-15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 112 (gpio3-16): (MUX UNCLAIMED) gpio3:112
pin 113 (gpio3-17): (MUX UNCLAIMED) gpio3:113
pin 114 (gpio3-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 115 (gpio3-19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 116 (gpio3-20): fdea0000.hdmi (GPIO UNCLAIMED) function hdmi group hdmim2-tx1-cec
飞凌的linux/Buildroot R1的GPIO口的复用
pin 95 (gpio2-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 96 (gpio3-0): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rgmii-bus
pin 97 (gpio3-1): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rgmii-bus
pin 98 (gpio3-2): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rgmii-bus
pin 99 (gpio3-3): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rgmii-bus
pin 100 (gpio3-4): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rgmii-clk
pin 101 (gpio3-5): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rgmii-clk
pin 102 (gpio3-6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 103 (gpio3-7): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rx-bus2
pin 104 (gpio3-8): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rx-bus2
pin 105 (gpio3-9): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-rx-bus2
pin 106 (gpio3-10): dsi0-en gpio3:106 function lcd group mipi0-enable-gpio
pin 107 (gpio3-11): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-tx-bus2
pin 108 (gpio3-12): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-tx-bus2
pin 109 (gpio3-13): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-tx-bus2
pin 110 (gpio3-14): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 111 (gpio3-15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 112 (gpio3-16): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 113 (gpio3-17): (MUX UNCLAIMED) gpio3:113
pin 114 (gpio3-18): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-miim
pin 115 (gpio3-19): fe1c0000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1-miim
pin 116 (gpio3-20): fea70000.can (GPIO UNCLAIMED) function can2 group can2m0-pins
GMAC1的RESET:
pin 44 (gpio1-12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
Y:\new_disk_4t\wyb\RD-RK3588\rk3588_linux6.1_release_v1.2.0_20241220\kernel-6.1\arch\arm64\boot\dts\rockchip\.rk3588-evb7-v11-linux.dtb.dts.tmp
搜索:【1 12 】
“1 12 ”
&gmac1 {
phy-mode = "rgmii-rxid";
clock_in_out = "output";
snps,reset-gpio = <&gpio1 12 1>;
snps,reset-active-low;
snps,reset-delays-us = <0 20000 100000>;
pinctrl-names = "default";
pinctrl-0 = <&gmac1_miim
&gmac1_tx_bus2
&gmac1_rx_bus2
&gmac1_rgmii_clk
&gmac1_rgmii_bus>;
tx_delay = <0x44>;
phy-handle = <&rgmii_phy1>;
status = "okay";
};
&pcie2x1l0 {
reset-gpios = <&gpio1 12 0>;
status = "okay";
};
3、拿掉pcie2x1l0
&i2s7_8ch {
status = "okay";
};
&mdio1 {
rgmii_phy1: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x2>;
};
};
&mipi_dcphy0 {
status = "okay";
};
&mipi_dcphy1 {
status = "disabled";
};
// 2025/12/13 10:00 wenyuanbo add close for GMAC1 RESET
//&pcie2x1l0 {
// reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
// status = "okay";
//};
&pcie30phy {
rockchip,pcie30-phymode = <PHY_MODE_PCIE_AGGREGATION>;
status = "okay";
};
4、使用iperf2进行网速测试:
[BEGIN] 2025/12/13 10:11:26
rootroot@rootroot-X99-Turbo:~$
rootroot@rootroot-X99-Turbo:~$ iperf -c 192.168.3.227 -i 1 -t 1800
------------------------------------------------------------
Client connecting to 192.168.3.227, TCP port 5001
TCP window size: 1.46 MByte (default)
------------------------------------------------------------
[ 3] local 192.168.3.116 port 49350 connected with 192.168.3.227 port 5001
\[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 113 MBytes 951 Mbits/sec
[ 3] 1.0- 2.0 sec 112 MBytes 938 Mbits/sec
[ 3] 2.0- 3.0 sec 112 MBytes 937 Mbits/sec
[ 3] 3.0- 4.0 sec 112 MBytes 935 Mbits/sec
[ 3] 4.0- 5.0 sec 111 MBytes 933 Mbits/sec
[ 3] 5.0- 6.0 sec 112 MBytes 938 Mbits/sec
[ 3] 1790.0-1791.0 sec 112 MBytes 942 Mbits/sec
[ 3] 1791.0-1792.0 sec 111 MBytes 934 Mbits/sec
[ 3] 1792.0-1793.0 sec 112 MBytes 935 Mbits/sec
[ 3] 1793.0-1794.0 sec 112 MBytes 938 Mbits/sec
[ 3] 1794.0-1795.0 sec 112 MBytes 941 Mbits/sec
[ 3] 1795.0-1796.0 sec 112 MBytes 940 Mbits/sec
[ 3] 1796.0-1797.0 sec 111 MBytes 928 Mbits/sec
[ 3] 1797.0-1798.0 sec 112 MBytes 940 Mbits/sec
[ 3] 1798.0-1799.0 sec 111 MBytes 934 Mbits/sec
[ 3] 1799.0-1800.0 sec 112 MBytes 944 Mbits/sec
[ 3] 0.0-1800.0 sec 196 GBytes 936 Mbits/sec
rootroot@rootroot-X99-Turbo:~$