Part 1
요약·해설
공식 원문 440줄과 property 35행을 전수 대조해 GPIO versus SPI control·SPIM child linkage·Table 6 transition defaults·supply compensation 제약을 보존했습니다.
nordic,nrf21540-fem
Nordic Semiconductor
35 rows
TX/RX/PDN/antenna/mode GPIOs + optional SPI control + transition timing
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
AB92A0C801FC1027869B56ECE9C2F938B838635BF864E1426A0CE17576925365
:orphan:
.. raw:: html
<!--
FIXME: do not limit page width until content uses another representation
format other than tables
-->
<style>.wy-nav-content { max-width: none; !important }</style>
.. dtcompatible:: nordic,nrf21540-fem
.. _dtbinding_nordic_nrf21540_fem:
nordic,nrf21540-fem
###################
Vendor: :ref:`Nordic Semiconductor <dt_vendor_nordic>`
Description
***********
.. code-block:: none
This is a representation of the nRF21540 Radio Front-End module.
See the "nordic,nrf21540-fem-spi" binding to configure the SPI
interface. The SPI interface should be configured as a child node
of the SPI bus you have connected to the FEM. Then you "connect"
the FEM and SPI configurations using the spi-if property.
Here is an example nRF21540 configuration with a SPI interface
selected, using the SPIM0 peripheral found on several nRF5 SoCs:
&spi0 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
/* ... MISO/MOSI/SCK pin configuration goes here ... */
my_spi_if: nrf21540-spi@0 {
compatible = "nordic,nrf21540-fem-spi";
reg = <0>;
spi-max-frequency = <8000000>;
};
};
nrf_radio_fem: nrf21540 {
compatible = "nordic,nrf21540-fem";
tx-en-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
rx-en-gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
spi-if = <&my_spi_if>;
pdn-gpios = <...>;
ant-sel-gpios = <...>;
mode-gpios = <...>;
/* ... other nRF21540 properties go here ... */
};
&radio {
fem = <&nrf_radio_fem>;
};
In the above example, the nRF21540 is configured for use with:
- TX_EN on P0.2 (from 'tx-en-gpios')
- RX_EN on P0.5 (from 'rx-en-gpios')
- SPI communication via SPIM0 (the bus, or parent node, of
the 'my_spi_if' node
- CSN on P1.3 (from index 0 in the bus node's 'cs-gpios' property)
You must perform any additional required SPI pin configuration
(nRF21540 MISO, MOSI, and SCK pins) within the SPI bus node
('spi0' in the above example). See your SPI node's binding for
details on these pin mux properties. You can use any SPI node
available in your SoC's devicetree.
Configure any other nRF21540 pins as needed using 'pdn-gpios',
'ant-sel-gpios', and 'mode-gpios' properties. If unsure about the
format, use 'tx-en-gpios' as an example.
Finally, the nRF5 SoC's radio peripheral is set up for use with
the nRF21540 via the 'fem' property in the 'radio' node.
Properties
**********
.. tabs::
.. group-tab:: Node specific properties
Properties not inherited from the base binding file.
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``tx-en-gpios``
- ``phandle-array``
- .. code-block:: none
GPIO of the SOC controlling TX_EN pin of the nRF21540
* - ``rx-en-gpios``
- ``phandle-array``
- .. code-block:: none
GPIO of the SOC controlling RX_EN pin of the nRF21540
* - ``pdn-gpios``
- ``phandle-array``
- .. code-block:: none
GPIO of the SOC controlling PDN pin of the nRF21540
* - ``ant-sel-gpios``
- ``phandle-array``
- .. code-block:: none
GPIO of the SOC controlling ANT-SEL pin of the nRF21540
* - ``mode-gpios``
- ``phandle-array``
- .. code-block:: none
GPIO of the SOC controlling MODE pin of the nRF21540
* - ``spi-if``
- ``phandle``
- .. code-block:: none
Reference to the nordic,nrf21540-fem-spi SPI bus interface.
This must be present to support SPI control of the FEM.
* - ``tx-en-settle-time-us``
- ``int``
- .. code-block:: none
Settling time in microseconds from state PG to TX.
Default value is based on Table 6 of the nRF21540 Product
Specification (v1.0), and can be overridden for tuned
configurations.
Default value: ``11``
* - ``rx-en-settle-time-us``
- ``int``
- .. code-block:: none
Settling time in microseconds from state PG to RX.
Default value is based on Table 6 of the nRF21540 Product
Specification (v1.0), and can be overridden for tuned
configurations.
Default value: ``11``
* - ``pdn-settle-time-us``
- ``int``
- .. code-block:: none
Settling time in microseconds from state PD to PG.
Default value is based on Table 6 of the nRF21540 Product
Specification (v1.0), and can be overridden for tuned
configurations.
Default value: ``18``
* - ``trx-hold-time-us``
- ``int``
- .. code-block:: none
Power-off time in microseconds when changing from RX or TX to PG.
Default value is based on Table 6 of the nRF21540 Product
Specification (v1.0), and can be overridden for tuned
configurations.
Default value: ``3``
* - ``supply-voltage-mv``
- ``int``
- .. code-block:: none
nRF21540 supply voltage in mV.
This is used if compensation for nRF21540 supply voltage is supported
by software.
.. group-tab:: Deprecated node specific properties
Deprecated properties not inherited from the base binding file.
(None)
.. group-tab:: Base properties
Properties inherited from the base binding file, which defines
common properties that may be set on many nodes. Not all of these
may apply to the "nordic,nrf21540-fem" compatible.
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``wakeup-source``
- ``boolean``
- .. code-block:: none
Property to identify that a device can be used as wake up source.
When this property is provided a specific flag is set into the
device that tells the system that the device is capable of
wake up the system.
Wake up capable devices are disabled (interruptions will not wake up
the system) by default but they can be enabled at runtime if necessary.
* - ``power-domain``
- ``phandle``
- .. code-block:: none
Power domain the device belongs to.
The device will be notified when the power domain it belongs to is either
suspended or resumed.
* - ``zephyr,pm-device-runtime-auto``
- ``boolean``
- .. code-block:: none
Automatically configure the device for runtime power management after the
init function runs.
* - ``zephyr,disabling-power-states``
- ``phandles``
- .. code-block:: none
List of power states that will disable this device power.
* - ``status``
- ``string``
- .. code-block:: none
indicates the operational status of a device
Legal values: ``'ok'``, ``'okay'``, ``'disabled'``, ``'reserved'``, ``'fail'``, ``'fail-sss'``
See :ref:`dt-important-props` for more information.
* - ``compatible``
- ``string-array``
- .. code-block:: none
compatible strings
This property is **required**.
See :ref:`dt-important-props` for more information.
* - ``reg``
- ``array``
- .. code-block:: none
register space
See :ref:`dt-important-props` for more information.
* - ``reg-names``
- ``string-array``
- .. code-block:: none
name of each register space
* - ``interrupts``
- ``array``
- .. code-block:: none
interrupts for device
See :ref:`dt-important-props` for more information.
* - ``interrupts-extended``
- ``compound``
- .. code-block:: none
extended interrupt specifier for device
* - ``interrupt-names``
- ``string-array``
- .. code-block:: none
name of each interrupt
* - ``interrupt-parent``
- ``phandle``
- .. code-block:: none
phandle to interrupt controller node
* - ``label``
- ``string``
- .. code-block:: none
Human readable string describing the device (used as device_get_binding() argument)
See :ref:`dt-important-props` for more information.
This property is **deprecated**.
* - ``clocks``
- ``phandle-array``
- .. code-block:: none
Clock gate information
* - ``clock-names``
- ``string-array``
- .. code-block:: none
name of each clock
* - ``#address-cells``
- ``int``
- .. code-block:: none
number of address cells in reg property
* - ``#size-cells``
- ``int``
- .. code-block:: none
number of size cells in reg property
* - ``dmas``
- ``phandle-array``
- .. code-block:: none
DMA channels specifiers
* - ``dma-names``
- ``string-array``
- .. code-block:: none
Provided names of DMA channel specifiers
* - ``io-channels``
- ``phandle-array``
- .. code-block:: none
IO channels specifiers
* - ``io-channel-names``
- ``string-array``
- .. code-block:: none
Provided names of IO channel specifiers
* - ``mboxes``
- ``phandle-array``
- .. code-block:: none
mailbox / IPM channels specifiers
* - ``mbox-names``
- ``string-array``
- .. code-block:: none
Provided names of mailbox / IPM channel specifiers
* - ``zephyr,deferred-init``
- ``boolean``
- .. code-block:: none
Do not initialize device automatically on boot. Device should be manually
initialized using device_init().
Part 3
한국어 전문 번역
nordic,nrf21540-fem
Vendor: Nordic Semiconductor
공식 설명
nRF21540 Radio Front-End Module의 표현입니다.
SPI interface를 구성하려면 "nordic,nrf21540-fem-spi" binding을 참조하십시오. SPI interface는 FEM을 연결한 SPI bus의 child node로 구성하고, spi-if property로 FEM 설정과 SPI 설정을 연결합니다.
여러 nRF5 SoC에 있는 SPIM0 peripheral을 사용하는 예제는 다음과 같습니다.
&spi0 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
/* ... MISO/MOSI/SCK pin configuration goes here ... */
my_spi_if: nrf21540-spi@0 {
compatible = "nordic,nrf21540-fem-spi";
reg = <0>;
spi-max-frequency = <8000000>;
};
};
nrf_radio_fem: nrf21540 {
compatible = "nordic,nrf21540-fem";
tx-en-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
rx-en-gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
spi-if = <&my_spi_if>;
pdn-gpios = <...>;
ant-sel-gpios = <...>;
mode-gpios = <...>;
/* ... other nRF21540 properties go here ... */
};
&radio {
fem = <&nrf_radio_fem>;
};
위 예제의 nRF21540 구성은 다음과 같습니다.
- tx-en-gpios의 TX_EN은 P0.2
- rx-en-gpios의 RX_EN은 P0.5
- my_spi_if node의 parent bus인 SPIM0을 통한 SPI communication
- SPI bus node의 cs-gpios index 0에서 가져온 P1.3의 CSN
추가로 필요한 SPI pin 설정(nRF21540 MISO, MOSI, SCK)은 SPI bus node인 spi0 안에서 수행해야 합니다. Pin mux property는 해당 SPI node binding을 참조하십시오. SoC devicetree에서 사용할 수 있는 어떤 SPI node든 사용할 수 있습니다.
필요하면 pdn-gpios, ant-sel-gpios, mode-gpios로 나머지 nRF21540 pin을 구성합니다. 형식이 확실하지 않으면 tx-en-gpios를 예제로 사용하십시오.
마지막으로 radio node의 fem property를 통해 nRF5 SoC radio peripheral이 nRF21540을 사용하도록 연결합니다.FEM control pin과 SPI interface를 한 topology로 연결
Base compatible만 필수이며 11개 node property는 표상 모두 선택입니다. TX_EN·RX_EN·PDN·ANT-SEL·MODE는 SoC GPIO로 직접 제어하고, register control이 필요하면 별도 SPI child를 만든 뒤 spi-if로 연결합니다.
fem phandle
TX_EN · RX_EN · PDN
Optional spi-if phandle
ANT-SEL · MODE
State timing
Product Specification v1.0 Table 6 기반 기본값은 PG→TX 11us, PG→RX 11us, PD→PG 18us, RX/TX→PG hold 3us입니다. Tuned configuration에서는 override할 수 있습니다. supply-voltage-mv는 software가 voltage compensation을 지원할 때 사용합니다.
MISO·MOSI·SCK pin mux와 CSN은 FEM node가 아니라 선택한 SPI bus node에 둡니다. Official example의 P0.2 TX_EN, P0.5 RX_EN, P1.3 CSN 연결도 전문 번역에 보존했습니다.
속성 전체 번역
공식 node 11개와 base 24개 property를 모두 번역했습니다.
노드 전용 속성 · 11개
| 이름 | 형식 | 설명과 제약 |
|---|---|---|
tx-en-gpios | phandle-array | SoC에서 nRF21540 TX_EN pin을 제어하는 GPIO입니다. |
rx-en-gpios | phandle-array | SoC에서 nRF21540 RX_EN pin을 제어하는 GPIO입니다. |
pdn-gpios | phandle-array | SoC에서 nRF21540 PDN pin을 제어하는 GPIO입니다. |
ant-sel-gpios | phandle-array | SoC에서 nRF21540 ANT-SEL pin을 제어하는 GPIO입니다. |
mode-gpios | phandle-array | SoC에서 nRF21540 MODE pin을 제어하는 GPIO입니다. |
spi-if | phandle | nordic,nrf21540-fem-spi node를 가리키는 phandle입니다. FEM을 SPI로 제어하려면 제공해야 합니다. |
tx-en-settle-time-us | int | PG state에서 TX state로 전환하는 settling time이며 microsecond 단위입니다. Product Specification v1.0 Table 6 기반 기본값은 11입니다. 기본값: 11 |
rx-en-settle-time-us | int | PG state에서 RX state로 전환하는 settling time이며 microsecond 단위입니다. Product Specification v1.0 Table 6 기반 기본값은 11입니다. 기본값: 11 |
pdn-settle-time-us | int | PD state에서 PG state로 전환하는 settling time이며 microsecond 단위입니다. Product Specification v1.0 Table 6 기반 기본값은 18입니다. 기본값: 18 |
trx-hold-time-us | int | RX 또는 TX에서 PG로 바꿀 때의 power-off hold time이며 microsecond 단위입니다. Product Specification v1.0 Table 6 기반 기본값은 3입니다. 기본값: 3 |
supply-voltage-mv | int | nRF21540 supply voltage이며 millivolt 단위입니다. Software가 supply-voltage compensation을 지원할 때 사용합니다. |
Base binding property · 24개
공통 기본 바인딩에서 상속한 속성입니다. 이 compatible에서 사용하지 않는 속성도 공식 참조 문서에 실려 있으면 함께 표시합니다.
| 이름 | 형식 | 설명과 제약 |
|---|---|---|
wakeup-source | boolean | 이 장치를 시스템 깨우기에 사용할 수 있음을 나타냅니다. 이 속성이 있으면 깨우기 지원 플래그가 설정됩니다. 기본 상태에서는 장치의 인터럽트로 시스템을 깨우지 않으며, 실행 중에 깨우기 기능을 활성화할 수 있습니다. |
power-domain | phandle | 장치가 속한 전원 도메인의 phandle입니다. 해당 전원 도메인이 일시 중단되거나 다시 동작하면 장치에 알림이 전달됩니다. |
zephyr,pm-device-runtime-auto | boolean | 초기화 함수 실행 후 장치의 런타임 전원 관리를 자동으로 설정합니다. |
zephyr,disabling-power-states | phandles | 이 장치의 전원이 꺼지는 전원 상태 목록입니다. |
status | string | 장치의 동작 상태를 나타냅니다. 허용값: 'ok', 'okay', 'disabled', 'reserved', 'fail', 'fail-sss' |
compatible | string-array | 이 노드에 적용할 바인딩과 드라이버를 식별하는 compatible 문자열 목록입니다. 필수 |
reg | array | 장치 레지스터의 주소 범위를 지정합니다. |
reg-names | string-array | 각 register space의 이름입니다. |
interrupts | array | 장치에서 사용하는 인터럽트를 지정하는 목록입니다. |
interrupts-extended | compound | 인터럽트 컨트롤러의 phandle을 함께 지정하는 확장 형식의 인터럽트 명세입니다. |
interrupt-names | string-array | 각 interrupt의 이름입니다. |
interrupt-parent | phandle | 인터럽트 컨트롤러 노드를 가리키는 phandle입니다. |
label | string | 사람이 장치를 알아볼 수 있도록 붙이는 이름입니다. 과거에는 device_get_binding()의 인자로 사용했습니다. 사용 중단됨 |
clocks | phandle-array | 클록 게이트 또는 클록 공급원을 지정하는 phandle 배열입니다. |
clock-names | string-array | 각 clock의 이름입니다. |
#address-cells | int | 하위 노드의 reg 속성에서 주소를 나타내는 데 쓰는 셀 수입니다. |
#size-cells | int | 하위 노드의 reg 속성에서 크기를 나타내는 데 쓰는 셀 수입니다. |
dmas | phandle-array | DMA 채널을 지정하는 phandle 배열입니다. |
dma-names | string-array | 지정한 DMA 채널의 이름입니다. |
io-channels | phandle-array | I/O 채널을 지정하는 phandle 배열입니다. |
io-channel-names | string-array | 지정한 I/O 채널의 이름입니다. |
mboxes | phandle-array | 메일박스/IPM 채널을 지정하는 phandle 배열입니다. |
mbox-names | string-array | 지정한 메일박스/IPM 채널의 이름입니다. |
zephyr,deferred-init | boolean | 부팅할 때 장치를 자동으로 초기화하지 않습니다. 이후 device_init()를 호출해 직접 초기화해야 합니다. |
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.