Part 1
요약·해설
공식 원문 547줄과 property 43행을 전수 대조해 internal-counter versus master-bus modes·OPWFMB/OPWMB/OPWMCB/SAIC semantics·shared-timebase runtime impact·dead time/phase/filter fields·master-bus exclusivity 제약을 보존했습니다.
nxp,s32-emios-pwm
NXP Semiconductors
43 rows
eMIOS per-channel PWM/capture modes + internal or master-bus timebase
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
40499103D78EFF48845EEFE33B1E80352BA340CBAC0EA03C78F2DEA624896E7C
: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:: nxp,s32-emios-pwm
.. _dtbinding_nxp_s32_emios_pwm:
nxp,s32-emios-pwm
#################
Vendor: :ref:`NXP Semiconductors <dt_vendor_nxp>`
Description
***********
.. code-block:: none
NXP S32 eMIOS PWM node for S32 SoCs. Each channel in eMIOS can be configured
to use for PWM operation. There are several PWM modes supported by this module,
some modes only support on channels that have internal counter, some modes
require to use a reference timebase from a master bus.
For example to configuring eMIOS instance 0 with:
- Channel 0 for mode OPWFMB
- Channel 1 for mode OPWMB
- Channel 2 for mode OPWMCB with deadtime inserted at leading edge
- Channel 3 for mode SAIC, use internal timebase with input filter = 2 eMIOS clock
emios0_pwm: pwm {
pwm_0 {
channel = <0>;
pwm-mode = "OPWFMB";
prescaler = <8>;
period = <65534>;
duty-cycle = <32768>;
polarity = "ACTIVE_HIGH";
};
pwm_1 {
channel = <1>;
master-bus = <&emios1_bus_a>;
pwm-mode = "OPWMB";
duty-cycle = <32768>;
phase-shift = <100>;
polarity = "ACTIVE_LOW";
};
pwm_2 {
channel = <2>;
master-bus = <&emios1_bus_b>;
pwm-mode = "OPWMCB_LEAD_EDGE";
duty-cycle = <32768>;
dead-time = <100>;
polarity = "ACTIVE_LOW";
};
pwm_3 {
channel = <3>;
pwm-mode = "SAIC";
prescaler = <8>;
input-filter = <2>;
};
};
OPWMB and OPWMCB modes use reference timebase, the master bus is chosen over
phandle 'master-bus'. For OPWMB mode, PWM's period is master bus's period and
is 2 * master bus's period - 2 for OPWMCB mode. Please notice that the devicetree
node for master bus should be enabled and configured for using, please see
'nxp,s32-emios' bindings.
Properties
**********
Top level properties
====================
These property descriptions apply to "nxp,s32-emios-pwm"
nodes themselves. This page also describes child node
properties in the following sections.
.. 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
* - ``#pwm-cells``
- ``int``
- .. code-block:: none
Number of items to expect in a pwm specifier
This property is **required**.
Constant value: ``3``
* - ``pinctrl-0``
- ``phandles``
- .. code-block:: none
Pin configuration/s for the first state. Content is specific to the
selected pin controller driver implementation.
This property is **required**.
* - ``pinctrl-1``
- ``phandles``
- .. code-block:: none
Pin configuration/s for the second state. See pinctrl-0.
* - ``pinctrl-2``
- ``phandles``
- .. code-block:: none
Pin configuration/s for the third state. See pinctrl-0.
* - ``pinctrl-3``
- ``phandles``
- .. code-block:: none
Pin configuration/s for the fourth state. See pinctrl-0.
* - ``pinctrl-4``
- ``phandles``
- .. code-block:: none
Pin configuration/s for the fifth state. See pinctrl-0.
* - ``pinctrl-names``
- ``string-array``
- .. code-block:: none
Names for the provided states. The number of names needs to match the
number of states.
This property is **required**.
.. 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 "nxp,s32-emios-pwm" 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().
Child node properties
=====================
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``channel``
- ``int``
- .. code-block:: none
eMIOS PWM channel
This property is **required**.
* - ``master-bus``
- ``phandle``
- .. code-block:: none
A phandle to master-bus node that will be used as external timebase
for current channel, this can be bypassed if internal counter is used
for PWM operation. A master bus must be used exclusively, such as if
is used as a timebase for a channel in SAIC mode, do not use that
master bus as a timebase for generate PWM pulse.
* - ``pwm-mode``
- ``string``
- .. code-block:: none
Select PWM mode:
- OPWFMB: provides waveforms with variable duty cycle and frequency,
this mode uses internal counter.
- OPWMB: generate pulses with programmable leading and trailing
edge placement. The period is determined by period of
an external counter driven in MCB Up Mode. Changing PWM period
at runtime will impact to all channels share the same timebase.
The new period and cycle take effect in next period boundary.
- OPWMCB: generates a center aligned PWM with dead time insertion to the
leading or trailing edge. The period is determined by period of
an external counter driven in MCB Up Down Mode. Changing PWM period
at runtime will impact to all channels share the same timebase,
The new period and cycle take effect in next period boundary.
- SAIC: single action input capture mode, the eMIOS captures events as soon as
they occur. The value of latest captured event is stored and can be read
by software.
This property is **required**.
Legal values: ``'OPWFMB'``, ``'OPWMB'``, ``'OPWMCB_TRAIL_EDGE'``, ``'OPWMCB_LEAD_EDGE'``, ``'SAIC'``
* - ``polarity``
- ``string``
- .. code-block:: none
Output polarity for PWM channel.
Legal values: ``'ACTIVE_LOW'``, ``'ACTIVE_HIGH'``
* - ``duty-cycle``
- ``int``
- .. code-block:: none
Duty-cycle (in ticks) for PWM channel at boot time.
* - ``period``
- ``int``
- .. code-block:: none
Period (in ticks) for OPWFMB at boot time. Period for the rest
of PWM mode depends on period's master bus. Must be in range [2 ... 65535].
* - ``freeze``
- ``boolean``
- .. code-block:: none
Freeze individual internal counter when the chip enters Debug mode.
* - ``prescaler-src``
- ``string``
- .. code-block:: none
Select clock source for internal counter prescaler.
Default value: ``PRESCALED_CLOCK``
Legal values: ``'PRESCALED_CLOCK'``, ``'MODULE_CLOCK'``
* - ``prescaler``
- ``int``
- .. code-block:: none
The clock divider for internal counter prescaler.
Legal values: ``1``, ``2``, ``3``, ``4``, ``5``, ``6``, ``7``, ``8``, ``9``, ``10``, ``11``, ``12``, ``13``, ``14``, ``15``, ``16``
* - ``dead-time``
- ``int``
- .. code-block:: none
Dead time (in ticks) for PWM channel in OPWMCB mode.
* - ``phase-shift``
- ``int``
- .. code-block:: none
Phase Shift (in ticks) for PWM channel in OPWMB mode.
* - ``input-filter``
- ``int``
- .. code-block:: none
Select the minimum input pulse width, in filter clock cycles that can pass
through the input filter. The filter latency - the difference in time between
the input and the response is three clock edges. Default 0 means the filter
is bypassed. The clock source for programmable input filter is eMIOS clock.
Legal values: ``0``, ``2``, ``4``, ``8``, ``16``
Specifier cell names
********************
- pwm cells: channel, period, flags
Part 3
한국어 전문 번역
nxp,s32-emios-pwm
Vendor: NXP Semiconductors
공식 설명
S32 SoC용 NXP S32 eMIOS PWM node입니다. eMIOS의 각 channel을 PWM 동작에 사용하도록 구성할 수 있습니다. 이 module은 여러 PWM mode를 지원하며, 일부 mode는 internal counter가 있는 channel에서만 동작하고 일부는 master bus의 reference timebase가 필요합니다.
예를 들어 eMIOS instance 0을 다음과 같이 구성합니다.
- Channel 0: OPWFMB mode
- Channel 1: OPWMB mode
- Channel 2: leading edge에 dead time을 넣은 OPWMCB mode
- Channel 3: internal timebase와 2 eMIOS clock input filter를 사용하는 SAIC mode
emios0_pwm: pwm {
pwm_0 {
channel = <0>;
pwm-mode = "OPWFMB";
prescaler = <8>;
period = <65534>;
duty-cycle = <32768>;
polarity = "ACTIVE_HIGH";
};
pwm_1 {
channel = <1>;
master-bus = <&emios1_bus_a>;
pwm-mode = "OPWMB";
duty-cycle = <32768>;
phase-shift = <100>;
polarity = "ACTIVE_LOW";
};
pwm_2 {
channel = <2>;
master-bus = <&emios1_bus_b>;
pwm-mode = "OPWMCB_LEAD_EDGE";
duty-cycle = <32768>;
dead-time = <100>;
polarity = "ACTIVE_LOW";
};
pwm_3 {
channel = <3>;
pwm-mode = "SAIC";
prescaler = <8>;
input-filter = <2>;
};
};
OPWMB와 OPWMCB mode는 reference timebase를 사용하며 master bus는 master-bus phandle로 선택합니다. OPWMB의 PWM period는 master bus period이고, OPWMCB에서는 master bus period의 2배에서 2를 뺀 값입니다. Master bus devicetree node가 enable되고 사용할 수 있게 구성되어야 하며 nxp,s32-emios binding을 참고해야 합니다.Channel mode에 따라 internal counter 또는 shared master bus 선택
OPWFMB는 internal counter, OPWMB와 OPWMCB는 external master-bus timebase를 사용합니다. SAIC는 PWM output이 아니라 event capture mode입니다.
OPWFMB · SAIC option
OPWMB · OPWMCB
Duty · phase · dead time
SAIC + filter
Shared master-bus period를 runtime에 바꾸면 같은 timebase를 쓰는 모든 channel에 영향을 주며 다음 period boundary부터 적용됩니다. Master bus는 mode 사이에서 독점 사용해야 합니다.
속성 전체 번역
공식 top-level 31개와 child 12개 property를 모두 번역했습니다.
노드 전용 속성 · 7개
| 이름 | 형식 | 설명과 제약 |
|---|---|---|
#pwm-cells | int | PWM specifier item 수이며 필수 고정값은 3입니다. Cell 이름은 channel, period, flags입니다. 필수 · 고정값: 3 |
pinctrl-0 | phandles | 첫 번째 상태에서 사용할 핀 설정입니다. 구체적인 내용은 선택한 핀 컨트롤러 드라이버에 따라 달라집니다. 필수 |
pinctrl-1 | phandles | 두 번째 상태에서 사용할 핀 설정입니다. pinctrl-0과 같은 형식입니다. |
pinctrl-2 | phandles | 세 번째 상태에서 사용할 핀 설정입니다. pinctrl-0과 같은 형식입니다. |
pinctrl-3 | phandles | 네 번째 상태에서 사용할 핀 설정입니다. pinctrl-0과 같은 형식입니다. |
pinctrl-4 | phandles | 다섯 번째 상태에서 사용할 핀 설정입니다. pinctrl-0과 같은 형식입니다. |
pinctrl-names | string-array | 핀 설정 상태의 이름입니다. 이름 수는 정의한 상태 수와 같아야 합니다. 필수 |
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()를 호출해 직접 초기화해야 합니다. |
하위 노드 속성 · 12개
각 하위 노드에 적용되는 속성입니다.
| 이름 | 형식 | 설명과 제약 |
|---|---|---|
channel | int | eMIOS PWM channel 번호이며 필수입니다. 필수 |
master-bus | phandle | 현재 channel의 external timebase로 사용할 master-bus phandle입니다. Internal counter를 쓰면 생략할 수 있습니다. Master bus는 독점적으로 사용해야 하며, SAIC timebase로 사용한 bus를 PWM pulse 생성 timebase로 함께 사용하면 안 됩니다. |
pwm-mode | string | 필수 mode입니다. OPWFMB는 internal counter로 variable duty/frequency를 만들고, OPWMB는 external MCB Up counter의 programmable edges, OPWMCB는 external MCB Up Down counter 기반 center-aligned PWM과 edge dead time, SAIC는 single-action input capture를 제공합니다. 필수 · 허용값: 'OPWFMB', 'OPWMB', 'OPWMCB_TRAIL_EDGE', 'OPWMCB_LEAD_EDGE', 'SAIC' |
polarity | string | PWM channel output polarity이며 ACTIVE_LOW 또는 ACTIVE_HIGH입니다. 허용값: 'ACTIVE_LOW', 'ACTIVE_HIGH' |
duty-cycle | int | Boot 때 적용할 duty cycle이며 tick 단위입니다. |
period | int | OPWFMB boot period이며 tick 단위 2~65535입니다. 다른 PWM mode의 period는 master bus period에 의존합니다. |
freeze | boolean | Debug mode 진입 시 개별 internal counter를 정지합니다. |
prescaler-src | string | Internal counter prescaler source를 PRESCALED_CLOCK 또는 MODULE_CLOCK 중에서 선택하며 기본값은 PRESCALED_CLOCK입니다. 기본값: PRESCALED_CLOCK · 허용값: 'PRESCALED_CLOCK', 'MODULE_CLOCK' |
prescaler | int | Internal counter clock divider이며 1~16 중에서 선택합니다. 허용값: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
dead-time | int | OPWMCB mode의 channel dead time이며 tick 단위입니다. |
phase-shift | int | OPWMB mode channel phase shift이며 tick 단위입니다. |
input-filter | int | Input filter를 통과할 최소 pulse width입니다. 허용값은 0·2·4·8·16이고 0은 bypass입니다. Filter latency는 세 clock edge이며 programmable filter source는 eMIOS clock입니다. 허용값: 0, 2, 4, 8, 16 |
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.