# MediaTek PMIC Keys

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Input bindings_

> Device-tree binding reference for MediaTek PMIC Keys.

<!-- SPDX-License-Identifier: (GPL-2.0 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;input&#47;mediatek&#44;pmic&#45;keys&#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;Chen Zhong &#60;chen&#46;zhong&#64;mediatek&#46;com&#62;&#34;</code></span>

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

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

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

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>input&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-input/input.md#dt-root>)</span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">There are two key functions provided by MT6397, MT6323 and other MediaTek
PMICs: pwrkey and homekey.
The key functions are defined as the subnode of the function node provided
by the PMIC that is defined as a Multi-Function Device (MFD).</p>
<p style="white-space: pre-wrap">For MediaTek MT6323/MT6397 PMIC bindings see
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml</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;mediatek&#44;mt6323&#45;keys&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;mediatek&#44;mt6328&#45;keys&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;mediatek&#44;mt6331&#45;keys&#34;</code></span>, <span id="dt-76b67e65b51f033b1109"><code>&#34;mediatek&#44;mt6357&#45;keys&#34;</code></span>, <span id="dt-498d24c42855e222b0fd"><code>&#34;mediatek&#44;mt6358&#45;keys&#34;</code></span>, <span id="dt-216696827b315708886c"><code>&#34;mediatek&#44;mt6359&#45;keys&#34;</code></span>, <span id="dt-5708aa713f48e19e156f"><code>&#34;mediatek&#44;mt6397&#45;keys&#34;</code></span>

<a id="dt-08fd637085d4a981ccd8"></a>

### <code>power&#45;off&#45;time&#45;sec</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

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

### <code>mediatek&#44;long&#45;press&#45;mode</code> — not listed as required here

<div id="dt-72e9863ed90506898a4e">
<p style="white-space: pre-wrap">Key long-press force shutdown setting
0 - disabled
1 - pwrkey
2 - pwrkey+homekey</p>
</div>

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

**Default value (<code>default</code>):** <span id="dt-433b6de852e5f9c28f9f"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-93d2b3bfb4d41644a60d"><code>2</code></span>

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

## Properties matching a name pattern (<code>patternProperties</code>)

<a id="dt-50ab85d7fd72952d2b75"></a>

### <code>&#94;&#40;&#40;power&#124;home&#41;&#124;&#40;key&#45;&#91;a&#45;z0&#45;9&#45;&#93;&#43;&#124;&#91;a&#45;z0&#45;9&#45;&#93;&#43;&#45;key&#41;&#41;&#36;</code> — name matches this regular expression

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-40f2e09b688a7ddd3809">[<code>input&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-input/input.md#dt-root>)</span>

<a id="dt-722755e36bb2aa515301"></a>

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

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

**<code>interrupts</code> — not listed as required here**

**Minimum number of items (<code>minItems</code>):** <span id="dt-bd2cff837cdff5daf712"><code>1</code></span>

<a id="dt-77fd72d00e7c5ddb99f8"></a>

**Array item rules (<code>items</code>)**

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

**Item 1**

> <div id="dt-e592b24818de7c8cf38c">
> <p style="white-space: pre-wrap">Key press interrupt</p>
> </div>

<a id="dt-44df39659b9fa14994e1"></a>

**Item 2**

> <div id="dt-34c60accb68d63bcc1df">
> <p style="white-space: pre-wrap">Key release interrupt</p>
> </div>

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

**<code>interrupt&#45;names</code> — not listed as required here**

<code>true</code> — No constraints added by this property rule.

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

**<code>linux&#44;keycodes</code> — required here**

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

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

**<code>wakeup&#45;source</code> — not listed as required here**

<code>true</code> — No constraints added by this property rule.

**Required in this object (<code>required</code>):** <a id="dt-dece2ec123673bf041c1"></a> <span id="dt-cc55c4058be61a454e11"><code>&#34;linux&#44;keycodes&#34;</code></span>

<a id="dt-6d4bf3a206fae9ad7b13"></a>

#### Condition (<code>if</code>)

> <a id="dt-f3cb7140e885a3ec5236"></a>
>
> **Properties and child nodes (<code>properties</code>)**
>
> <a id="dt-f200d0bb545fae0f93ed"></a>
>
> **<code>interrupt&#45;names</code> — not listed as required here**
>
> <a id="dt-46bb878f34d937c04430"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Exact value (<code>const</code>):** <span id="dt-5b45f6c04516771704f2"><code>&#34;powerkey&#34;</code></span>

<a id="dt-6cb0c37255fa87bcec21"></a>

#### When the condition matches (<code>then</code>)

> <a id="dt-3847a57cc37aa7cfb204"></a>
>
> **Properties and child nodes (<code>properties</code>)**
>
> <a id="dt-9a6a972f1135261c7702"></a>
>
> **<code>interrupt&#45;names</code> — not listed as required here**
>
> **Minimum number of items (<code>minItems</code>):** <span id="dt-95488c0ec00b51d013a1"><code>1</code></span>
>
> <a id="dt-cccb02d8bdec3d5af1eb"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-b8538961fd391952c3c9"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-90cf47a612af24f3d2c6"><code>&#34;powerkey&#34;</code></span>
>
> <a id="dt-54d81d4f72f45aedce49"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-a58b8c9b12f79dd0209d"><code>&#34;powerkey&#95;r&#34;</code></span>

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

#### When the condition does not match (<code>else</code>)

> <a id="dt-e9b04b328989f92e2ad3"></a>
>
> **Properties and child nodes (<code>properties</code>)**
>
> <a id="dt-a071de91444b34098c37"></a>
>
> **<code>interrupt&#45;names</code> — not listed as required here**
>
> **Minimum number of items (<code>minItems</code>):** <span id="dt-248444849a1d66917ae3"><code>1</code></span>
>
> <a id="dt-4c6c082dd5edc1e31a1d"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-61ba8116562e26361d52"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-5fa31f0dca4b7b4ba6a8"><code>&#34;homekey&#34;</code></span>
>
> <a id="dt-73c18cc29659441a9fa2"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-4d01c43d5cbd4e324fcb"><code>&#34;homekey&#95;r&#34;</code></span>

<a id="dt-48973a7794b4617d9cfe"></a>

#### Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

## 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 OR BSD-2-Clause)</span></p>

</details>
