:orphan: .. _st_stm32_pinctrl: st,stm32-pinctrl ################ Vendor: :ref:`STMicroelectronics ` Description *********** .. code-block:: none STM32 Pin controller Node Properties ********** Top level properties ==================== These property descriptions apply to "st,stm32-pinctrl" nodes themselves. This page also describes child node properties in the following sections. .. tabs:: .. group-tab:: Node specific properties Properties not inherited from the base binding file. (None) .. 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 "st,stm32-pinctrl" compatible. .. list-table:: :widths: 1 1 4 :header-rows: 1 * - Name - Type - Details * - ``reg`` - ``array`` - .. code-block:: none register space This property is **required**. See :ref:`dt-important-props` for more information. * - ``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-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. * - ``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 Child node properties ===================== .. list-table:: :widths: 1 1 4 :header-rows: 1 * - Name - Type - Details * - ``pinmux`` - ``int`` - .. code-block:: none Reused from https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml Integer array, represents gpio pin number and mux setting. These defines are calculated as: ((port * 16 + line) << 8) | function With: - port: The gpio port index (PA = 0, PB = 1, ..., PK = 11) - line: The line offset within the port (PA0 = 0, PA1 = 1, ..., PA15 = 15) - function: The function number, can be: * 0 : Alternate Function 0 * 1 : Alternate Function 1 * 2 : Alternate Function 2 * ... * 15 : Alternate Function 15 * 16 : Analog To simplify the usage, macro is available to generate "pinmux" field. This macro is available here: -include/dt-bindings/pinctrl/stm32-pinctrl-common.h Some examples of macro usage: GPIO A9 set as alernate function 2 ... { pinmux = ; }; GPIO A9 set as analog ... { pinmux = ; }; This property is **required**. * - ``bias-disable`` - ``boolean`` - .. code-block:: none Pin bias (push-pull) disabled. This is the default pin configuration and will be applied if no bias- property is set. * - ``bias-pull-down`` - ``boolean`` - .. code-block:: none Pull down on pin. * - ``bias-pull-up`` - ``boolean`` - .. code-block:: none Pull up on pin. * - ``drive-push-pull`` - ``boolean`` - .. code-block:: none Pin driven actively high and low. This is the default pin configuration and will be applied if no drive- property is set. * - ``drive-open-drain`` - ``boolean`` - .. code-block:: none Pin driven in open drain. * - ``slew-rate`` - ``string`` - .. code-block:: none Pin speed. Default to low-speed. For few pins (PA11 and PB3 depending on SoCs)hardware reset value could differ (very-high-speed). Carefully check reference manual for these pins. Default value: ``low-speed`` Legal values: ``'low-speed'``, ``'medium-speed'``, ``'high-speed'``, ``'very-high-speed'``