nxp,freqme

Description

NXP Frequency Measurement (FREQME) module.

Measures a target clock against a reference clock and returns the result
in Hz. The reference and target inputs are routed through the INPUTMUX
peripheral. Exposed through the Zephyr clock_monitor API: MEASURE
(one-shot) and WINDOW (continuous MIN/MAX threshold) modes are both
supported, built on the FREQME frequency measurement operate mode.

Selectable clock sources are declared with two container child nodes,
"reference-sources" and "target-sources". Each container holds one child
node per selectable source, pairing an INPUTMUX route with a frequency
provider. The child marked "default-source" is the power-on selection.
clock_monitor_set_source() switches between the declared sources at
runtime, keyed by the INPUTMUX connection cookie (see mux-states).

A source's frequency provider is either "clock-frequency" (a fixed
constant in Hz, used verbatim) or "clocks" (queried through
clock_control_get_rate()). When both are present "clock-frequency" wins
and "clocks" is ignored. A reference source must resolve to a nonzero
frequency; a target source only needs one for WINDOW auto-derive
(window.expected_hz == 0).

The driver does not enable the selected source clocks. The application must
ensure the chosen reference and target clocks are running before configure()/start();
a source left off simply measures zero edges and is reported as CLOCK_LOST.

Place NXP_FREQME_REF_* cookies in "reference-sources" and NXP_FREQME_TAR_*
cookies in "target-sources"; the axis is not checked at build time. See
<zephyr/dt-bindings/clock-monitor/nxp-freqme.h>.

Properties

Top level properties

These property descriptions apply to “nxp,freqme” nodes themselves. This page also describes child node properties in the following sections.

Properties not inherited from the base binding file.

(None)

Grandchild node properties

Name

Type

Details

mux-states

phandle-array

INPUTMUX route for this source, given as a single mux-states
entry <&inputmuxN index connection> where:
  - &inputmuxN is the INPUTMUX mux controller providing the route
  - index is the destination index (0 for FREQME)
  - connection is an inputmux_connection_t cookie from
    fsl_inputmux_connections.h. Use the NXP_FREQME_REF_* /
    NXP_FREQME_TAR_* macros in
    <zephyr/dt-bindings/clock-monitor/nxp-freqme.h>.
The route is applied through the mux subsystem (mux_state_apply()).
The connection cookie is also the runtime
clock_monitor_set_source() selector for this source.

This property is required.

clocks

phandle-array

Frequency provider queried through clock_control_get_rate().
Ignored when clock-frequency is present.

clock-frequency

int

Fixed frequency provider in Hz, used verbatim without querying
clock_control. Takes precedence over clocks. Use for sources whose
rate the clock_control driver cannot report (e.g. an external
crystal).

default-source

boolean

Marks this source as the power-on selection for its container.
Exactly one child of each container must set it.

mux-controls

phandle-array

List of MUX controller specifiers. Each entry is a phandle to a MUX
controller followed by #mux-control-cells addressing cells.

mux-control-names

string-array

Optional names for the entries in "mux-controls"

mux-state-names

string-array

Optional names for the entries in "mux-states"