:orphan:
.. raw:: html
.. dtcompatible:: adi,max32-pinctrl
.. _dtbinding_adi_max32_pinctrl:
adi,max32-pinctrl
#################
Vendor: :ref:`Analog Devices, Inc. `
Description
***********
.. code-block:: none
MAX32 Pin controller Node
Based on pincfg-node.yaml binding.
Note: `bias-disable` are default pin configurations.
Properties
**********
Top level properties
====================
These property descriptions apply to "adi,max32-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 "adi,max32-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:`zephyr: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:`zephyr:dt-important-props` for more information.
* - ``compatible``
- ``string-array``
- .. code-block:: none
compatible strings
This property is **required**.
See :ref:`zephyr: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:`zephyr: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:`zephyr: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
* - ``power-domains``
- ``phandle-array``
- .. code-block:: none
Power domain specifiers
* - ``power-domain-names``
- ``string-array``
- .. code-block:: none
Provided names of power domain specifiers
* - ``#power-domain-cells``
- ``int``
- .. code-block:: none
Number of cells in power-domains property
* - ``zephyr,deferred-init``
- ``boolean``
- .. code-block:: none
Do not initialize device automatically on boot. Device should be manually
initialized using device_init().
* - ``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.
* - ``zephyr,pm-device-runtime-auto``
- ``boolean``
- .. code-block:: none
Automatically configure the device for runtime power management after the
init function runs.
* - ``zephyr,disabling-power-states``
- ``phandles``
- .. code-block:: none
List of power states that will disable this device power.
Child node properties
=====================
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``pinmux``
- ``int``
- .. code-block:: none
Integer array, represents gpio pin number and mux setting.
These defines are calculated as: (pin<<8 | port<<4 | function<<0)
With:
- port: The gpio port index (0, 1, ...)
- pin: The pin offset within the port (0, 1, 2, ...)
- function: The function number, can be:
* 0 : GPIO
* 1 : Alternate Function 1
* 2 : Alternate Function 2
* 3 : Alternate Function 3
* 4 : Alternate Function 4
In case selected pin function is GPIO, pin is statically configured as
a plain input/output GPIO. Default configuration is input. Output value
can be configured by adding 'ouptut-low' or 'output-high' properties
to the pin configuration.
To simplify the usage, macro is available to generate "pinmux" field.
This macro is available here:
-include/zephyr/dt-bindings/pinctrl/max32-pinctrl.h
Some examples of macro usage:
P0.9 set as alernate function 1
{
pinmux = ;
};
P0.9 set as alernate function 2
{
pinmux = ;
};
P0.9 set as GPIO output high
{
pinmux = ;
output-high;
};
This property is **required**.
* - ``power-source``
- ``int``
- .. code-block:: none
GPIO Supply Voltage Select, Selects the voltage rail used for the pin.
0 or MAX32_VSEL_VDDIO
1 or MAX32_VSEL_VDDIOH
Legal values: ``0``, ``1``
* - ``drive-strength``
- ``int``
- .. code-block:: none
There are 4 drive strength mode.
Mode 0: 1mA
Mode 1: 2mA
Mode 2: 4mA
Mode 3: 8mA
Default GPIO output drive strength is mode 0 for MAX32 MCUs.
For more information please take a look device user guide, datasheet.
Legal values: ``0``, ``1``, ``2``, ``3``
* - ``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
* - ``input-enable``
- ``boolean``
- .. code-block:: none
enable input on pin (e.g. enable an input buffer, no effect on output)
* - ``output-enable``
- ``boolean``
- .. code-block:: none
enable output on a pin without actively driving it (e.g. enable an output
buffer)
* - ``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