nxp,ipwm

Description

NXP i.MX PWM controller.

This is the simple PWM timer block found across the i.MX application
processor family (i.MX27 onwards, including the i.MX8M series), referred to as
PWMv2 in the reference manuals and exposed as the "ipwm" driver by the MCUX
SDK. Each instance drives a single output from a 16-bit counter: the period is
taken from PWMPR and the duty cycle is fed to PWMSAR through a four-entry
sample FIFO.

It is unrelated to the FlexPWM block described by "nxp,imx-pwm", which is
organised into submodules with paired complementary outputs, deadtime
insertion and fault inputs, and which appears on the i.MX RT, MCX and LPC
families instead.

Linux describes the same hardware as "fsl,imx27-pwm". A distinct compatible is
used here because Zephyr's existing "fsl,imx27-pwm" driver is built on the
legacy device_imx HAL, which covers only i.MX6SX and i.MX7D, and because that
binding predates the three-cell PWM specifier that pwm_dt_spec requires.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

nxp,prescaler

int

Divider applied to the PWM root clock before it reaches the counter,
expressed as the actual division factor: 1 passes the clock through
unchanged. Valid range is 1 to 4096; the driver programs PWMCR.PRESCALER
with this value minus one.

The divider is static, so it fixes the counter rate reported by
pwm_get_cycles_per_sec() and therefore the longest period a consumer can
request. Leave it at the default unless a low PWM frequency needs a
counter slower than the root clock.

Default value: 1

run-in-wait

boolean

Keep the counter running in WAIT mode. Without this the counter is gated
as soon as the CPU executes WFI, which the idle thread does whenever no
thread is runnable, stopping the output.

#pwm-cells

int

Number of items to expect in a pwm specifier

This property is required.

Constant value: 3

channels

int

Number of PWM channels supported by the controller.

pinctrl-0

phandles

Pin configuration/s for the first state. Content is specific to the
selected pin controller driver implementation.

pinctrl-1

phandles

Pin configuration/s for the second state. See pinctrl-0.

pinctrl-2

phandles

Pin configuration/s for the third state. See pinctrl-0.

pinctrl-3

phandles

Pin configuration/s for the fourth state. See pinctrl-0.

pinctrl-4

phandles

Pin configuration/s for the fifth state. See pinctrl-0.

pinctrl-names

string-array

Names for the provided states. The number of names needs to match the
number of states.

rdc

int

Set the RDC permission for specified peripheral: Resource Domain Controller (RDC)
supports flexible configuration on IP’s access permission, each individual IP can,
for example, be configured as A-core only or M-core only. This property uses some
macros defined in 'include/zephyr/dt-bindings/rdc/imx_rdc.h' to configure current
peripheral's access permission.
For example to allow both A53 and M7 Core to have read/write permission to current
peripheral:
rdc = <(RDC_DOMAIN_PERM(A53_DOMAIN_ID, RDC_DOMAIN_PERM_RW)|\
        RDC_DOMAIN_PERM(M7_DOMAIN_ID, RDC_DOMAIN_PERM_RW))>;

Specifier cell names

  • pwm cells: channel, period, flags