# Wakeup M3 IPC device

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Soc bindings / ti_

> Device-tree binding reference for Wakeup M3 IPC device.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;soc&#47;ti&#47;wkup&#45;m3&#45;ipc&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Dave Gerlach &#60;d&#45;gerlach&#64;ti&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Drew Fustini &#60;dfustini&#64;baylibre&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The TI AM33xx and AM43xx family of devices use a small Cortex M3 co-processor
(commonly referred to as Wakeup M3 or CM3) to help with various low power tasks
that cannot be controlled from the MPU, like suspend/resume and certain deep
C-states for CPU Idle. Once the wkup_m3_ipc driver uses the wkup_m3_rproc driver
to boot the wkup_m3, it handles communication with the CM3 using IPC registers
present in the SoC's control module and a mailbox. The wkup_m3_ipc exposes an
API to allow the SoC PM code to execute specific PM tasks.</p>
<p style="white-space: pre-wrap">Wkup M3 Device Node
====================
A wkup_m3_ipc device node is used to represent the IPC registers within an
SoC.</p>
<p style="white-space: pre-wrap">Support for VTT Toggle with GPIO pin
====================================
On some boards like the AM335x EVM-SK and the AM437x GP EVM, a GPIO pin is
connected to the enable pin on the DDR VTT regulator. This allows the
regulator to be disabled upon suspend and enabled upon resume. Please note
that the GPIO pin must be part of the GPIO0 module as only this GPIO module
is in the wakeup power domain.</p>
<p style="white-space: pre-wrap">Support for IO Isolation
========================
On AM437x SoCs, certain pins can be forced into an alternate state when IO
isolation is activated. Those pins have pad control registers prefixed by
'CTRL_CONF_' that contain DS0 (e.g. deep sleep) configuration bits that can
override the pin's existing bias (pull-up/pull-down) and value (high/low) when
IO isolation is active.</p>
<p style="white-space: pre-wrap">Support for I2C PMIC Voltage Scaling
====================================
It is possible to pass the name of a binary file to load into the CM3 memory.
The binary data is the I2C sequences for the CM3 to send out to the PMIC
during low power mode entry.</p>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;ti&#44;am3352&#45;wkup&#45;m3&#45;ipc&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;ti&#44;am4372&#45;wkup&#45;m3&#45;ipc&#34;</code></span>

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — required here

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">The IPC register address space to communicate with the Wakeup M3 processor</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

<a id="dt-c2de09e7f7fd211b679d"></a>

### <code>interrupts</code> — required here

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">wkup_m3 interrupt that signals the MPU</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-b7823fb65b2f27642d26"><code>1</code></span>

<a id="dt-29bcb6012e20ad16ed1c"></a>

### <code>ti&#44;rproc</code> — required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-7680bcbea71d03bfa99f">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;phandle</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-2533fa46618221e83225>)</span>

<div id="dt-6f1e14303c728abc055b">
<p style="white-space: pre-wrap">phandle to the wkup_m3 rproc node so the IPC driver can boot it</p>
</div>

<a id="dt-574e031ceefcc9ce5f61"></a>

### <code>mboxes</code> — required here

<div id="dt-35048c35d9f2ceeeab93">
<p style="white-space: pre-wrap">phandles used by IPC framework to get correct mbox channel for communication. Must point to appropriate mbox_wkupm3 child node.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-0d6020afe1bf116ee01c"><code>1</code></span>

<a id="dt-b913167a56819d67f1a5"></a>

### <code>firmware&#45;name</code> — not listed as required here

<div id="dt-0b76b2c415d449884d95">
<p style="white-space: pre-wrap">Name of binary file with I2C sequences for PMIC voltage scaling</p>
</div>

<a id="dt-ee150228ba0b66805a49"></a>

### <code>ti&#44;vtt&#45;gpio&#45;pin</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-691731578e78335d698c">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-f07ae5831fd1828f2221">
<p style="white-space: pre-wrap">GPIO pin connected to enable pin on VTT regulator</p>
</div>

<a id="dt-adc81e29b8c1ede52771"></a>

### <code>ti&#44;set&#45;io&#45;isolation</code> — not listed as required here

**Value type (<code>type</code>):** <span id="dt-275cadb879b9a959ca6c"><code>&#34;boolean&#34;</code></span>

<div id="dt-e7bfa3cd5a7b59ae7a76">
<p style="white-space: pre-wrap">If this property is present, then the wkup_m3_ipc driver will instruct the CM3 firmware to activate IO isolation when suspending to deep sleep. This can be leveraged by a board design to put other devices on the board into a low power state.</p>
</div>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

<a id="dt-d33de94ac1d3652cd22a"></a>

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-bf9d7a6c36fc19e6cd0a"></a>
> >
> > **This rule must not match (<code>not</code>)**
> >
> > > <a id="dt-451f8454a4f96d20fdd9"></a>
> > >
> > > **Rule for matching array elements (<code>contains</code>)**
> > >
> > > > **Exact value (<code>const</code>):** <span id="dt-7ffdfc271ed461353e09"><code>&#34;ti&#44;am4372&#45;wkup&#45;m3&#45;ipc&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-b212c2ef78c22fab2e20"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-042fc1fbaedb9e8a2624"></a>
> >
> > **<code>ti&#44;set&#45;io&#45;isolation</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;interrupts&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;ti&#44;rproc&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;mboxes&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">/* Example for AM335x SoC */
soc {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;

    am335x_mailbox: mailbox {
        #mbox-cells = &lt;1&gt;;
    };

    wkup_m3_ipc@1324 {
        compatible = "ti,am3352-wkup-m3-ipc";
        reg = &lt;0x1324 0x24&gt;;
        interrupts = &lt;78&gt;;
        ti,rproc = &lt;&amp;wkup_m3&gt;;
        mboxes = &lt;&amp;am335x_mailbox &amp;mbox_wkupm3&gt;;
        ti,vtt-gpio-pin = &lt;7&gt;;
        firmware-name = "am335x-evm-scale-data.bin";
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">/*
 * Example for AM473x SoC:
 * On the AM437x-GP-EVM board, gpio5_7 is wired to enable pin of the DDR VTT
 * regulator. The 'ddr_vtt_toggle_default' pinmux node configures gpio5_7
 * for pull-up during normal system operation. However, the DS0 (deep sleep)
 * state of the pin is configured for pull-down and thus the VTT regulator
 * will be disabled to save power when IO isolation is active. Note that
 * this method is an alternative to using the 'ti,vtt-gpio-pin' property.
 */
#include &lt;dt-bindings/pinctrl/am43xx.h&gt;
soc {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;

    am437x_mailbox: mailbox {
        #mbox-cells = &lt;1&gt;;
    };

    am43xx_pinmux {
        pinctrl-names = "default";
        pinctrl-0 = &lt;&amp;ddr3_vtt_toggle_default&gt;;

        ddr3_vtt_toggle_default: ddr_vtt_toggle_default {
            pinctrl-single,pins = &lt;
                0x25C (DS0_PULL_UP_DOWN_EN | PIN_OUTPUT_PULLUP | DS0_FORCE_OFF_MODE | MUX_MODE7)
            &gt;;
        };
    };

    wkup_m3_ipc@1324 {
        compatible = "ti,am4372-wkup-m3-ipc";
        reg = &lt;0x1324 0x24&gt;;
        interrupts = &lt;78&gt;;
        ti,rproc = &lt;&amp;wkup_m3&gt;;
        mboxes = &lt;&amp;am437x_mailbox &amp;mbox_wkupm3&gt;;
        ti,set-io-isolation;
        firmware-name = "am43x-evm-scale-data.bin";
    };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

<p id="dt-comment-1"><strong>Line 52:</strong> <span> for AM33xx SoCs</span></p>

<p id="dt-comment-2"><strong>Line 53:</strong> <span> for AM43xx SoCs</span></p>

</details>
