# NXP FMan MAC

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

> Device-tree binding reference for NXP FMan MAC.

<!-- 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;fsl&#44;fman&#45;dtsec&#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;Madalin Bucur &#60;madalin&#46;bucur&#64;nxp&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Each FMan has several MACs, each implementing an Ethernet interface. Earlier
versions of FMan used the Datapath Three Speed Ethernet Controller (dTSEC) for
10/100/1000 MBit/s speeds, and the 10-Gigabit Ethernet Media Access Controller
(10GEC) for 10 Gbit/s speeds. Later versions of FMan use the Multirate
Ethernet Media Access Controller (mEMAC) to handle all speeds.</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;fsl&#44;fman&#45;dtsec&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;fsl&#44;fman&#45;xgec&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;fsl&#44;fman&#45;memac&#34;</code></span>

<a id="dt-19cbc5b7e5dabb16c580"></a>

### <code>cell&#45;index</code> — required here

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

<div id="dt-8d4ab3d90cbbdd65cb67">
<pre><code>FManV2:
register[bit]           MAC             cell-index
============================================================
FM_EPI[16]              XGEC            8
FM_EPI[16+n]            dTSECn          n-1
FM_NPI[11+n]            dTSECn          n-1
        n = 1,..,5</code></pre>
<p style="white-space: pre-wrap">FManV3:
register[bit]           MAC             cell-index
============================================================
FM_EPI[16+n]            mEMACn          n-1
FM_EPI[25]              mEMAC10         9</p>
<pre><code>FM_NPI[11+n]            mEMACn          n-1
FM_NPI[10]              mEMAC10         9
FM_NPI[11]              mEMAC9          8
        n = 1,..8</code></pre>
<p style="white-space: pre-wrap">FM_EPI and FM_NPI are located in the FMan memory map.</p>
<p style="white-space: pre-wrap">2. SoC registers:</p>
<pre><code>- P2041, P3041, P4080 P5020, P5040:
register[bit]           FMan            MAC             cell
                        Unit                            index
============================================================
DCFG_DEVDISR2[7]        1               XGEC            8
DCFG_DEVDISR2[7+n]      1               dTSECn          n-1
DCFG_DEVDISR2[15]       2               XGEC            8
DCFG_DEVDISR2[15+n]     2               dTSECn          n-1
        n = 1,..5</code></pre>
<pre><code>- T1040, T2080, T4240, B4860:
register[bit]                   FMan    MAC             cell
                                Unit                    index
============================================================
DCFG_CCSR_DEVDISR2[n-1]         1       mEMACn          n-1
DCFG_CCSR_DEVDISR2[11+n]        2       mEMACn          n-1
        n = 1,..6,9,10</code></pre>
<p style="white-space: pre-wrap">EVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in
the specific SoC "Device Configuration/Pin Control" Memory
Map.</p>
</div>

<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-d1eb7d23456e6add0146"></a>

### <code>fsl&#44;fman&#45;ports</code> — required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-c7b86c5080e607e5cd69">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;phandle&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-8f5710c4314b4caa4970>)</span>

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

<div id="dt-278b0b9260a865445f91">
<p style="white-space: pre-wrap">An array of two references: the first is the FMan RX port and the second
is the TX port used by this MAC.</p>
</div>

<a id="dt-398f0f80d64ad8c16804"></a>

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

<div id="dt-2a2eb9c495a9078b1d18">
<p style="white-space: pre-wrap">A reference to the SerDes lane(s)</p>
</div>

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

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

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

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

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

<a id="dt-49488a98c3eb6dae2c46"></a>

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-29213234bf7b0928b3dc"><code>&#34;serdes&#34;</code></span>

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

### <code>pcsphy&#45;handle</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-a4e1093b393c515cda40">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;phandle&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-8f5710c4314b4caa4970>)</span>

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-4c7883f7462a7838d5e1"><code>3</code></span>

**Deprecated (<code>deprecated</code>):** <span id="dt-455cc1103f56c6872109"><code>true</code></span>

<div id="dt-687cb76ba5cd605e1df4">
<p style="white-space: pre-wrap">See pcs-handle.</p>
</div>

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

### <code>pcs&#45;handle</code> — not listed as required here

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-4dbf0d28bcf5fdffbffd"><code>3</code></span>

<div id="dt-ec03ac997014e57c7b04">
<p style="white-space: pre-wrap">A reference to the various PCSs (typically found on the SerDes). If
pcs-handle-names is absent, and phy-connection-type is "xgmii", then the first
reference will be assumed to be for "xfi". Otherwise, if pcs-handle-names is
absent, then the first reference will be assumed to be for "sgmii".</p>
</div>

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

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

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-6af455fb913861f609f7"><code>3</code></span>

<a id="dt-52fe024404bd4037f7b5"></a>

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

> **Allowed values (<code>enum</code>):** <a id="dt-5657c268ec771c49b6e3"></a> <span id="dt-8b5c75405f22fe531233"><code>&#34;sgmii&#34;</code></span>, <span id="dt-0d8e75009ef71bc7b7f1"><code>&#34;qsgmii&#34;</code></span>, <span id="dt-c9e695a27ebe90c579d1"><code>&#34;xfi&#34;</code></span>

<div id="dt-1efa5d68428b50ed8d6f">
<p style="white-space: pre-wrap">The type of each PCS in pcsphy-handle.</p>
</div>

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

### <code>tbi&#45;handle</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-1cf2285bb2a58645ac3d">[<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-800a1cac74187885d0d9">
<p style="white-space: pre-wrap">A reference to the (TBI-based) PCS</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;cell&#45;index&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;reg&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;fsl&#44;fman&#45;ports&#34;</code></span>

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

## Property dependencies (<code>dependencies</code>)

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

### <code>pcs&#45;handle&#45;names</code> — applies when this property is present

Also requires: <span id="dt-31a47fdf7afa6752ccde"><code>&#34;pcs&#45;handle&#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>ethernet&#45;controller&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/ethernet-controller.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;fsl&#44;fman&#45;dtsec&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-ee96a18d4bb2a9d39bd9"></a> <span id="dt-96ee7f71687cd234a9f8"><code>&#34;tbi&#45;handle&#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">ethernet@e0000 {
        compatible = "fsl,fman-dtsec";
        cell-index = &lt;0&gt;;
        reg = &lt;0xe0000 0x1000&gt;;
        fsl,fman-ports = &lt;&amp;fman1_rx8 &amp;fman1_tx28&gt;;
        ptp-timer = &lt;&amp;ptp_timer&gt;;
        tbi-handle = &lt;&amp;tbi0&gt;;
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">ethernet@e8000 {
        cell-index = &lt;4&gt;;
        compatible = "fsl,fman-memac";
        reg = &lt;0xe8000 0x1000&gt;;
        fsl,fman-ports = &lt;&amp;fman0_rx_0x0c &amp;fman0_tx_0x2c&gt;;
        ptp-timer = &lt;&amp;ptp_timer0&gt;;
        pcs-handle = &lt;&amp;pcsphy4&gt;, &lt;&amp;qsgmiib_pcs1&gt;;
        pcs-handle-names = "sgmii", "qsgmii";
        phys = &lt;&amp;serdes1 1&gt;;
        phy-names = "serdes";
};
</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>
