“Bluetooth device tree configuration”的版本间的差异

来自百问网嵌入式Linux wiki
 
(未显示2个用户的17个中间版本)
第1行: 第1行:
[[Category:Linux_Operating_System]]
+
== Article purpose ==
[[Category:Networking]]
+
本文介绍如何配置“蓝牙” <ref name="Bluetooth"> [[WLAN_and_Bluetooth_hardware_component|Bluetooth]] </ref> ''' 将外围设备“(或与框架关联的外围设备)”分配给 Linux<sup>&reg;</sup> OS'''.
[[Category:Bluetooth]]
+
 
 +
使用 '''设备树机制''' <ref> [[Device tree]]</ref>执行配置。
 +
 
 +
在我们的平台上选择的蓝牙配套芯片是赛普拉斯(Cypress)芯片 <ref>[http://wireless.murata.com/datasheet?/RFM/data/lbee5kl1dx.pdf MURATA CYW4343W datasheet]</ref>
 +
 
 +
== Bluetooth DT bindings documentation ==
 +
The ''Bluetooth''<ref name="WLAN and BT external peripheral"> [[WLAN_and_Bluetooth_hardware_component]]</ref> ''' 树绑定由以下部分组成:
 +
* STM32 USART设备树绑定 <ref>[[Serial TTY device tree configuration]]</ref>
 +
* 用作从属设备所连接的主机USART设备的子节点<ref>{{CodeSource | Linux kernel | Documentation/devicetree/bindings/net/broadcom-bluetooth.txt}}</ref> 的Cypress设备。
 +
 
 +
== Bluetooth DT configuration ==
 +
此硬件描述是STM32微处理器设备树文件(扩展名为.dtsi)和板设备树文件(扩展名为.dts)的组合。有关设备树文件拆分的说明,请参见设备树
 +
 
 +
=== Bluetooth DT configuration (STM32 level) ===
 +
USART外设节点位于``stm32mp157c.dtsi''
 +
* 这是一组属性,对于给定的STM32器件而言可能不变,例如:寄存器地址,时钟,复位...
 +
在 [[Serial TTY device tree configuration]]中说明了USART DT配置。
 +
 
 +
 
 +
=== Bluetooth DT configuration (board level) ===
 +
 
 +
&usart2 {
 +
        ...
 +
        uart-has-rtscts;                                    {{highlight|/* enable hardware flow control */}}
 +
        ...
 +
        bluetooth {                                            {{highlight|/* node of Bluetooth companion chip */}}       
 +
                shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;  {{highlight|/* GPIO specifier, used to enable the BT module */}}
 +
                compatible = "brcm,bcm43438-bt";
 +
                max-speed = <3000000>;
 +
        };
 +
};
 +
 
 +
USART的特定属性:
 +
* uart-has-rtscts; bool标志以启用硬件流控制
 +
 
 +
== How to configure Bluetooth using CubeMX ==
 +
[[STM32CubeMX]] 工具可用于配置STM32MPU设备并获取相应的[[Device_tree#STM32|platform configuration device tree]]文件。<br />
 +
 
 +
STM32CubeMX可能不支持上述 [[#Bluetooth DT bindings documentation|DT bindings documentation]]段落中描述的所有属性。如果是这样,该工具会在生成的设备树中插入'''用户部分'''。 然后可以编辑这些部分以添加一些属性,并将它们一代一代地保留下来。 有关更多信息,请参见 [[STM32CubeMX]] 用户手册。
 +
 
 +
==References==
 +
<references />

2020年11月5日 (四) 18:15的最新版本

Article purpose

本文介绍如何配置“蓝牙” [1] 将外围设备“(或与框架关联的外围设备)”分配给 Linux® OS.

使用 设备树机制 [2]执行配置。

在我们的平台上选择的蓝牙配套芯片是赛普拉斯(Cypress)芯片 [3]

Bluetooth DT bindings documentation

The Bluetooth[4] 树绑定由以下部分组成:

  • STM32 USART设备树绑定 [5]
  • 用作从属设备所连接的主机USART设备的子节点[6] 的Cypress设备。

Bluetooth DT configuration

此硬件描述是STM32微处理器设备树文件(扩展名为.dtsi)和板设备树文件(扩展名为.dts)的组合。有关设备树文件拆分的说明,请参见设备树

Bluetooth DT configuration (STM32 level)

USART外设节点位于``stm32mp157c.dtsi

  • 这是一组属性,对于给定的STM32器件而言可能不变,例如:寄存器地址,时钟,复位...

Serial TTY device tree configuration中说明了USART DT配置。


Bluetooth DT configuration (board level)

&usart2 {
       ... 
       uart-has-rtscts;                                     /* enable hardware flow control */
       ...
       bluetooth {                                            /* node of Bluetooth companion chip */         
               shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;  /* GPIO specifier, used to enable the BT module */
               compatible = "brcm,bcm43438-bt";
               max-speed = <3000000>;
       };
};

USART的特定属性:

  • uart-has-rtscts; bool标志以启用硬件流控制

How to configure Bluetooth using CubeMX

STM32CubeMX 工具可用于配置STM32MPU设备并获取相应的platform configuration device tree文件。

STM32CubeMX可能不支持上述 DT bindings documentation段落中描述的所有属性。如果是这样,该工具会在生成的设备树中插入用户部分。 然后可以编辑这些部分以添加一些属性,并将它们一代一代地保留下来。 有关更多信息,请参见 STM32CubeMX 用户手册。