:orphan: .. raw:: html .. dtcompatible:: st,stm32f1-pinctrl .. _dtbinding_st_stm32f1_pinctrl: st,stm32f1-pinctrl ################## Vendor: :ref:`STMicroelectronics ` Description *********** .. code-block:: none STM32F1 Pin controller Node Based on pincfg-node.yaml binding. Note: `bias-disable` and `drive-push-pull` are default pin configurations. They will be applied in case no `bias-foo` or `driver-bar` properties are set. Properties ********** Top level properties ==================== These property descriptions apply to "st,stm32f1-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. .. list-table:: :widths: 1 1 4 :header-rows: 1 * - Name - Type - Details * - ``swj-cfg`` - ``string`` - .. code-block:: none Configures number of pins assigned to the SWJ debug port. * full - Full SWJ (JTAG-DP + SW-DP). * no-njtrst - Full SWJ (JTAG-DP + SW-DP) but without NJTRST. Releases: PB4. * jtag-disable - JTAG-DP Disabled and SW-DP Enabled. Releases: PA15 PB3 PB4. * disable - JTAG-DP Disabled and SW-DP Disabled. Releases: PA13 PA14 PA15 PB3 PB4. If absent, then Full SWJ (JTAG-DP + SW-DP) is used (reset state). Default value: ``full`` Legal values: ``'full'``, ``'no-njtrst'``, ``'jtag-disable'``, ``'disable'`` .. 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,stm32f1-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. 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. Child node properties ===================== .. list-table:: :widths: 1 1 4 :header-rows: 1 * - Name - Type - Details * - ``pinmux`` - ``int`` - .. code-block:: none Adapted 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 << 6) | remap) 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 configuration mode, can be: * 0 : Alternate function output * 1 : Input * 2 : Analog * 3 : GPIO output In case selected pin function is GPIO output, pin is statically configured as a plain output GPIO, which configuration can be set by adding 'ouptut-low' or 'output-high' properties to the pinctrl configuration. Default is output-low. - remap: The pin remapping configuration. It allows to assign the pin function to a different peripheral. Remain configuration can be: * 0 : No remap * 1 : Partial remap 1 * 2 : Partial remap 2 * 3 : Partial remap 3 * 4 : Full remap To simplify the usage, macro is available to generate "pinmux" field. This macro is available here: -include/zephyr/dt-bindings/pinctrl/stm32f1-pinctrl.h Some examples of macro usage: GPIO A9 set as alternate with no remap ... { pinmux = ; }; GPIO A9 set as alternate with full remap ... { pinmux = ; }; GPIO A9 set as input ... { pinmux = ; }; GPIO A9 set as output-high ... { pinmux = ; output-high; }; This property is **required**. * - ``slew-rate`` - ``string`` - .. code-block:: none Pin output mode, maximum achievable speed. Only applies to output mode (alternate). Default value: ``max-speed-10mhz`` Legal values: ``'max-speed-10mhz'``, ``'max-speed-2mhz'``, ``'max-speed-50mhz'`` * - ``bias-disable`` - ``boolean`` - .. code-block:: none disable any pin bias * - ``bias-pull-up`` - ``boolean`` - .. code-block:: none enable pull-up resistor * - ``bias-pull-down`` - ``boolean`` - .. code-block:: none enable pull-down resistor * - ``drive-push-pull`` - ``boolean`` - .. code-block:: none drive actively high and low * - ``drive-open-drain`` - ``boolean`` - .. code-block:: none drive with open drain (hardware AND) * - ``output-low`` - ``boolean`` - .. code-block:: none set the pin to output mode with low level * - ``output-high`` - ``boolean`` - .. code-block:: none set the pin to output mode with high level