# Baikal-T1 PVT Sensor

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

> Device-tree binding reference for Baikal-T1 PVT Sensor.

<!-- 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;hwmon&#47;baikal&#44;bt1&#45;pvt&#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;Serge Semin &#60;fancer&#46;lancer&#64;gmail&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Baikal-T1 SoC provides an embedded process, voltage and temperature
sensor to monitor an internal SoC environment (chip temperature, supply
voltage and process monitor) and on time detect critical situations,
which may cause the system instability and even damages. The IP-block
is based on the Analog Bits PVT sensor, but is equipped with a dedicated
control wrapper, which provides a MMIO registers-based access to the
sensor core functionality (APB3-bus based) and exposes an additional
functions like thresholds/data ready interrupts, its status and masks,
measurements timeout. Its internal structure is depicted on the next
diagram:</p>
<pre><code>   Analog Bits core                     Bakal-T1 PVT control block
+--------------------+                  +------------------------+
| Temperature sensor |-+         +------| Sensors control        |
|--------------------| |&lt;---En---|      |------------------------|
| Voltage sensor     |-|&lt;--Mode--| +---&gt;| Sampled data           |
|--------------------| |&lt;--Trim--+ |    |------------------------|
| Low-Vt sensor      |-|           | +--| Thresholds comparator  |
|--------------------| |---Data----| |  |------------------------|
| High-Vt sensor     |-|           | +-&gt;| Interrupts status      |
|--------------------| |--Valid--+-+ |  |------------------------|
| Standard-Vt sensor |-+         +---+--| Interrupts mask        |
+--------------------+                  |------------------------|
         ^                              | Interrupts timeout     |
         |                              +------------------------+
         |                                        ^  ^
Rclk-----+----------------------------------------+  |
APB3-------------------------------------------------+</code></pre>
<p style="white-space: pre-wrap">This bindings describes the external Baikal-T1 PVT control interfaces
like MMIO registers space, interrupt request number and clocks source.
These are then used by the corresponding hwmon device driver to
implement the sysfs files-based access to the sensors functionality.</p>
</div>

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

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

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

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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;baikal&#44;bt1&#45;pvt&#34;</code></span>

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

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

**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

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

<a id="dt-4e9a371963ac013ad39d"></a>

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

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

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

<a id="dt-41adf3ed8101eca13466"></a>

**Item 1**

> <div id="dt-4cfd4c1642ba13c357d6">
> <p style="white-space: pre-wrap">PVT reference clock</p>
> </div>

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

**Item 2**

> <div id="dt-6b79aebfd2287d4aeab8">
> <p style="white-space: pre-wrap">APB3 interface clock</p>
> </div>

<a id="dt-041d7cd76b652a5de06a"></a>

### <code>clock&#45;names</code> — required here

<a id="dt-3d1de59bdfddccf00eed"></a>

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-3403d68873725c15739a"><code>&#34;ref&#34;</code></span>

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

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-0298e5f353a64a09a8a6"><code>&#34;pclk&#34;</code></span>

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

### <code>&#35;thermal&#45;sensor&#45;cells</code> — not listed as required here

<div id="dt-0ef0091c52eb523e7d0b">
<p style="white-space: pre-wrap">Baikal-T1 can be referenced as the CPU thermal-sensor</p>
</div>

**Exact value (<code>const</code>):** <span id="dt-864271cb6a9393891ea2"><code>0</code></span>

<a id="dt-23005972fb8e97a22ead"></a>

### <code>baikal&#44;pvt&#45;temp&#45;offset&#45;millicelsius</code> — not listed as required here

<div id="dt-c18b1e4f88e06b002964">
<p style="white-space: pre-wrap">Temperature sensor trimming factor. It can be used to manually adjust the
temperature measurements within 7.130 degrees Celsius.</p>
</div>

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

**Minimum value (<code>minimum</code>):** <span id="dt-5fbcbfe0bce8bd612c1c"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-bbbd7ac122324f6c6853"><code>7130</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.

**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;clocks&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;clock&#45;names&#34;</code></span>

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/interrupt-controller/mips-gic.h&gt;

pvt@1f200000 {
  compatible = "baikal,bt1-pvt";
  reg = &lt;0x1f200000 0x1000&gt;;
  #thermal-sensor-cells = &lt;0&gt;;

  interrupts = &lt;GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH&gt;;

  baikal,pvt-temp-offset-millicelsius = &lt;1000&gt;;

  clocks = &lt;&amp;ccu_sys&gt;, &lt;&amp;ccu_sys&gt;;
  clock-names = "ref", "pclk";
};
</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 2:</strong> <span> Copyright (C) 2020 BAIKAL ELECTRONICS, JSC</span></p>

</details>
