blob: 924fd3d748a8817517c01172680728ab7b0d87d4 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (c) 2020 MediaTek
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/usb/mediatek,mtk-xhci.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: MediaTek USB3 xHCI
9
10maintainers:
11 - Chunfeng Yun <chunfeng.yun@mediatek.com>
12
13allOf:
14 - $ref: usb-xhci.yaml
15
16description: |
17 There are two scenarios:
18 case 1: only supports xHCI driver;
19 case 2: supports dual-role mode, and the host is based on xHCI driver.
20
21properties:
22 # common properties for both case 1 and case 2
23 compatible:
24 items:
25 - enum:
26 - mediatek,mt2701-xhci
27 - mediatek,mt2712-xhci
28 - mediatek,mt7622-xhci
29 - mediatek,mt7623-xhci
30 - mediatek,mt7629-xhci
31 - mediatek,mt7986-xhci
32 - mediatek,mt8173-xhci
33 - mediatek,mt8183-xhci
34 - mediatek,mt8186-xhci
35 - mediatek,mt8188-xhci
36 - mediatek,mt8192-xhci
37 - mediatek,mt8195-xhci
38 - mediatek,mt8365-xhci
39 - const: mediatek,mtk-xhci
40
41 reg:
42 minItems: 1
43 items:
44 - description: the registers of xHCI MAC
45 - description: the registers of IP Port Control
46
47 reg-names:
48 minItems: 1
49 items:
50 - const: mac
51 - const: ippc # optional, only needed for case 1.
52
53 interrupts:
54 description:
55 use "interrupts-extended" when the interrupts are connected to the
56 separate interrupt controllers
57 minItems: 1
58 items:
59 - description: xHCI host controller interrupt
60 - description: optional, wakeup interrupt used to support runtime PM
61
62 interrupt-names:
63 minItems: 1
64 items:
65 - const: host
66 - const: wakeup
67
68 power-domains:
69 description: A phandle to USB power domain node to control USB's MTCMOS
70 maxItems: 1
71
72 clocks:
73 minItems: 1
74 items:
75 - description: Controller clock used by normal mode
76 - description: Reference clock used by low power mode etc
77 - description: Mcu bus clock for register access
78 - description: DMA bus clock for data transfer
79 - description: controller clock
80 - description: frame count clock
81
82 clock-names:
83 minItems: 1
84 items:
85 - const: sys_ck # required, the following ones are optional
86 - const: ref_ck
87 - const: mcu_ck
88 - const: dma_ck
89 - const: xhci_ck
90 - const: frmcnt_ck
91
92 phys:
93 description:
94 List of all PHYs used on this HCD, it's better to keep PHYs in order
95 as the hardware layout
96 minItems: 1
97 items:
98 - description: USB2/HS PHY # required, others are optional
99 - description: USB3/SS(P) PHY
100 - description: USB2/HS PHY
101 - description: USB3/SS(P) PHY
102 - description: USB2/HS PHY
103 - description: USB3/SS(P) PHY
104 - description: USB2/HS PHY
105 - description: USB3/SS(P) PHY
106 - description: USB2/HS PHY
107
108 vusb33-supply:
109 description: Regulator of USB AVDD3.3v
110
111 vbus-supply:
112 description: Regulator of USB VBUS5v
113
114 resets:
115 maxItems: 1
116
117 usb3-lpm-capable: true
118
119 usb2-lpm-disable: true
120
121 imod-interval-ns:
122 description:
123 Interrupt moderation interval value, it is 8 times as much as that
124 defined in the xHCI spec on MTK's controller.
125 default: 5000
126
Tom Rini93743d22024-04-01 09:08:13 -0400127 rx-fifo-depth:
128 $ref: /schemas/types.yaml#/definitions/uint32
129 description:
130 It is a quirk used to work around Gen1 isoc-in endpoint transfer issue
131 that still send out unexpected ACK after device finishes the burst
132 transfer with a short packet and cause an exception, specially on a 4K
133 camera device, it happens on controller before about IPM v1.6.0;
134 the side-effect is that it may cause performance drop about 10%,
135 including bulk transfer, prefer to use 3k here. The size is in bytes.
136 enum: [1024, 2048, 3072, 4096]
137
Tom Rini53633a82024-02-29 12:33:36 -0500138 # the following properties are only used for case 1
139 wakeup-source:
140 description: enable USB remote wakeup, see power/wakeup-source.txt
141 type: boolean
142
143 mediatek,syscon-wakeup:
144 $ref: /schemas/types.yaml#/definitions/phandle-array
145 maxItems: 1
146 description:
147 A phandle to syscon used to access the register of the USB wakeup glue
148 layer between xHCI and SPM, the field should always be 3 cells long.
149 items:
150 items:
151 - description:
152 The first cell represents a phandle to syscon
153 - description:
154 The second cell represents the register base address of the glue
155 layer in syscon
156 - description: |
157 The third cell represents the hardware version of the glue layer,
158 1 - used by mt8173 etc, revision 1 without following IPM rule;
159 2 - used by mt2712 etc, revision 2 following IPM rule;
160 101 - used by mt8183, specific 1.01;
161 102 - used by mt8192, specific 1.02;
162 103 - used by mt8195, IP0, specific 1.03;
163 104 - used by mt8195, IP1, specific 1.04;
164 105 - used by mt8195, IP2, specific 1.05;
165 106 - used by mt8195, IP3, specific 1.06;
166 enum: [1, 2, 101, 102, 103, 104, 105, 106]
167
168 mediatek,u3p-dis-msk:
169 $ref: /schemas/types.yaml#/definitions/uint32
170 description: The mask to disable u3ports, bit0 for u3port0,
171 bit1 for u3port1, ... etc
172
173 mediatek,u2p-dis-msk:
174 $ref: /schemas/types.yaml#/definitions/uint32
175 description: The mask to disable u2ports, bit0 for u2port0,
176 bit1 for u2port1, ... etc
177
178 "#address-cells":
179 const: 1
180
181 "#size-cells":
182 const: 0
183
184patternProperties:
185 "@[0-9a-f]{1}$":
186 type: object
187 description: The hard wired USB devices.
188
189dependencies:
190 wakeup-source: [ 'mediatek,syscon-wakeup' ]
191
192required:
193 - compatible
194 - reg
195 - reg-names
196 - interrupts
197 - clocks
198 - clock-names
199
200additionalProperties: false
201
202examples:
203 - |
204 #include <dt-bindings/clock/mt8173-clk.h>
205 #include <dt-bindings/interrupt-controller/arm-gic.h>
206 #include <dt-bindings/interrupt-controller/irq.h>
207 #include <dt-bindings/phy/phy.h>
208 #include <dt-bindings/power/mt8173-power.h>
209
210 usb@11270000 {
211 compatible = "mediatek,mt8173-xhci", "mediatek,mtk-xhci";
212 reg = <0x11270000 0x1000>, <0x11280700 0x0100>;
213 reg-names = "mac", "ippc";
214 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
215 power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
216 clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>;
217 clock-names = "sys_ck", "ref_ck";
218 phys = <&u3port0 PHY_TYPE_USB3>, <&u2port1 PHY_TYPE_USB2>;
219 vusb33-supply = <&mt6397_vusb_reg>;
220 vbus-supply = <&usb_p1_vbus>;
221 imod-interval-ns = <10000>;
222 mediatek,syscon-wakeup = <&pericfg 0x400 1>;
223 wakeup-source;
224 usb3-lpm-capable;
225 };
226...