# Rockchip RK3399 Clock and Reset Unit

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

> Device-tree binding reference for Rockchip RK3399 Clock and Reset Unit.

<!-- SPDX-License-Identifier: (GPL-2.0+ OR MIT) -->


<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;clock&#47;rockchip&#44;rk3399&#45;cru&#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;Elaine Zhang &#60;zhangqing&#64;rock&#45;chips&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Heiko Stuebner &#60;heiko&#64;sntech&#46;de&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<pre><code>The RK3399 clock controller generates and supplies clock to various
controllers within the SoC and also implements a reset controller for SoC
peripherals.
Each clock is assigned an identifier and client nodes can use this identifier
to specify the clock which they consume. All available clocks are defined as
preprocessor macros in the dt-bindings/clock/rk3399-cru.h headers and can be
used in device tree sources. Similar macros exist for the reset sources in
these files.
There are several clocks that are generated outside the SoC. It is expected
that they are defined using standard clock bindings with following
clock-output-names:
  - "xin24m"           - crystal input                          - required,
  - "xin32k"           - rtc clock                              - optional,
  - "clkin_gmac"       - external GMAC clock                    - optional,
  - "clkin_i2s"        - external I2S clock                     - optional,
  - "pclkin_cif"       - external ISP clock                     - optional,
  - "clk_usbphy0_480m" - output clock of the pll in the usbphy0
  - "clk_usbphy1_480m" - output clock of the pll in the usbphy1</code></pre>
</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;rockchip&#44;rk3399&#45;pmucru&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;rockchip&#44;rk3399&#45;cru&#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-7471877b51a93881192b"></a>

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

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

<a id="dt-02c38475362b738e226b"></a>

### <code>&#35;reset&#45;cells</code> — required here

**Exact value (<code>const</code>):** <span id="dt-374f156ee5b81c392b56"><code>1</code></span>

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

### <code>clocks</code> — not listed as required here

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

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

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

**Exact value (<code>const</code>):** <span id="dt-882f4571b4b135d59582"><code>&#34;xin24m&#34;</code></span>

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

### <code>rockchip&#44;grf</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-27c3eab1df2a1e51a08e">[<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-85bb741738dc0c8676e5">
<p style="white-space: pre-wrap">Phandle to the syscon managing the "general register files". It is used for GRF muxes, if missing any muxes present in the GRF will not be available.</p>
</div>

**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;&#35;clock&#45;cells&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;reset&#45;cells&#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">pmucru: clock-controller@ff750000 {
  compatible = "rockchip,rk3399-pmucru";
  reg = &lt;0xff750000 0x1000&gt;;
  #clock-cells = &lt;1&gt;;
  #reset-cells = &lt;1&gt;;
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">cru: clock-controller@ff760000 {
  compatible = "rockchip,rk3399-cru";
  reg = &lt;0xff760000 0x1000&gt;;
  #clock-cells = &lt;1&gt;;
  #reset-cells = &lt;1&gt;;
};
</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+ OR MIT)</span></p>

</details>
