“Bluetooth device tree configuration”的版本间的差异
第19行: | 第19行: | ||
在 [[Serial TTY device tree configuration]]中说明了USART DT配置。 | 在 [[Serial TTY device tree configuration]]中说明了USART DT配置。 | ||
− | === Bluetooth | + | == Article purpose == |
− | + | This article explains how to configure ''Bluetooth'' <ref name="Bluetooth"> [[WLAN_and_Bluetooth_hardware_component|Bluetooth]] </ref> ''' when the peripheral ''(or peripheral associated to the framework)'' is assigned to the Linux<sup>®</sup> OS'''. | |
− | + | ||
− | The | + | The configuration is performed using the '''device tree mechanism''' <ref> [[Device tree]]</ref>. |
+ | The Bluetooth companion chip chosen on our platform is a Cypress chip <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> ''' tree bindings are composed of: | |
− | + | * STM32 USART device tree bindings <ref>[[Serial TTY device tree configuration]]</ref> | |
− | + | * The Cypress device, used as child node <ref>{{CodeSource | Linux kernel | Documentation/devicetree/bindings/net/broadcom-bluetooth.txt}}</ref> of the host USART device to which the slave device is attached. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == 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. | |
− | + | === Bluetooth DT configuration (STM32 level) === | |
+ | The USART peripheral node is located in ''stm32mp151.dtsi'' | ||
+ | * This is a set of properties that may not vary for given STM32 device, such as: registers address, clock, reset... | ||
+ | The USART DT configuration is explained in [[Serial TTY device tree configuration]] | ||
+ | === Bluetooth DT configuration (board level) === | ||
&usart2 { | &usart2 { | ||
... | ... | ||
− | + | uart-has-rtscts; {{highlight|/* enable hardware flow control */}} | |
... | ... | ||
− | bluetooth { | + | 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"; | compatible = "brcm,bcm43438-bt"; | ||
max-speed = <3000000>; | max-speed = <3000000>; | ||
第54行: | 第52行: | ||
}; | }; | ||
− | + | Specific properties for USART: | |
− | + | * uart-has-rtscts; bool flag to enable hardware flow control | |
− | * | ||
− | |||
− | |||
== How to configure Bluetooth using CubeMX == | == How to configure Bluetooth using CubeMX == |
2020年11月5日 (四) 18:08的版本
目录
Article purpose
本文介绍如何配置“蓝牙” [1] 将外围设备“(或与框架关联的外围设备)”分配给 Linux® OS.
使用 设备树机制 [2]执行配置。
在我们的平台上选择的蓝牙配套芯片是赛普拉斯(Cypress)芯片 [3]
Bluetooth DT bindings documentation
The Bluetooth[4] 树绑定由以下部分组成:
Bluetooth DT configuration
此硬件描述是STM32微处理器设备树文件(扩展名为.dtsi)和板设备树文件(扩展名为.dts)的组合。有关设备树文件拆分的说明,请参见设备树
Bluetooth DT configuration (STM32 level)
USART外设节点位于``stm32mp157c.dtsi
- 这是一组属性,对于给定的STM32器件而言可能不变,例如:寄存器地址,时钟,复位...
在 Serial TTY device tree configuration中说明了USART DT配置。
Article purpose
This article explains how to configure Bluetooth [1] when the peripheral (or peripheral associated to the framework) is assigned to the Linux® OS.
The configuration is performed using the device tree mechanism [7].
The Bluetooth companion chip chosen on our platform is a Cypress chip [8]
Bluetooth DT bindings documentation
The Bluetooth[4] tree bindings are composed of:
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.
Bluetooth DT configuration (STM32 level)
The USART peripheral node is located in stm32mp151.dtsi
- This is a set of properties that may not vary for given STM32 device, such as: registers address, clock, reset...
The USART DT configuration is explained in Serial TTY device tree configuration
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>; }; };
Specific properties for USART:
- uart-has-rtscts; bool flag to enable hardware flow control
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.
References
- ↑ 1.01.1 Bluetooth
- ↑ Device tree
- ↑ MURATA CYW4343W datasheet
- ↑ 4.04.1 WLAN_and_Bluetooth_hardware_component
- ↑ Serial TTY device tree configuration
- ↑ Documentation/devicetree/bindings/net/broadcom-bluetooth.txt| |}} Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
- ↑ Device tree
- ↑ MURATA CYW4343W datasheet
- ↑ Serial TTY device tree configuration
- ↑ Documentation/devicetree/bindings/net/broadcom-bluetooth.txt| |}} Documentation/devicetree/bindings/net/broadcom-bluetooth.txt