1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 # Copyright (c) 2020 MediaTek
5 $id: http://devicetree.org/schemas/phy/mediatek,tphy.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
8 title: MediaTek T-PHY Controller Device Tree Bindings
11 - Chunfeng Yun <chunfeng.yun@mediatek.com>
14 The T-PHY controller supports physical layer functionality for a number of
15 controllers on MediaTek SoCs, includes USB2.0, USB3.0, PCIe and SATA.
17 Layout differences of banks between T-PHY V1 (mt8173/mt2701) and
18 T-PHY V2 (mt2712) / V3 (mt8195) when works on USB mode:
19 -----------------------------------
24 u2 port0 0x0800 U2PHY_COM
25 u3 port0 0x0900 U3PHYD
29 u2 port1 0x1000 U2PHY_COM
30 u3 port1 0x1100 U3PHYD
34 u2 port2 0x1800 U2PHY_COM
60 SPLLC shared by u3 ports and FMREG shared by u2 ports on V1 are put back
61 into each port; a new bank MISC for u2 ports and CHIP for u3 ports are
62 added on V2; the FMREG bank for slew rate calibration is not used anymore
67 pattern: "^t-phy@[0-9a-f]+$"
73 - mediatek,mt2701-tphy
74 - mediatek,mt7623-tphy
75 - mediatek,mt7622-tphy
76 - mediatek,mt8516-tphy
77 - const: mediatek,generic-tphy-v1
80 - mediatek,mt2712-tphy
81 - mediatek,mt7629-tphy
82 - mediatek,mt8183-tphy
83 - mediatek,mt8186-tphy
84 - mediatek,mt8192-tphy
85 - const: mediatek,generic-tphy-v2
88 - mediatek,mt8195-tphy
89 - const: mediatek,generic-tphy-v3
90 - const: mediatek,mt2701-u3phy
92 - const: mediatek,mt2712-u3phy
94 - const: mediatek,mt8173-u3phy
98 Register shared by multiple ports, exclude port's private register.
99 It is needed for T-PHY V1, such as mt2701 and mt8173, but not for
100 T-PHY V2/V3, such as mt2712.
109 # Used with non-empty value if optional 'reg' is not provided.
110 # The format of the value is an arbitrary number of triplets of
111 # (child-bus-address, parent-bus-address, length).
114 mediatek,src-ref-clk-mhz:
116 Frequency of reference clock for slew rate calibrate
121 Coefficient for slew rate calibrate, depends on SoC process
122 $ref: /schemas/types.yaml#/definitions/uint32
125 # Required child node:
127 "^(usb|pcie|sata)-phy@[0-9a-f]+$":
130 A sub-node is required for each port the controller provides.
131 Address range information including the usual 'reg' property
132 is used inside these nodes to describe the controller's topology.
141 - description: Reference clock, (HS is 48Mhz, SS/P is 24~27Mhz)
142 - description: Reference clock of analog phy
144 Uses both clocks if the clock of analog and digital phys are
145 separated, otherwise uses "ref" clock only if needed.
156 The cells contain the following arguments.
158 - description: The PHY type
167 - description: internal R efuse for U2 PHY or U3/PCIe PHY
168 - description: rx_imp_sel efuse for U3/PCIe PHY
169 - description: tx_imp_sel efuse for U3/PCIe PHY
171 Phandles to nvmem cell that contains the efuse data;
172 Available only for U2 PHY or U3/PCIe PHY of version 2/3, these
173 three items should be provided at the same time for U3/PCIe PHY,
174 when use software to load efuse;
175 If unspecified, will use hardware auto-load efuse.
183 # The following optional vendor properties are only for debug or HQA test
186 The value of slew rate calibrate (U2 phy)
187 $ref: /schemas/types.yaml#/definitions/uint32
193 The selection of VRT reference voltage (U2 phy)
194 $ref: /schemas/types.yaml#/definitions/uint32
200 The selection of HS_TX TERM reference voltage (U2 phy)
201 $ref: /schemas/types.yaml#/definitions/uint32
207 The selection of internal resistor (U2 phy)
208 $ref: /schemas/types.yaml#/definitions/uint32
214 The selection of disconnect threshold (U2 phy)
215 $ref: /schemas/types.yaml#/definitions/uint32
221 Specify the flag to enable BC1.2 if support it
224 mediatek,syscon-type:
225 $ref: /schemas/types.yaml#/definitions/phandle-array
228 A phandle to syscon used to access the register of type switch,
229 the field should always be 3 cells long.
233 The first cell represents a phandle to syscon
235 The second cell represents the register offset
237 The third cell represents the index of config segment
244 additionalProperties: false
252 additionalProperties: false
256 #include <dt-bindings/clock/mt8173-clk.h>
257 #include <dt-bindings/interrupt-controller/arm-gic.h>
258 #include <dt-bindings/interrupt-controller/irq.h>
259 #include <dt-bindings/phy/phy.h>
261 compatible = "mediatek,mt8173-mtu3", "mediatek,mtu3";
262 reg = <0x11271000 0x3000>, <0x11280700 0x0100>;
263 reg-names = "mac", "ippc";
264 phys = <&u2port0 PHY_TYPE_USB2>,
265 <&u3port0 PHY_TYPE_USB3>,
266 <&u2port1 PHY_TYPE_USB2>;
267 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
268 clocks = <&topckgen CLK_TOP_USB30_SEL>;
269 clock-names = "sys_ck";
273 compatible = "mediatek,mt8173-u3phy";
274 reg = <0x11290000 0x800>;
275 #address-cells = <1>;
279 u2port0: usb-phy@11290800 {
280 reg = <0x11290800 0x100>;
281 clocks = <&apmixedsys CLK_APMIXED_REF2USB_TX>, <&clk48m>;
282 clock-names = "ref", "da_ref";
286 u3port0: usb-phy@11290900 {
287 reg = <0x11290900 0x700>;
293 u2port1: usb-phy@11291000 {
294 reg = <0x11291000 0x100>;