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

来自百问网嵌入式Linux wiki
第12行: 第12行:
  
 
== Bluetooth DT configuration ==
 
== Bluetooth DT configuration ==
This hardware description is a combination of the STM32 microprocessor device tree files (.dtsi extension) and board device tree files (.dts extension). See the device tree for an explanation of the device tree file split.  
+
此硬件描述是STM32微处理器设备树文件(扩展名为.dtsi)和板设备树文件(扩展名为.dts)的组合。有关设备树文件拆分的说明,请参见设备树
  
 
=== Bluetooth DT configuration (STM32 level) ===
 
=== Bluetooth DT configuration (STM32 level) ===
The USART peripheral node is located in ''stm32mp157c.dtsi''
+
USART外设节点位于``stm32mp157c.dtsi''
* This is a set of properties that may not vary for given STM32 device, such as: registers address, clock, reset...
+
* 这是一组属性,对于给定的STM32器件而言可能不变,例如:寄存器地址,时钟,复位...
The USART DT configuration is explained in [[Serial TTY device tree configuration]]
+
[[Serial TTY device tree configuration]]中说明了USART DT配置。
  
 
=== Bluetooth DT configuration (board level) ===
 
=== Bluetooth DT configuration (board level) ===
第24行: 第24行:
 
'''For {{EcosystemRelease | revision=1.1.0}}''':<br />
 
'''For {{EcosystemRelease | revision=1.1.0}}''':<br />
 
[Description for the STM32MP15-Ecosystem-v1.1.0 revision]
 
[Description for the STM32MP15-Ecosystem-v1.1.0 revision]
{{ReviewsComments|NSA W940 : why adding this sentence into brackets?}}
+
{{ReviewsComments|NSA W940 : 为什么将这句话加在方括号中?}}
  
 
  &usart2 {
 
  &usart2 {
第37行: 第37行:
 
  };
 
  };
  
Specific properties for USART:
+
USART的特定属性:
* st,hw-flow-ctrl: bool flag to enable hardware flow control
+
* st,hw-flow-ctrl:bool标志以启用硬件流控制
  
 
<div class="mw-collapsible mw-collapsed">
 
<div class="mw-collapsible mw-collapsed">
第44行: 第44行:
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
 
[Description for the STM32MP15-Ecosystem-v1.0.0 and previous revisions]
 
[Description for the STM32MP15-Ecosystem-v1.0.0 and previous revisions]
{{ReviewsComments|NSA W940 : why adding this sentence into brackets ?}}
+
{{ReviewsComments|NSA W940 :为什么要把这句话加到括号里 ?}}
  
 
  &usart2 {
 
  &usart2 {
第58行: 第58行:
 
  };
 
  };
  
Specific properties for USART:
+
USART的特定属性:
* btreg: GPIO to power up or down the internal CYW4343W regulators used by the Bluetooth section
+
* btreg: GPIO,用于打开或关闭蓝牙部分使用的内部CYW4343W稳压器
* st,hw-flow-ctrl: bool flag to enable hardware flow control
+
* st,hw-flow-ctrl: bool标志以启用硬件流控制
  
 
</div></div>
 
</div></div>

2020年11月5日 (四) 17:59的版本

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)

<securetransclude src="ProtectedTemplate:ReviewsComments" params="NSA W940 : I would have say as below in stead of you first proposal?"></securetransclude>{{#set:Has reviews comments=true}} For ecosystem release ≥ v1.1.0{{#set:Ecosystem release=revision of a previous flow 1.1.0}} :
For ecosystem release v1.1.0{{#set:Ecosystem release=revision of a previous flow 1.1.0}} :
[Description for the STM32MP15-Ecosystem-v1.1.0 revision] <securetransclude src="ProtectedTemplate:ReviewsComments" params="NSA W940 : 为什么将这句话加在方括号中?"></securetransclude>{{#set:Has reviews comments=true}}

&usart2 {
       ... 
       st,hw-flow-ctrl;                                       /* 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的特定属性:

  • st,hw-flow-ctrl:bool标志以启用硬件流控制

For ecosystem release ≤ v1.0.0{{#set:Ecosystem release=revision of a previous flow 1.0.0}} :

[Description for the STM32MP15-Ecosystem-v1.0.0 and previous revisions] <securetransclude src="ProtectedTemplate:ReviewsComments" params="NSA W940 :为什么要把这句话加到括号里 ?"></securetransclude>{{#set:Has reviews comments=true}}

&usart2 {
       ... 
       st,hw-flow-ctrl;                            /* enable hardware flow control */
       ...
       bluetooth {                                 /* node of Bluetooth companion chip */
               pinctrl-names = "default";          
               pinctrl-0 = <&btreg>;               /* GPIO to power up or down the internal companion chip regulators */
               compatible = "brcm,bcm43438-bt";
               max-speed = <3000000>;
       };
};

USART的特定属性:

  • btreg: GPIO,用于打开或关闭蓝牙部分使用的内部CYW4343W稳压器
  • st,hw-flow-ctrl: bool标志以启用硬件流控制

How to configure Bluetooth using CubeMX

The STM32CubeMX tool can be used to configure the STM32MPU device and get the corresponding platform configuration device tree files.
The STM32CubeMX may not support all the properties described in the above DT bindings documentation paragraph. If so, the tool inserts user sections in the generated device tree. These sections can then be edited to add some properties and they are preserved from one generation to another. Refer to STM32CubeMX user manual for further information.