# Apple Type-C PHY (ATCPHY)

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

> Device-tree binding reference for Apple Type-C PHY (ATCPHY).

<!-- 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;apple&#44;atcphy&#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;Sven Peter &#60;sven&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Apple Type-C PHY (ATCPHY) is a combined PHY for USB 2.0, USB 3.x, USB4/Thunderbolt, and DisplayPort connectivity via Type-C ports found in Apple Silicon SoCs.
The PHY handles muxing between these different protocols and also provides the reset controller for the attached DWC3 USB controller.
It is designed for USB4 operation and does not handle individual differential pairs as distinct DisplayPort lanes. Any reference to lane in this binding hence refers to two differential pairs (RX and TX) as used in USB terminology.
In order to correctly setup these lanes for the various modes calibration values copied from Apple's firmware and converted to the format described below by our bootloader m1n1 are required. Without these only USB2 operation is possible.</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>&#47;schemas&#47;usb&#47;usb&#45;switch&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-usb/usb-switch.md#dt-root>)</span>

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

## Reusable definitions (<code>&#36;defs</code>)

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

### <code>apple&#44;tunable</code>

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

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

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

> <a id="dt-95d107169e2b94825cc0"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-016b7bcdfd79c3c3cf93"></a>
>
> **Item 1**
>
> > <div id="dt-e14d76e3c4f9efe48708">
> > <p style="white-space: pre-wrap">Register offset</p>
> > </div>
>
> <a id="dt-d13cb02fefa1468dda75"></a>
>
> **Item 2**
>
> > <div id="dt-90a363ebe96c4f75c092">
> > <p style="white-space: pre-wrap">Mask to be applied to the register value</p>
> > </div>
>
> <a id="dt-944e25cf88754538c7d4"></a>
>
> **Item 3**
>
> > <div id="dt-405f560cf28e72da802e">
> > <p style="white-space: pre-wrap">Bits to be set after applying the mask</p>
> > </div>

<div id="dt-bcb5dee7bc710deea2b1">
<p style="white-space: pre-wrap">List of (register offset, mask, value) tuples copied from Apple's Device Tree by our bootloader m1n1 and used to configure the PHY. These values even vary for a single product/device and likely contain calibration values determined by Apple at manufacturing time. Unless otherwise noted these tunables are always applied to the core register region.</p>
</div>

<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**

> <a id="dt-07409cc9508405f48983"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-822691c82c9797f7b1f9"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-3b212051dcd0fc641cd8"></a> <span id="dt-bd6e6716d05ec45653db"><code>&#34;apple&#44;t6000&#45;atcphy&#34;</code></span>, <span id="dt-3e7fb897881b12f43f81"><code>&#34;apple&#44;t6020&#45;atcphy&#34;</code></span>, <span id="dt-b7d19de74fd35364d49f"><code>&#34;apple&#44;t8112&#45;atcphy&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;apple&#44;t8103&#45;atcphy&#34;</code></span>

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

**Rule 2**

> **Exact value (<code>const</code>):** <span id="dt-58a429cd4bf531951c0d"><code>&#34;apple&#44;t8103&#45;atcphy&#34;</code></span>

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

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

<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">Common controls for all PHYs (USB2/3/4, DisplayPort, TBT)</p>
> </div>

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

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">DisplayPort Alternate Mode PHY specific controls</p>
> </div>

<a id="dt-80d36cb915ffeff5364a"></a>

**Item 3**

> <div id="dt-5151e97c331b693ee0dd">
> <p style="white-space: pre-wrap">Type-C PHY AXI to Apple Fabric interconnect controls</p>
> </div>

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

**Item 4**

> <div id="dt-e7b71b4619e949c538b1">
> <p style="white-space: pre-wrap">USB2 PHY specific controls</p>
> </div>

<a id="dt-55b482bd3ef74ad8e49c"></a>

**Item 5**

> <div id="dt-9034b08616e8a84a1200">
> <p style="white-space: pre-wrap">USB3 PIPE interface controls</p>
> </div>

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

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

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-69afd9f8af3b0c5757d2"><code>&#34;core&#34;</code></span>

<a id="dt-12013039402717d72b48"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-8472c6e17fb2491b6ba3"><code>&#34;lpdptx&#34;</code></span>

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

**Item 3**

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

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

**Item 4**

> **Exact value (<code>const</code>):** <span id="dt-98e4b3caabf49b98c17d"><code>&#34;usb2phy&#34;</code></span>

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

**Item 5**

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

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

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

**Exact value (<code>const</code>):** <span id="dt-1ecd3d01b2c1b237d666"><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>0</code></span>

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

### <code>mode&#45;switch</code> — required here

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

<a id="dt-8459239d22594ac44b38"></a>

### <code>orientation&#45;switch</code> — required here

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

<a id="dt-030bda573e8c53177f1a"></a>

### <code>power&#45;domains</code> — required here

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

<a id="dt-638717a7c9bbf1878b7e"></a>

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-253551a11be145495212">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;ports</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-638717a7c9bbf1878b7e>)</span>

<a id="dt-076265030fa616d9c245"></a>

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

<a id="dt-16a3f454af238f04e210"></a>

**<code>port&#64;0</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4bf3c29e51dd1dcdbf80">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;port</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-1d845f0617b4072cef77>)</span>

<div id="dt-b1724f7738be96ef356e">
<p style="white-space: pre-wrap">Outgoing connection to the SS port of the Type-C connector.</p>
</div>

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

**<code>port&#64;1</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-9faa1456d91cf714ff9d">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;port</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-1d845f0617b4072cef77>)</span>

<div id="dt-0fa4b11c6410ab72ea2f">
<p style="white-space: pre-wrap">Incoming endpoint from the USB3 controller.</p>
</div>

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

**<code>port&#64;2</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-bf0c0e1b24d670f57f64">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;port</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-1d845f0617b4072cef77>)</span>

<div id="dt-2494ba4fb5f1dc4cb38b">
<p style="white-space: pre-wrap">Incoming endpoint from the DisplayPort controller.</p>
</div>

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

**<code>port&#64;3</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ce1665a5e1c89348df32">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;port</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-1d845f0617b4072cef77>)</span>

<div id="dt-a206fbc5e1ad6cd787b2">
<p style="white-space: pre-wrap">Incoming endpoint from the USB4/Thunderbolt controller.</p>
</div>

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

### <code>apple&#44;tunable&#45;common&#45;a</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-b394fc9e511f357d24d4">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-1eac233059be014a960d">
<p style="white-space: pre-wrap">Common tunables required for all modes, applied before tunable-axi2af.</p>
</div>

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

### <code>apple&#44;tunable&#45;axi2af</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-baf22f78656c6f96ebd3">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-cc2556d18eb031cd37da">
<p style="white-space: pre-wrap">AXI to Apple Fabric tunables, required for all modes. Unlike all other tunables these are applied to the axi2af region.</p>
</div>

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

### <code>apple&#44;tunable&#45;common&#45;b</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-d354f236b0b66a5e0bdb">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-96b0c93849d141424373">
<p style="white-space: pre-wrap">Common tunables required for all modes, applied after tunable-axi2af.</p>
</div>

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

### <code>apple&#44;tunable&#45;lane0&#45;usb</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-41be7048a0c8c589ec78">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-ddf0d42fb2ebfee8cc0a">
<p style="white-space: pre-wrap">USB3 tunables for lane 0.</p>
</div>

<a id="dt-0177ea5d22cbccc37a4f"></a>

### <code>apple&#44;tunable&#45;lane1&#45;usb</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-0d5f2a66cd6ecb8161fa">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-a6497b0c9a75d06837d0">
<p style="white-space: pre-wrap">USB3 tunables for lane 1.</p>
</div>

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

### <code>apple&#44;tunable&#45;lane0&#45;cio</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4dd0b4980aaa06938ec3">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-5637a45d1690e791c29d">
<p style="white-space: pre-wrap">USB4/Thunderbolt ("Converged IO") tunables for lane 0.</p>
</div>

<a id="dt-0551402e8e0740bf68ff"></a>

### <code>apple&#44;tunable&#45;lane1&#45;cio</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-b1aa23652cb2e6194533">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-1c6e378d574612f4e7fb">
<p style="white-space: pre-wrap">USB4/Thunderbolt ("Converged IO") tunables for lane 1.</p>
</div>

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

### <code>apple&#44;tunable&#45;lane0&#45;dp</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-b1e8399ae68f318f143a">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-2b7db2e1a0f413e3224b">
<p style="white-space: pre-wrap">DisplayPort tunables for lane 0.
Note that lane here refers to a USB RX and TX pair re-used for DisplayPort and not to an individual DisplayPort differential lane.</p>
</div>

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

### <code>apple&#44;tunable&#45;lane1&#45;dp</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-0e80ebd84937fc698093">[<code>&#35;&#47;&#36;defs&#47;apple&#44;tunable</code>](<#dt-3c4ee607b06b16f27527>)</span>

<div id="dt-a55227bf7600f5c359cf">
<p style="white-space: pre-wrap">DisplayPort tunables for lane 1.
Note that lane here refers to a USB RX and TX pair re-used for DisplayPort and not to an individual DisplayPort differential lane.</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;reg&#45;names&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;phy&#45;cells&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;&#35;reset&#45;cells&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;orientation&#45;switch&#34;</code></span>, <span id="dt-a5d07fc4223c155670a0"><code>&#34;mode&#45;switch&#34;</code></span>, <span id="dt-4503833a9b225761c43a"><code>&#34;power&#45;domains&#34;</code></span>, <span id="dt-727c9b818c335e022c0e"><code>&#34;ports&#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@83000000 {
  compatible = "apple,t8103-atcphy";
  reg = &lt;0x83000000 0x4c000&gt;,
        &lt;0x83050000 0x8000&gt;,
        &lt;0x80000000 0x4000&gt;,
        &lt;0x82a90000 0x4000&gt;,
        &lt;0x82a84000 0x4000&gt;;
  reg-names = "core", "lpdptx", "axi2af", "usb2phy",
              "pipehandler";

  #phy-cells = &lt;1&gt;;
  #reset-cells = &lt;0&gt;;

  orientation-switch;
  mode-switch;
  power-domains = &lt;&amp;ps_atc0_usb&gt;;

  ports {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    port@0 {
      reg = &lt;0&gt;;

      endpoint {
        remote-endpoint = &lt;&amp;typec_connector_ss&gt;;
      };
    };

    port@1 {
      reg = &lt;1&gt;;

      endpoint {
        remote-endpoint = &lt;&amp;dwc3_ss_out&gt;;
      };
    };

    port@2 {
      reg = &lt;2&gt;;

      endpoint {
        remote-endpoint = &lt;&amp;dcp_dp_out&gt;;
      };
    };

    port@3 {
      reg = &lt;3&gt;;

      endpoint {
        remote-endpoint = &lt;&amp;acio_tbt_out&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>

</details>
