# CPSW Port's Interface Mode Selection PHY

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

> Device-tree binding reference for CPSW Port's Interface Mode Selection PHY.

<!-- 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;phy&#47;ti&#44;phy&#45;gmii&#45;sel&#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;Kishon Vijay Abraham I &#60;kishon&#64;ti&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<pre><code>TI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports
two 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces.
The interface mode is selected by configuring the MII mode selection register(s)
(GMII_SEL) in the System Control Module chapter (SCM). GMII_SEL register(s) and
bit fields placement in SCM are different between SoCs while fields meaning
is the same.
                                             +--------------+
      +-------------------------------+      |SCM           |
      |                     CPSW      |      |  +---------+ |
      |        +--------------------------------+gmii_sel | |
      |        |                      |      |  +---------+ |
      |   +----v---+     +--------+   |      +--------------+
      |   |Port 1..&lt;--+--&gt;GMII/MII&lt;-------&gt;
      |   |        |  |  |        |   |
      |   +--------+  |  +--------+   |
      |               |               |
      |               |  +--------+   |
      |               |  | RMII   &lt;-------&gt;
      |               +--&gt;        |   |
      |               |  +--------+   |
      |               |               |
      |               |  +--------+   |
      |               |  | RGMII  &lt;-------&gt;
      |               +--&gt;        |   |
      |                  +--------+   |
      +-------------------------------+</code></pre>
<p style="white-space: pre-wrap">CPSW Port's Interface Mode Selection PHY describes MII interface mode between
CPSW Port and Ethernet PHY which depends on Eth PHY and board configuration.
|
CPSW Port's Interface Mode Selection PHY device should defined as child device
of SCM node (scm_conf) and can be attached to each CPSW port node using standard
PHY bindings.</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;ti&#44;am3352&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;ti&#44;dra7xx&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;ti&#44;am43xx&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-76b67e65b51f033b1109"><code>&#34;ti&#44;dm814&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-498d24c42855e222b0fd"><code>&#34;ti&#44;am654&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-216696827b315708886c"><code>&#34;ti&#44;j7200&#45;cpsw5g&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-5708aa713f48e19e156f"><code>&#34;ti&#44;j721e&#45;cpsw9g&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-3edbd20dc5b59e47edf5"><code>&#34;ti&#44;j784s4&#45;cpsw9g&#45;phy&#45;gmii&#45;sel&#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-9e9fb083c3bbc6075c67"></a>

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

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

<a id="dt-8817595f2d674f992d6c"></a>

### <code>ti&#44;qsgmii&#45;main&#45;ports</code> — not listed as required here

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

<div id="dt-a29a95e5aa1c044000f2">
<p style="white-space: pre-wrap">Required only for QSGMII mode. Array to select the port/s for QSGMII
main mode. The size of the array corresponds to the number of QSGMII
interfaces and thus, the number of distinct QSGMII main ports,
supported by the device. If the device supports two QSGMII interfaces
but only one QSGMII interface is desired, repeat the QSGMII main port
value corresponding to the QSGMII interface in the array.</p>
</div>

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

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

<a id="dt-292268a89975cb09d965"></a>

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

> **Minimum value (<code>minimum</code>):** <span id="dt-d7a4379c08883fab4a08"><code>1</code></span>
>
> **Maximum value (<code>maximum</code>):** <span id="dt-57395e5d31fbcdb4bfd5"><code>8</code></span>

<a id="dt-935ee547587f3e75de61"></a>

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

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

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-ebe43a424f4497a78746"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-b5c9dbe70762f9ad7bb5"></a> <span id="dt-d017b1b1b5a0bb01c549"><code>&#34;ti&#44;dra7xx&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-b1891799a94ae03bda89"><code>&#34;ti&#44;dm814&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-f7ddd2674cdadacec733"><code>&#34;ti&#44;am654&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-1afa9c359b113daf77e4"><code>&#34;ti&#44;j7200&#45;cpsw5g&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-f4184526859cd3d4f83a"><code>&#34;ti&#44;j721e&#45;cpsw9g&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-5781a391973aa6c79186"><code>&#34;ti&#44;j784s4&#45;cpsw9g&#45;phy&#45;gmii&#45;sel&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-b212c2ef78c22fab2e20"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-4593d49734191725dce8"></a>
> >
> > **<code>&#35;phy&#45;cells</code> — not listed as required here**
> >
> > **Exact value (<code>const</code>):** <span id="dt-85b675e56e73f75363d6"><code>1</code></span>
> >
> > <div id="dt-7d574e372975ea5c98c7">
> > <p style="white-space: pre-wrap">CPSW port number (starting from 1)</p>
> > </div>

<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>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-61039da0155527cc02ba"></a> <span id="dt-20f8a813aab744ff239a"><code>&#34;ti&#44;j7200&#45;cpsw5g&#45;phy&#45;gmii&#45;sel&#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-dc75d52ec690ddb3efe2"></a>
> >
> > **<code>ti&#44;qsgmii&#45;main&#45;ports</code> — not listed as required here**
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-4b7433eba1d70251210f"><code>1</code></span>
> >
> > <a id="dt-1824bcc716c1bf6131c6"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > > **Minimum value (<code>minimum</code>):** <span id="dt-e4ab86ffb65f5d2ff6e6"><code>1</code></span>
> > >
> > > **Maximum value (<code>maximum</code>):** <span id="dt-4ce16e3dc5b95dc8f546"><code>4</code></span>

<a id="dt-317510ea5c8bf789ca60"></a>

### Rule 3

> <a id="dt-15ef78abba37234c7e3a"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-81c13bb46c56768b42c8"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-676f6e45d3a322ea7096"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-c8f14712d9ed2dde9441"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-7838023cb1ac8ba1fc13"></a> <span id="dt-2698b34438b1aced3e06"><code>&#34;ti&#44;j721e&#45;cpsw9g&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-dde728fd212bd16cfbc3"><code>&#34;ti&#44;j784s4&#45;cpsw9g&#45;phy&#45;gmii&#45;sel&#34;</code></span>
>
> <a id="dt-86c371e5831ff1f84ce5"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-4b2e0558620eefde94e1"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-be896a14f57dda1db7a3"></a>
> >
> > **<code>ti&#44;qsgmii&#45;main&#45;ports</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-a8a515dbb2e14d78567b"><code>2</code></span>
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-0070f3ea55d63a695641"><code>2</code></span>
> >
> > <a id="dt-623303c1e755e86d5cf5"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > > **Minimum value (<code>minimum</code>):** <span id="dt-9de225e857e836b02d5c"><code>1</code></span>
> > >
> > > **Maximum value (<code>maximum</code>):** <span id="dt-90a94a856de1e11725db"><code>8</code></span>

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

### Rule 4

> <a id="dt-5d622c5a2672c1e49b35"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-ab3c9681fafbc97f4647"></a>
> >
> > **This rule must not match (<code>not</code>)**
> >
> > > <a id="dt-de54006384b37d597b9e"></a>
> > >
> > > **Properties and child nodes (<code>properties</code>)**
> > >
> > > <a id="dt-296002be268140b67615"></a>
> > >
> > > **<code>compatible</code> — not listed as required here**
> > >
> > > <a id="dt-1324735c82a7f4eed531"></a>
> > >
> > > **Rule for matching array elements (<code>contains</code>)**
> > >
> > > > **Allowed values (<code>enum</code>):** <a id="dt-6dc02a99bb47e7f291d3"></a> <span id="dt-ebd3e0b999dba07c38ce"><code>&#34;ti&#44;j7200&#45;cpsw5g&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-67601910bf9567dacd6b"><code>&#34;ti&#44;j721e&#45;cpsw9g&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-89898ce113c859822487"><code>&#34;ti&#44;j784s4&#45;cpsw9g&#45;phy&#45;gmii&#45;sel&#34;</code></span>
>
> <a id="dt-889ceb40bc531bf0dc1d"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-7cd597a6bb6b91730c25"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-9e177d0a5a4e8029e77c"></a>
> >
> > **<code>ti&#44;qsgmii&#45;main&#45;ports</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.

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

### Rule 5

> <a id="dt-30dd43480a02ff52099e"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-815e247e2e39708faa21"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-95159efb137dae08a1e1"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-2bc9a23172c2091be559"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-f6f7348eb6a3f6a0c1d3"></a> <span id="dt-e23119600ac866295534"><code>&#34;ti&#44;am3352&#45;phy&#45;gmii&#45;sel&#34;</code></span>, <span id="dt-394f4c36882e88052506"><code>&#34;ti&#44;am43xx&#45;phy&#45;gmii&#45;sel&#34;</code></span>
>
> <a id="dt-b13bdf6bf01ba2db1729"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-61105cb355bf27434ff1"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-e5aa21cccf7d08364e4d"></a>
> >
> > **<code>&#35;phy&#45;cells</code> — not listed as required here**
> >
> > **Exact value (<code>const</code>):** <span id="dt-8446eec7a8478e9c7cc9"><code>2</code></span>
> >
> > <div id="dt-d814b838fb6a96377998">
> > <p style="white-space: pre-wrap">- CPSW port number (starting from 1)
> > - RMII refclk mode</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;phy&#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">phy_gmii_sel: phy@650 {
    compatible = "ti,am3352-phy-gmii-sel";
    reg = &lt;0x650 0x4&gt;;
    #phy-cells = &lt;2&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 2:</strong> <span> Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/</span></p>

</details>
