:orphan: .. raw:: html .. dtcompatible:: infineon,xmc4xxx-pinctrl .. _dtbinding_infineon_xmc4xxx_pinctrl: infineon,xmc4xxx-pinctrl ######################## Vendor: :ref:`Infineon Technologies ` Description *********** .. code-block:: none The Infineon XMC4XXX pin controller is responsible for connecting peripheral outputs to specific port/pins (also known as alternate functions) and configures pin properties. The pinctrl settings are referenced in a device tree peripheral node. For example in a UART node: &usic1ch1 { compatible = "infineon,xmc4xxx-uart"; pinctrl-0 = <&uart_tx_p0_1_u1c1 &uart_rx_p0_0_u1c1>; pinctrl-names = "default"; input-src = "DX0D"; ... }; pinctrl-0 is the phandle that stores the pin settings for two pins: &uart_tx_p0_1_u1c1 and &uart_rx_p0_0_u1c1. These nodes are pre-defined and their naming convention is designed to help the user select the correct pin settings. Note the use of peripheral type, pin direction, port/pin number and USIC in the name. The pre-defined nodes only set the alternate function of the output pin. The configuration for the pin (i.e. drive strength) should be set in the board setup. The set of possible configurations are defined in the properties section below (in addition to the inherited property-allowlist list from pincfg-node.yaml). To create a new pin configuration, the user may append to the &pinctrl node, for example #include &pinctrl { my_node_config: my_node_config { pinmux = ; drive-push-pull; ... other supported pin configurations .. }; where XMC4XXX_PINMUX_SET(PORT, PIN, ALTERNATE_FUNCTION) is a helper macro for setting the alternate function for a given port/pin. Setting ALTERNATE_FUNCTION = 0 means that no alternate function is selected. The pinctrl driver only sets the alternate function for output pins. The input mux is handled by the peripheral drivers. For example the &usic1ch1 node has input-src property for this purpose. There are no pre-defined nodes for the input mux and this must be properly set by the user. Refer to the peripheral .yaml file (i.e. infineon,xmc4xxx-uart.yaml) and XMC4XXX documentation. Properties ********** Top level properties ==================== These property descriptions apply to "infineon,xmc4xxx-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 "infineon,xmc4xxx-pinctrl" compatible. .. list-table:: :widths: 1 1 4 :header-rows: 1 * - Name - Type - Details * - ``#address-cells`` - ``int`` - .. code-block:: none number of address cells in reg property This property is **required**. Constant value: ``1`` * - ``#size-cells`` - ``int`` - .. code-block:: none number of size cells in reg property This property is **required**. Constant value: ``1`` * - ``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 * - ``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 Encodes port/pin and alternate function. See helper macro XMC4XX_PINMUX_SET(). Alternate function is only set for output pins; It selects ALT1-ALT4 output line in the GPIO element. The alternate function for input pins is handled separately by the peripheral. It is upto the peripheral to configure which input pin to use (For example see parameter input-src in infineon,xmc4xxx-uart.yaml). This property is **required**. * - ``drive-strength`` - ``string`` - .. code-block:: none Drive strength of the output pin. Following options as in XMC_GPIO_OUTPUT_STRENGTH See xmc4_gpio.h. This only has an effect if the pin is in drive-push-pull mode. This property is **required**. Legal values: ``'strong-sharp-edge'``, ``'strong-medium-edge'``, ``'strong-soft-edge'``, ``'strong-slow-edge'``, ``'medium'``, ``'medium-unknown1-edge'``, ``'medium-unknown2-edge'``, ``'weak'`` * - ``invert-input`` - ``boolean`` - .. code-block:: none Inverts the input. * - ``hwctrl`` - ``string`` - .. code-block:: none Pre-assigns hardware control of the pin to a certain peripheral. This property is **required**. Legal values: ``'disabled'``, ``'periph1'``, ``'periph2'`` * - ``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