:orphan: .. raw:: html .. dtcompatible:: nxp,qdec-s32 .. _dtbinding_nxp_s32_qdec: nxp,qdec-s32 ############ Vendor: :ref:`NXP Semiconductors ` Description *********** .. code-block:: none Quadrature Decoder driver which processes encoder signals to determine motor revs with the cooperation of S32 IP blocks- eMIOS, TRGMUX and LCU. The sensor qdec application can be used for testing this driver. The following example uses TRGMUX IN2 and IN3 to connect to LCU1 LC0 I0 and I1. LCU1 LC0 O2 and O3 connect to eMIOS0 CH6(Clockwise rotation) and CH7(Counter Clockwise rotation) via TRGMUX_INT_OUT37 and TRGMUX_INT_OUT38 micro-ticks-per-rev is set as per vehicle gearbox reduction. lcu output filters are set to capture maximum speed sensitivity and avoid channel noise. qdec0 { compatible = "nxp,qdec-s32"; pinctrl-0 = <&qdec_s32>; pinctrl-names = "default"; micro-ticks-per-rev = <685440000>; status = "okay"; trgmux = <&trgmux>; trgmux-io-config = <0 TRGMUX_IP_OUTPUT_EMIOS0_CH5_9_IPP_IND_CH6 TRGMUX_IP_INPUT_LCU1_LC0_OUT_I2>, <1 TRGMUX_IP_OUTPUT_EMIOS0_CH5_9_IPP_IND_CH7 TRGMUX_IP_INPUT_LCU1_LC0_OUT_I3>, <2 TRGMUX_IP_OUTPUT_LCU1_0_INP_I0 TRGMUX_IP_INPUT_SIUL2_IN2>, <3 TRGMUX_IP_OUTPUT_LCU1_0_INP_I1 TRGMUX_IP_INPUT_SIUL2_IN3>; lcu = <&lcu1>; lcu-input-idx = <1>; ; lcu-mux-sel = ; lcu-output-filter-config = /* LCU Out HW ID, Rise Filter, Fall Filter */ <0 5 5>, /* LCU O0 */ <1 5 5>, /* LCU O1 */ <2 2 2>, /* LCU O2 */ <3 2 2>; /* LCU O3 */ emios = <&emios0>; emios-channels = <6 7>; }; Properties ********** .. 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 * - ``micro-ticks-per-rev`` - ``int`` - .. code-block:: none This is a number that is used to determine how many revolutions * 1000000 were done based on the current counter's value. * - ``trgmux`` - ``phandle`` - .. code-block:: none phandle to the TRGMUX node. * - ``trgmux-io-config`` - ``array`` - .. code-block:: none This gives the logic triggers configuration of TRGMUX module. It contains 3 values for each of the 4 logic triggers used: logic trigger number, output, input. Hence, it's length should be '12'. Ex: trgmux-io-config = <0 TRGMUX_IP_OUTPUT_EMIOS0_CH5_9_IPP_IND_CH6 TRGMUX_IP_INPUT_LCU1_LC0_OUT_I2>, <1 TRGMUX_IP_OUTPUT_EMIOS0_CH5_9_IPP_IND_CH7 TRGMUX_IP_INPUT_LCU1_LC0_OUT_I3>, <2 TRGMUX_IP_OUTPUT_LCU1_0_INP_I0 TRGMUX_IP_INPUT_SIUL2_IN2>, <3 TRGMUX_IP_OUTPUT_LCU1_0_INP_I1 TRGMUX_IP_INPUT_SIUL2_IN3>; * - ``lcu`` - ``phandle`` - .. code-block:: none phandle to the LCU node. * - ``emios`` - ``phandle`` - .. code-block:: none phandle to the eMIOS node. * - ``lcu-output-filter-config`` - ``array`` - .. code-block:: none This array gives the configuration for each of the four outputs of LCU module. It contains the following for each output: hardware output id, rise filter and fall filter. The filters specify the delay in terms of CORE_CLK between the input and output line of LC. We use this delay to generate short pulses at the rising and falling edges of input pulse. It's length should be '12' - 3 entries for each of the four LCU outputs. Ex: lcu-output-filter-config = /* LCU Out HW ID, Rise Filter, Fall Filter */ <0 5 5>, /* LCU O0 */ <1 5 5>, /* LCU O1 */ <2 2 2>, /* LCU O2 */ <3 2 2>; /* LCU O3 */ * - ``lcu-mux-sel`` - ``array`` - .. code-block:: none This array configures the sources of input to the LCU module by programming the muxsel. * - ``lcu-input-idx`` - ``array`` - .. code-block:: none This array configures the input indices to the LCU module which help to determine the Logic Cell number used inside an LCU instance. * - ``emios-channels`` - ``array`` - .. code-block:: none This is the array containing 2 emios channel TypeG numbers used by the qdec. * - ``pinctrl-0`` - ``phandles`` - .. code-block:: none Pin configuration/s for the first state. Content is specific to the selected pin controller driver implementation. * - ``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. * - ``friendly-name`` - ``string`` - .. code-block:: none Human readable string describing the sensor. It can be used to distinguish multiple instances of the same model (e.g., lid accelerometer vs. base accelerometer in a laptop) to a host operating system. This property is defined in the Generic Sensor Property Usages of the HID Usage Tables specification (https://usb.org/sites/default/files/hut1_3_0.pdf, section 22.5). .. 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,qdec-s32" compatible. .. list-table:: :widths: 1 1 4 :header-rows: 1 * - Name - Type - Details * - ``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 * - ``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.