renesas,ra-pdm

Description

One channel of the Renesas RA Pulse Density Modulation Interface (PDM-IF).

Each channel has its own data pin, filter chain and data buffer, and is
described by its own node. The chain is a sinc decimator, then a high pass
filter that removes the modulator's DC bias, then a compensation filter that
corrects the sinc filter's passband droop, then a half band low pass filter
that rejects what the final decimation would otherwise alias into the band.
Every coefficient below defaults to its register's reset value; together
those are the module's voice band setting, a 100 Hz high pass corner and a
7 kHz low pass corner, which is what capture at 16 kHz wants. A design
capturing at another rate wants a chain designed for it, which the hardware
manual does not tabulate. A channel samples its own PDMDATn pin on the
rising edge of PDM_CLKn, or the pin of the channel below it on the falling
edge, which is how two microphones sharing one data line are read.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

channel

int

PDM-IF channel this node describes, which selects the PDMDATn and
PDMCLKn pins it drives.

This property is required.

Legal values: 0, 1, 2

pinctrl-0

phandles

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

This property is required.

pinctrl-names

string-array

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

This property is required.

sinc-filter-order

int

Order of the sinc filter that decimates the one-bit stream. A higher
order rejects more of the modulator's shaped noise and needs more of the
twenty-bit output range for the filter's own gain. The default is the
reset value of the mode setting register.

Default value: 4

Legal values: 1, 2, 3, 4

falling-edge

boolean

Sample the data pin of the channel below this one on the falling edge of
its clock, rather than this channel's own pin on the rising edge. A PDM
microphone whose select input is tied high drives the line on the falling
edge, so a pair sharing one line is read as this channel and the one
above it. Channel 0 reads channel 2's pin.

lpf-shift

int

Right shift applied to the low pass filter's input, in bits. Shifting
trades headroom for resolution where a loud microphone would otherwise
saturate the filter. The default is the reset value.

Default value: 0

Legal values: 0, 1, 2, 3

compensation-shift

int

Right shift applied to the compensation filter's input, in bits. The
default is the reset value.

Default value: 0

Legal values: 0, 1, 2, 3

hpf-shift

int

Right shift applied to the high pass filter's input, in bits. The
default is the reset value.

Default value: 0

Legal values: 0, 1, 2, 3

hpf-coefficient-s0

int

High pass filter s(0) coefficient, as 16-bit signed data with fourteen
fraction bits. The reset value puts the corner at 100 Hz.

Default value: 0x3f61

hpf-coefficient-k1

int

High pass filter k(1) coefficient, in the same format as s(0).

Default value: 0x3ec1

hpf-coefficients-h

array

The high pass filter's two h coefficients, h(0) and h(1).

Default value: [0x4000, 0xc000]

compensation-coefficients

array

The eleven h coefficients of the compensation filter, which flattens the
droop the sinc filter leaves across the passband.

Default value: [0x1fe8, 0x39, 0x3c, 0x1e56, 0x1dc, 0x6e1, 0x1dc, 0x1e56, 0x3c, 0x39, 0x1fe8]

lpf-coefficient-h0

int

Centre coefficient of the half band low pass filter, which is also the
final decimation by two. The reset values put the corner at 7 kHz.

Default value: 0x400

lpf-coefficients-h1

array

The twenty remaining coefficients of the half band low pass filter.

Default value: [0x1ff8, 0xa, 0x1ff0, 0x18, 0x1fdc, 0x34, 0x1fb3, 0x76, 0x1f2e, 0x289, 0x289, 0x1f2e, 0x76, 0x1fb3, 0x34, 0x1fdc, 0x18, 0x1ff0, 0xa, 0x1ff8]

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.