# Marvell Xenon SDHCI Controller

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

> Device-tree binding reference for Marvell Xenon SDHCI Controller.

<!-- 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;mmc&#47;marvell&#44;xenon&#45;sdhci&#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>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">This file documents differences between the core MMC properties described by
mmc-controller.yaml and the properties used by the Xenon implementation.</p>
<p style="white-space: pre-wrap">Multiple SDHCs might be put into a single Xenon IP, to save size and cost.
Each SDHC is independent and owns independent resources, such as register
sets, clock and PHY.</p>
<p style="white-space: pre-wrap">Each SDHC should have an independent device tree node.</p>
</div>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Ulf Hansson &#60;ulf&#46;hansson&#64;linaro&#46;org&#62;&#34;</code></span>

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

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

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

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

<a id="dt-39566f01414e34c67b85"></a>

#### Exactly one of these rules must match (<code>oneOf</code>)

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

**Rule 1**

> **Allowed values (<code>enum</code>):** <a id="dt-617e1a2040e2496013d4"></a> <span id="dt-c31075c43df89b2793e3"><code>&#34;marvell&#44;armada&#45;cp110&#45;sdhci&#34;</code></span>, <span id="dt-44b402f75e7bf3caf313"><code>&#34;marvell&#44;armada&#45;ap806&#45;sdhci&#34;</code></span>

<a id="dt-7482b6e745c4f056161a"></a>

**Rule 2**

> <a id="dt-4c3e118873fbaedb5de2"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-b02d8860067795c00ae4"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-aa1230b5a2b80f9fb387"></a> <span id="dt-49b534c9c8948cfc8034"><code>&#34;marvell&#44;armada&#45;ap807&#45;sdhci&#34;</code></span>, <span id="dt-93451931f534c9a92fb4"><code>&#34;marvell&#44;ac5&#45;sdhci&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;marvell&#44;armada&#45;ap806&#45;sdhci&#34;</code></span>

<a id="dt-39cb5b72c94e12bd53ea"></a>

**Rule 3**

> <a id="dt-e626d61e9d5d76cc48f9"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-6b46935eab08de6d1f0a"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-b4cf31a5f463012e1429"><code>&#34;marvell&#44;armada&#45;3700&#45;sdhci&#34;</code></span>
>
> <a id="dt-5ea82ea034747ba6da29"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-e9c55cb91230c7ee5a28"><code>&#34;marvell&#44;sdhci&#45;xenon&#34;</code></span>

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

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

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

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

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

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

**Item 1**

> <div id="dt-e773fec0b410a1422253">
> <p style="white-space: pre-wrap">Xenon IP registers</p>
> </div>

<a id="dt-302751dd79bfd514b9d7"></a>

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">Armada 3700 SoC PHY PAD Voltage Control register</p>
> </div>

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

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

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

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

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

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

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

<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;core&#34;</code></span>

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

**Item 2**

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

<a id="dt-4603ee192633e8dffc49"></a>

### <code>dma&#45;coherent</code> — not listed as required here

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

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

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

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

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

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

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

<a id="dt-79672027cbdb6c36561f"></a>

### <code>marvell&#44;pad&#45;type</code> — not listed as required here

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

**Allowed values (<code>enum</code>):** <a id="dt-2a058173c0017255f41a"></a> <span id="dt-9c3ede1a5dfd7eeaf2cf"><code>&#34;sd&#34;</code></span>, <span id="dt-fef82d93c2a4b64a12b0"><code>&#34;fixed&#45;1&#45;8v&#34;</code></span>

<div id="dt-e4d537d559c4fd9d6288">
<p style="white-space: pre-wrap">Type of Armada 3700 SoC PHY PAD Voltage Controller register. If "sd" is selected, SoC PHY PAD is set as 3.3V at the beginning and is switched to 1.8V when later in higher speed mode. If "fixed-1-8v" is selected, SoC PHY PAD is fixed 1.8V, such as for eMMC.</p>
</div>

<a id="dt-2d4e34cb597aac478730"></a>

### <code>marvell&#44;xenon&#45;sdhc&#45;id</code> — not listed as required here

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

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

**Maximum value (<code>maximum</code>):** <span id="dt-a46ac0e2051642db9065"><code>7</code></span>

<div id="dt-11c23dd49d6c525662f9">
<p style="white-space: pre-wrap">Indicate the corresponding bit index of current SDHC in SDHC System
Operation Control Register Bit[7:0].  Set/clear the corresponding bit to
enable/disable current SDHC.</p>
</div>

<a id="dt-6365ef8bf30dbf5f2d0a"></a>

### <code>marvell&#44;xenon&#45;phy&#45;type</code> — not listed as required here

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

**Allowed values (<code>enum</code>):** <a id="dt-9276f3903224ead9ac44"></a> <span id="dt-b0a60a3fefd22a542555"><code>&#34;emmc 5&#46;1 phy&#34;</code></span>, <span id="dt-fc7e1c318bcd4fa59d79"><code>&#34;emmc 5&#46;0 phy&#34;</code></span>

<div id="dt-2c05e3c367153d49c2e6">
<p style="white-space: pre-wrap">Xenon support multiple types of PHYs. To select eMMC 5.1 PHY, set:
marvell,xenon-phy-type = "emmc 5.1 phy" eMMC 5.1 PHY is the default
choice if this property is not provided.  To select eMMC 5.0 PHY, set:
marvell,xenon-phy-type = "emmc 5.0 phy"</p>
<p style="white-space: pre-wrap">All those types of PHYs can support eMMC, SD and SDIO. Please note that
this property only presents the type of PHY.  It doesn't stand for the
entire SDHC type or property.  For example, "emmc 5.1 phy" doesn't mean
that this Xenon SDHC only supports eMMC 5.1.</p>
</div>

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

### <code>marvell&#44;xenon&#45;phy&#45;znr</code> — not listed as required here

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

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

**Maximum value (<code>maximum</code>):** <span id="dt-73c8574fa807f558021f"><code>31</code></span>

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

<div id="dt-33992efad846be4158e1">
<p style="white-space: pre-wrap">Set PHY ZNR value.
Only available for eMMC PHY.</p>
</div>

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

### <code>marvell&#44;xenon&#45;phy&#45;zpr</code> — not listed as required here

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

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

**Maximum value (<code>maximum</code>):** <span id="dt-3e4c3749936c72faccca"><code>31</code></span>

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

<div id="dt-ed21e8948951ae6831fa">
<p style="white-space: pre-wrap">Set PHY ZPR value.
Only available for eMMC PHY.</p>
</div>

<a id="dt-7cdfa28ff753f79f3b59"></a>

### <code>marvell&#44;xenon&#45;phy&#45;nr&#45;success&#45;tun</code> — not listed as required here

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

**Minimum value (<code>minimum</code>):** <span id="dt-b066071587c3fe5ad221"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-bfc6609731aec887e7b7"><code>7</code></span>

**Default value (<code>default</code>):** <span id="dt-04f998082f22ba978318"><code>4</code></span>

<div id="dt-66f7541aaca60cf64a0c">
<p style="white-space: pre-wrap">Set the number of required consecutive successful sampling points
used to identify a valid sampling window, in tuning process.</p>
</div>

<a id="dt-0a20f38554f109fa0001"></a>

### <code>marvell&#44;xenon&#45;phy&#45;tun&#45;step&#45;divider</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-c01a1f50cb7ff69c75cb">[<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-a88926e767ffc2e42471"><code>64</code></span>

<div id="dt-91f5e3bdbf3ec912cb97">
<p style="white-space: pre-wrap">Set the divider for calculating TUN_STEP.</p>
</div>

<a id="dt-69017712b0c04bcdaf8b"></a>

### <code>marvell&#44;xenon&#45;phy&#45;slow&#45;mode</code> — not listed as required here

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

<div id="dt-09ba2771c1d3e10e64d1">
<p style="white-space: pre-wrap">If this property is selected, transfers will bypass PHY.
Only available when bus frequency lower than 55MHz in SDR mode.
Disabled by default. Please only try this property if timing issues
always occur with PHY enabled in eMMC HS SDR, SD SDR12, SD SDR25,
SD Default Speed and HS mode and eMMC legacy speed mode.</p>
</div>

<a id="dt-458b27e4b163085519a8"></a>

### <code>marvell&#44;xenon&#45;tun&#45;count</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-19fa58daa98aebfcd856">[<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-adf66964dbcbc5a3484d"><code>9</code></span>

<div id="dt-06fe21b99cdf70d95697">
<p style="white-space: pre-wrap">Xenon SDHC SoC usually doesn't provide re-tuning counter in
Capabilities Register 3 Bit[11:8].
This property provides the re-tuning counter.</p>
</div>

<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>sdhci&#45;common&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-mmc/sdhci-common.md#dt-root>)</span>

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> <a id="dt-ffbf5afb799d5f07b3e1"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-05d9c37a1275e72a170e"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-e9866824361c1aee7933"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-d1402748b5f4caf0b18a"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-9b74ad9882646c4a5116"><code>&#34;marvell&#44;armada&#45;3700&#45;sdhci&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-26d1c84fcc55a7d91dea"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-18ed1f4bd380878274d8"></a>
> >
> > **<code>reg</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-0bf955aace5399cedc74"><code>2</code></span>
> >
> > **Required in this object (<code>required</code>):** <a id="dt-ee96a18d4bb2a9d39bd9"></a> <span id="dt-96ee7f71687cd234a9f8"><code>&#34;marvell&#44;pad&#45;type&#34;</code></span>
>
> <a id="dt-56ef1e95d4edd6e6f24c"></a>
>
> #### When the condition does not match (<code>else</code>)
>
> > <a id="dt-f0255e6a88a00985d33b"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-d92e0020acecb84cba03"></a>
> >
> > **<code>reg</code> — not listed as required here**
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-4bcb124fb8b313412306"><code>1</code></span>
> >
> > <a id="dt-46e552ff7aaae8d40576"></a>
> >
> > **<code>marvell&#44;pad&#45;type</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;clocks&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clock&#45;names&#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.

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

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

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

mmc@aa0000 {
  compatible = "marvell,armada-ap807-sdhci", "marvell,armada-ap806-sdhci";
  reg = &lt;0xaa0000 0x1000&gt;;
  interrupts = &lt;GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH&gt;;
  clocks = &lt;&amp;emmc_clk 0&gt;, &lt;&amp;axi_clk 0&gt;;
  clock-names = "core", "axi";
  bus-width = &lt;4&gt;;
  marvell,xenon-phy-slow-mode;
  marvell,xenon-tun-count = &lt;11&gt;;
  non-removable;
  no-sd;
  no-sdio;

  /* Vmmc and Vqmmc are both fixed */
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">// For SD/SDIO
#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
#include &lt;dt-bindings/interrupt-controller/irq.h&gt;

mmc@ab0000 {
  compatible = "marvell,armada-cp110-sdhci";
  reg = &lt;0xab0000 0x1000&gt;;
  interrupts = &lt;GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH&gt;;
  vqmmc-supply = &lt;&amp;sd_vqmmc_regulator&gt;;
  vmmc-supply = &lt;&amp;sd_vmmc_regulator&gt;;
  clocks = &lt;&amp;sdclk 0&gt;, &lt;&amp;axi_clk 0&gt;;
  clock-names = "core", "axi";
  bus-width = &lt;4&gt;;
  marvell,xenon-tun-count = &lt;9&gt;;
};
</code></pre>

<pre id="dt-d0212a4cd671f89a0b40"><code class="language-dts">// For eMMC with compatible "marvell,armada-3700-sdhci":
#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
#include &lt;dt-bindings/interrupt-controller/irq.h&gt;

mmc@aa0000 {
  compatible = "marvell,armada-3700-sdhci", "marvell,sdhci-xenon";
  reg = &lt;0xaa0000 0x1000&gt;,
        &lt;0x17808 0x4&gt;;
  interrupts = &lt;GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH&gt;;
  clocks = &lt;&amp;emmcclk 0&gt;;
  clock-names = "core";
  bus-width = &lt;8&gt;;
  mmc-ddr-1_8v;
  mmc-hs400-1_8v;
  non-removable;
  no-sd;
  no-sdio;

  /* Vmmc and Vqmmc are both fixed */

  marvell,pad-type = "fixed-1-8v";
};
</code></pre>

<pre id="dt-cf8a683b5a963eb1c566"><code class="language-dts">// For SD/SDIO with compatible "marvell,armada-3700-sdhci":
#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
#include &lt;dt-bindings/interrupt-controller/irq.h&gt;

mmc@ab0000 {
  compatible = "marvell,armada-3700-sdhci", "marvell,sdhci-xenon";
  reg = &lt;0xab0000 0x1000&gt;,
        &lt;0x17808 0x4&gt;;
  interrupts = &lt;GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH&gt;;
  vqmmc-supply = &lt;&amp;sd_regulator&gt;;
  /* Vmmc is fixed */
  clocks = &lt;&amp;sdclk 0&gt;;
  clock-names = "core";
  bus-width = &lt;4&gt;;

  marvell,pad-type = "sd";
};
</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>

</details>
