# Cortina Systems Gemini Ethernet Controller

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

> Device-tree binding reference for Cortina Systems Gemini Ethernet 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;net&#47;cortina&#44;gemini&#45;ethernet&#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;Linus Walleij &#60;linusw&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">This ethernet controller is found in the Gemini SoC family:
StorLink SL3512 and SL3516, also known as Cortina Systems
CS3512 and CS3516.</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;cortina&#44;gemini&#45;ethernet&#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>3</code></span>

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">must contain the global registers and the V-bit and A-bit memory areas, in total three register sets.</p>
</div>

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

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

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

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

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

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

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

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

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

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

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

<a id="dt-94b020f2fed0fa7cc90e"></a>

### <code>&#94;ethernet&#45;port&#64;&#91;0&#45;9&#93;&#43;&#36;</code> — name matches this regular expression

**Value type (<code>type</code>):** <span id="dt-177aac06772a1884d367"><code>&#34;object&#34;</code></span>

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

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

<code>false</code>

Not allowed by this rule.

<div id="dt-e33bed11c8424bec7074">
<p style="white-space: pre-wrap">contains the resources for ethernet port</p>
</div>

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

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

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

**Rule 1**

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-112a74dfa72376282e13">[<code>ethernet&#45;controller&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/ethernet-controller.md#dt-root>)</span>

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

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

<a id="dt-1064ba9a191d6a72506f"></a>

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

**Exact value (<code>const</code>):** <span id="dt-18fda800fd96aa67d8bd"><code>&#34;cortina&#44;gemini&#45;ethernet&#45;port&#34;</code></span>

<a id="dt-703451f64430caa5a6ed"></a>

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

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

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

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

**Item 1**

> <div id="dt-6b2014959ff8e91684fc">
> <p style="white-space: pre-wrap">DMA/TOE memory</p>
> </div>

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

**Item 2**

> <div id="dt-b478626df8036a923916">
> <p style="white-space: pre-wrap">GMAC memory area of the port</p>
> </div>

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

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

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

<div id="dt-29e315e467ce565d08be">
<p style="white-space: pre-wrap">should contain the interrupt line of the port. this is nominally a level interrupt active high.</p>
</div>

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

**<code>resets</code> — required here**

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

<div id="dt-c9503b0fa34c46468692">
<p style="white-space: pre-wrap">this must provide an SoC-integrated reset line for the port.</p>
</div>

<a id="dt-595ca8d09e46afb9294d"></a>

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

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

<div id="dt-215ed88a6dd254ab71cb">
<p style="white-space: pre-wrap">this should contain a handle to the PCLK clock for clocking the silicon in this port</p>
</div>

<a id="dt-536b76307b124d3a9eaa"></a>

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

**Exact value (<code>const</code>):** <span id="dt-6ce1ac1f410b15d2e23e"><code>&#34;PCLK&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-d5c5aa2960286ce56d06"></a> <span id="dt-e162943a8c60fbc0a484"><code>&#34;reg&#34;</code></span>, <span id="dt-8bd2f38051c22897e443"><code>&#34;compatible&#34;</code></span>, <span id="dt-37a09f578e94ea99f2db"><code>&#34;interrupts&#34;</code></span>, <span id="dt-dddd45e1b9cd37c0fa66"><code>&#34;resets&#34;</code></span>, <span id="dt-0933373d278f4cdcd087"><code>&#34;clocks&#34;</code></span>, <span id="dt-afdee8f199a93cee19a4"><code>&#34;clock&#45;names&#34;</code></span>

**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;ranges&#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">#include &lt;dt-bindings/interrupt-controller/irq.h&gt;
#include &lt;dt-bindings/clock/cortina,gemini-clock.h&gt;
#include &lt;dt-bindings/reset/cortina,gemini-reset.h&gt;
mdio0: mdio {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;
  phy0: ethernet-phy@1 {
    reg = &lt;1&gt;;
    device_type = "ethernet-phy";
  };
  phy1: ethernet-phy@3 {
    reg = &lt;3&gt;;
    device_type = "ethernet-phy";
  };
};

ethernet@60000000 {
    compatible = "cortina,gemini-ethernet";
    reg = &lt;0x60000000 0x4000&gt;, /* Global registers, queue */
          &lt;0x60004000 0x2000&gt;, /* V-bit */
          &lt;0x60006000 0x2000&gt;; /* A-bit */
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;
    ranges;

    gmac0: ethernet-port@0 {
            compatible = "cortina,gemini-ethernet-port";
            reg = &lt;0x60008000 0x2000&gt;, /* Port 0 DMA/TOE */
                  &lt;0x6000a000 0x2000&gt;; /* Port 0 GMAC */
            interrupt-parent = &lt;&amp;intcon&gt;;
            interrupts = &lt;1 IRQ_TYPE_LEVEL_HIGH&gt;;
            resets = &lt;&amp;syscon GEMINI_RESET_GMAC0&gt;;
            clocks = &lt;&amp;syscon GEMINI_CLK_GATE_GMAC0&gt;;
            clock-names = "PCLK";
            phy-mode = "rgmii";
            phy-handle = &lt;&amp;phy0&gt;;
    };

    gmac1: ethernet-port@1 {
            compatible = "cortina,gemini-ethernet-port";
            reg = &lt;0x6000c000 0x2000&gt;, /* Port 1 DMA/TOE */
                  &lt;0x6000e000 0x2000&gt;; /* Port 1 GMAC */
            interrupt-parent = &lt;&amp;intcon&gt;;
            interrupts = &lt;2 IRQ_TYPE_LEVEL_HIGH&gt;;
            resets = &lt;&amp;syscon GEMINI_RESET_GMAC1&gt;;
            clocks = &lt;&amp;syscon GEMINI_CLK_GATE_GMAC1&gt;;
            clock-names = "PCLK";
            phy-mode = "rgmii";
            phy-handle = &lt;&amp;phy1&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-only OR BSD-2-Clause)</span></p>

<p id="dt-comment-1"><strong>Line 34:</strong> <span> The subnodes represents the two ethernet ports in this device.</span></p>

<p id="dt-comment-2"><strong>Line 35:</strong> <span> They are not independent of each other since they share resources</span></p>

<p id="dt-comment-3"><strong>Line 36:</strong> <span> in the parent node, and are thus children.</span></p>

</details>
