RK3588 蓝牙硬件与 Device Tree 集成

RK3588 蓝牙硬件与 Device Tree 集成

1. SoC事实

RK3588提供UART、USB、SDIO/PCIe和GPIO,但无内建Bluetooth radio。实际能力由板载/外接controller决定。

2. 本树板型

二十余个 rk3588*板级DTS包含 bluetooth-platdata节点。常见示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
wireless_bluetooth: wireless-bluetooth {
compatible = "bluetooth-platdata";
clocks = <&hym8563>;
clock-names = "ext_clock";
uart_rts_gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart7m1_rtsn &bt_reset_gpio
&bt_wake_gpio &bt_irq_gpio>;
pinctrl-1 = <&uart7_gpios>;
BT,reset_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
BT,wake_gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
BT,wake_host_irq = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
status = "okay";
};

这是tablet板示例,不是所有RK3588 PCB的固定引脚。

本树RK3588板型未使用标准brcm,*-bt、Realtek或Marvell UART child binding,也未发现板载USB/SDIO Bluetooth DT实例。平台节点只负责电源/唤醒,UART HCI通常还依赖用户态hciattach/厂商patchram流程;defconfig未显式启用BCM/RTL/QCA UART serdev协议。

3. UART

该示例使用UART7 M1 RTS pin。还必须在对应UART node启用TX/RX/CTS/RTS、设置正确pin group和状态。独立平台节点不会自动证明UART consumer已attach。

4. External clock

示例从HYM8563 RTC clock输出提供ext_clock。频率、常开/门控和上电顺序必须符合combo module要求,通常为32.768kHz。

5. GPIO

  • reset决定controller复位;
  • wake/device-wake决定低功耗;
  • host-wake是GPIO IRQ;
  • RTS在suspend切换。

Polarity取决于模块和电平转换,不能复制其它板型。

6. 模块类型

某些板型Wi-Fi节点标 ap6275p,提示AP6275P combo方案;其它EVB/vehicle/toybrick可能不同。应检查当前最终DTS、原理图、firmware和UART attach脚本。

7. USB dongle

外接USB Bluetooth不需要上述平台节点,由btusb枚举,但仍依赖USB host/PHY/VBUS和固件。

8. SDIO

SDIO Bluetooth driver虽已配置Marvell支持,不能据此判断板载BT走SDIO。Combo module常见结构是Wi-Fi走SDIO/PCIe、BT走UART。

9. 验证

1
2
3
dtc -I fs -O dts /sys/firmware/devicetree/base > running.dts
grep -n -E 'bluetooth|uart|serial' running.dts
dmesg | grep -Ei 'rfkill|Bluetooth|ttyS|serial'

最终DTB和运行枚举优先于源码中的其它板型。

文章互动

阅读 --

留言

0 条留言

正在加载留言…