ti,am3352-eqep

Description

TI Enhanced Quadrature Encoder Pulse based counter

On SoCs where the EQEP inputs are reachable only through a crossbar
(e.g. AM13E), reference the Input X-BAR via "mux-states" instead of
adding SoC-specific pinmux logic to this driver. Each EQEP input is
hard-wired to a fixed Input X-BAR channel (EQEP0A = INPUT17 / channel
16, and so on); the board or overlay routes a GPIO into that channel
and names the entry.

Examples

&eqep0 {
        pinctrl-0 = <&gpio_pb11>;
        pinctrl-names = "default";

        /* PB11 (GPIO43) -> INPUTXBAR17 (ch 16) -> EQEP0A */
        mux-states = <&xbar1 16 AM13E2_XBAR_IN_STATE(43, 1)>;
        mux-state-names = "qepa";
};

QEPA/QEPB/QEPI can instead be sourced from an on-chip comparator or
the PWM crossbar (AM13E-only); these need no pinctrl or mux entry,
so set the QEPSRCSEL field directly:

&eqep0 {
        ti,qepa-src = <TI_EQEP_SRC_CMPSS1>;
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

ti,qepa-src

int

QEPSRCSEL.QEPASEL value (AM13E-only): Input X-BAR (0, default),
CMPSS0-3 CTRIPH (1-4), or PWMXBAR1-8 (5-12). See
include/zephyr/dt-bindings/counter/ti_am3352_eqep.h and TRM
Table 25-1. When "mux-states" names a "qepa" entry and this
property is absent, 0 (Input X-BAR) is used.

Legal values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

ti,qepb-src

int

QEPSRCSEL.QEPBSEL value (AM13E-only). See ti,qepa-src.

Legal values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

ti,qepi-src

int

QEPSRCSEL.QEPISEL value (AM13E-only). See ti,qepa-src.

Legal values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

ti,pwren

phandle-array

Power-enable this peripheral via SYSCTL.PWREN_*.
Format: <&sysctl offset bit>.

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.

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-states

phandle-array

List of MUX state specifiers. Each entry is a phandle to a MUX
controller followed by #mux-state-cells cells: the addressing cells
followed by a trailing "state" cell carrying the default state value.

mux-state-names

string-array

Optional names for the entries in "mux-states"