20251127给荣品RD-RK3588开发板跑Rockchip的原厂Buildroot【linux-5.10】系统时适配AP6275P的WIFI部分并实测网速80.7 Mbits/sec
本文记录了在荣品RD-RK3588开发板上适配AP6275P WiFi模块的过程。通过修改DTS配置文件,调整了蓝牙和WiFi的GPIO引脚设置,将原AP6398S芯片配置改为AP6275P,并实测获得了80.7Mbits/sec的网络传输速率。同时完成了RTC时钟源配置、PCIE接口调整等系统级修改,最终在Rockchip原厂Buildroot系统(linux-5.10内核)上实现了WiFi功能
20251127给荣品RD-RK3588开发板跑Rockchip的原厂Buildroot【linux-5.10】系统时适配AP6275P的WIFI部分并实测网速80.7 Mbits/sec
2025/11/27 15:07
缘起:实测网速:80.7 Mbits/sec
经过反复测试,终于把 荣品RD-RK3588开发板 自带的8寸屏的CTP触摸屏调试通了。
Android13的内核linux-5.10
Android13的内核linux-6.1。版本升级之后,
终于把全部的USB接口都点亮USB接口的鼠标了!
当你把荣品RD-RK3588开发板重新适配一把,就相当于从头做了一个项目:【荣品RD-RK3588开发板】。
当然,开发板的功能都是好的,你免除了调试的过程,也就没有解决相关硬件出错的经验/机会了!
结论:荣品的FAE工程师是真的很忙。
代码写的非常写意/潇洒!
【整个DTS,TAB和空格按键都是混用的!^_有些时候看着很难受的!^_】
DTS中的代码排版真的让人看得很难受!
1、由于Android13也是linxu-5.10内核,驱动【未修改】和DTS基本上都直接沿用Android13的了!
Y:\new_disk_4t\wyb\RD-RK3588\repo_RK3588_Buildroot20240508\kernel\arch\arm64\boot\dts\rockchip88\rk3588-evb7-v11.dtsi
wireless_bluetooth: wireless-bluetooth {
compatible = "bluetooth-platdata";
clocks = <&hym8563>;
clock-names = "ext_clock";
uart_rts_gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart9m0_rtsn>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_irq_gpio>;
pinctrl-1 = <&uart9_gpios>;
BT,reset_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
BT,wake_gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
BT,wake_host_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
status = "okay";
};
wireless_wlan: wireless-wlan {
compatible = "wlan-platdata";
wifi_chip_type = "ap6398s";
pinctrl-names = "default";
pinctrl-0 = <&wifi_host_wake_irq>;
WIFI,host_wake_irq = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
WIFI,poweren_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
status = "okay";
};
修改为:
wireless_bluetooth: wireless-bluetooth {
compatible = "bluetooth-platdata";
clocks = <&hym8563>;
clock-names = "ext_clock";
uart_rts_gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart9m0_rtsn>, <&bt_gpio>;
pinctrl-1 = <&uart9_gpios>;
BT,reset_gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
BT,wake_gpio = <&gpio2 RK_PB3 GPIO_ACTIVE_HIGH>;
BT,wake_host_irq = <&gpio2 RK_PB0 GPIO_ACTIVE_HIGH>;
status = "okay";
};
wireless_wlan: wireless-wlan {
compatible = "wlan-platdata";
wifi_chip_type = "ap6275p";
pinctrl-names = "default";
pinctrl-0 = <&wifi_host_wake_irq>, <&wifi_poweren_gpio>;
WIFI,host_wake_irq = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
WIFI,poweren_gpio = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
status = "okay";
};


2、配置I2C4总线上的RTC时钟源:
&i2c4 {
status = "okay";
pinctrl-0 = <&i2c4m1_xfer>;
ls_stk3332: light@47 {
compatible = "ls_stk3332";
status = "disabled";
reg = <0x47>;
type = <SENSOR_TYPE_LIGHT>;
irq_enable = <0>;
als_threshold_high = <100>;
als_threshold_low = <10>;
als_ctrl_gain = <2>; /* 0:x1 1:x4 2:x16 3:x64 */
poll_delay_ms = <100>;
};
icm42607_gyro: icm_gyro@68 {
status = "okay";
compatible = "icm42607_gyro";
reg = <0x68>;
poll_delay_ms = <30>;
type = <SENSOR_TYPE_GYROSCOPE>;
layout = <0>;
};
hym8563: hym8563@51 {
compatible = "haoyu,hym8563";
reg = <0x51>;
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "hym8563";
// pinctrl-names = "default";
// pinctrl-0 = <&hym8563_int>;
// interrupt-parent = <&gpio0>;
// interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
// wakeup-source;
};
};


3、关闭I2C6上的RTC
&i2c6 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c6m0_xfer>;
goodix_ts:goodix_ts@5d {
status = "okay";
compatible = "goodix,gt9xx";
reg = <0x5d>;
};
//hym8563: hym8563@51 {
// compatible = "haoyu,hym8563";
// reg = <0x51>;
// #clock-cells = <0>;
// clock-frequency = <32768>;
// clock-output-names = "hym8563";
// pinctrl-names = "default";
// pinctrl-0 = <&hym8563_int>;
// interrupt-parent = <&gpio0>;
// interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
// wakeup-source;
//};
};


4、配置PCIE部分:
&pcie2x1l0 {
reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&pcie30phy {
rockchip,pcie30-phymode = <PHY_MODE_PCIE_AGGREGATION>;
status = "okay";
};
&pcie3x4 {
reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie30>;
pinctrl-names = "default";
pinctrl-0 = <&pcie20x1_0_clkreqn_m1>;
status = "okay";
};
修改为:
&pcie2x1l0 {
phys = <&combphy1_ps PHY_TYPE_PCIE>;
reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie30>;
status = "okay";
};
&pcie2x1l2 {
phys = <&combphy0_ps PHY_TYPE_PCIE>;
vpcie3v3-supply = <&vcc3v3_pcie30>;
reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
status = "okay";
};
// 2025/11/6 15:32 wenyuanbo add for RD-RK3588
//&pcie30phy {
// rockchip,pcie30-phymode = <PHY_MODE_PCIE_AGGREGATION>;
// status = "okay";
//};
//
//&pcie3x4 {
// reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
// vpcie3v3-supply = <&vcc3v3_pcie30>;
// pinctrl-names = "default";
// pinctrl-0 = <&pcie20x1_0_clkreqn_m1>;
// status = "okay";
//};

5、配置AP6275P的控制GPIO口:
&pinctrl {
headphone {
hp_det: hp-det {
rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
// hym8563 {
// hym8563_int: hym8563-int {
// rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
// };
// };
lcd {
lcd_rst_gpio: lcd-rst-gpio {
//rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
goodix {
goodix_irq: goodix-irq {
rockchip,pins = <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
work_leds_gpio: work-leds-gpio {
rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
pcie30x4 {
pcie30x4_clkreqn_m1: pcie30x4-clkreqn-m1 {
rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
};
};

usb-typec {
usbc0_int: usbc0-int {
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
};
// 2025/11/12 20:46 wenyuanbo close for GMAC1 GPIO3A6 102
typec5v_pwren: typec5v-pwren {
//rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
wireless-bluetooth {
uart9_gpios: uart9-gpios {
rockchip,pins = <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
};
bt_gpio: bt-gpio {
rockchip,pins =
<0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,
<2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
<2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
wireless-wlan {
wifi_host_wake_irq: wifi-host-wake-irq {
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
wifi_poweren_gpio: wifi-poweren-gpio {
rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};

6、【可选,配置TF卡】
&sata0 {
status = "okay";
};
// 2025/11/12 14:21 wenyuanbo BT
//&sdio {
// max-frequency = <150000000>;
// no-sd;
// no-mmc;
// bus-width = <4>;
// disable-wp;
// cap-sd-highspeed;
// cap-sdio-irq;
// keep-power-in-suspend;
// mmc-pwrseq = <&sdio_pwrseq>;
// non-removable;
// pinctrl-names = "default";
// pinctrl-0 = <&sdiom0_pins>;
// sd-uhs-sdr104;
// status = "okay";
//};
// 2025/11/12 14:21 TF Card !!!!
&sdmmc {
status = "okay";
vmmc-supply = <&vcc_3v3_sd_s0>;
};

7、RK3588开发板跑Rockchip的原厂Buildroot【linux-5.10】系统,默认只集成了iperf2。
如果需要iperf3需要自行集成/在config配置文件中自行打开!^_
root@rk3588-buildroot:/# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 128 KByte (default)
------------------------------------------------------------
[ 93.401295] [dhd] dhd_flow_rings_delete: ifindex 0
[ 93.401513] [dhd] dhd_prot_flow_ring_delete: Send Flow Delete Req RING ID 37 for peer 6c:e8:74:da:32:41 prio 3 ifindex 0
[ 93.401676] [dhd] dhd_prot_flow_ring_delete: Send Flow Delete Req RING ID 41 for peer 33:33:00:00:00:16 prio 0 ifindex 0
[ 93.401868] [dhd] [wlan0] wl_iw_event : disconnected with 6c:e8:74:da:32:41, event 6, reason 8
[ 93.401954] [dhd] [wlan0] wl_ext_iapsta_link : [S] Link down with 6c:e8:74:da:32:41, WLC_E_DEAUTH_IND(6), reason 8
[ 93.402169] [dhd] dhd_prot_flow_ring_delete_response_process: Flow Delete Response status = 0 Flow 37
[ 93.402292] [dhd] dhd_prot_flow_ring_delete_response_process: Flow Delete Response status = 0 Flow 41
[ 93.402889] [dhd] [wlan0] wl_handle_link_down : Link down: WLC_E_DEAUTH_IND(6), reason 8 from 6c:e8:74:da:32:41
[ 93.404402] [dhd] [wlan0] wl_iw_event : [1 times] disconnected with 00:00:00:00:00:00, event 11, reason 8
[ 93.404476] [dhd] [wlan0] wl_ext_iapsta_link : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
[ 93.404552] [dhd] wl_process_host_event: Deleting all STA from assoc list and flowrings.
[ 93.404655] [dhd] dhd_flow_rings_delete: ifindex 0
[ 93.404723] [dhd] [wlan0] wl_handle_link_down : Disconnect event sent to upper layerevent:6 e->reason=134217728 reason=8 ie_len=0 loc_gen=0 from 6c:e8:74:da:32:41
[ 93.404765] [dhd] [wlan0] wl_iw_event : Link Down with 00:00:00:00:00:00, reason=2
[ 93.404822] [dhd] [wlan0] wl_ext_iapsta_link : [S] Link down with 00:00:00:00:00:00, WLC_E_LINK(16), reason 2
[ 93.423902] [dhd] CFG80211-ERROR) wl_notify_connect_status_sta : Unexpected event:16 in assoc idle state
[ 93.508486] [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 2, bssidx: 0
[ 94.098389] [dhd] [wlan0] wl_ext_set_chanspec : channel 5g-149(0xe09b 80MHz)
[ 94.101798] [dhd] [wlan0] wl_conn_debug_info : Connecting with 6c:e8:74:da:2e:01 ssid "GreatPeople -人间大炮", len (15), channel=5g-149(chan_cnt=1), sec=wpa2/psk/mfpn/aes, rssi=-56
[ 94.180831] [dhd] dhd_update_interface_flow_info: ifindex:0 previous role:0 new role:0
[ 94.180927] [dhd] dhd_update_multicilent_flow_rings: ifindex 0
[ 94.203474] [dhd] [wlan0] wl_iw_event : Link UP with 6c:e8:74:da:2e:01
[ 94.203565] [dhd] [wlan0] wl_ext_iapsta_link : [S] Link UP with 6c:e8:74:da:2e:01
[ 94.210338] [dhd] [wlan0] wl_bss_connect_done : Report connect result - connection succeeded
[ 94.214341] [dhd] dhd_prot_flow_ring_create: Send Flow Create Req flow ID 37 for peer 6c:e8:74:da:2e:01 prio 3 ifindex 0 items 512
[ 94.214900] [dhd] dhd_prot_flow_ring_create_response_process: Flow Create Response status = 0 Flow 37
[ 94.227330] [dhd] [wlan0] wl_add_keyext : key index (0) for 6c:e8:74:da:2e:01
[ 94.250651] [dhd] [wlan0] wl_cfg80211_set_suspend_bcn_li_dtim : bcn_li_dtim:0 lpas:0 bcn_to_dly:0
[ 94.259631] [dhd] dhd_prot_flow_ring_create: Send Flow Create Req flow ID 41 for peer 33:33:00:00:00:16 prio 0 ifindex 0 items 2048
[ 94.260109] [dhd] dhd_prot_flow_ring_create_response_process: Flow Create Response status = 0 Flow 41
[ 1] local 192.168.3.115 port 5001 connected with 192.168.3.116 port 41214
[ ID] Interval Transfer Bandwidth
[ 1] 0.00-3600.24 sec 33.8 GBytes 80.7 Mbits/sec
[ 3726.385936] [dhd] dhd_prot_flow_ring_create: Send Flow Create Req flow ID 36 for peer 4c:cc:6a:69:5a:9b prio 1 ifindex 0 items 512
[ 3726.386514] [dhd] dhd_prot_flow_ring_create_response_process: Flow Create Response status = 0 Flow 36
ubuntu20.04.6服务器:
rootroot@rootroot-X99-Turbo:~$ iperf -c 192.168.3.115 -i 1 -t 3600
------------------------------------------------------------
Client connecting to 192.168.3.115, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.3.116 port 41214 connected with 192.168.3.115 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 15.5 MBytes 130 Mbits/sec
[ 3] 1.0- 2.0 sec 10.4 MBytes 87.0 Mbits/sec
[ 3] 2.0- 3.0 sec 10.9 MBytes 91.2 Mbits/sec
[ 3] 3.0- 4.0 sec 7.00 MBytes 58.7 Mbits/sec
[ 3] 4.0- 5.0 sec 7.00 MBytes 58.7 Mbits/sec
[ 3] 5.0- 6.0 sec 8.12 MBytes 68.2 Mbits/sec
[ 3] 3595.0-3596.0 sec 5.00 MBytes 41.9 Mbits/sec
[ 3] 3596.0-3597.0 sec 6.25 MBytes 52.4 Mbits/sec
[ 3] 3597.0-3598.0 sec 5.25 MBytes 44.0 Mbits/sec
[ 3] 3598.0-3599.0 sec 9.00 MBytes 75.5 Mbits/sec
[ 3] 3599.0-3600.0 sec 9.12 MBytes 76.5 Mbits/sec
[ 3] 0.0-3600.1 sec 33.8 GBytes 80.7 Mbits/sec
rootroot@rootroot-X99-Turbo:~$



魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)