1MT8173 xHCI
2
3The device node for Mediatek SOC USB3.0 host controller
4
5There are two scenarios: the first one only supports xHCI driver;
6the second one supports dual-role mode, and the host is based on xHCI
7driver. Take account of backward compatibility, we divide bindings
8into two parts.
9
101st: only supports xHCI driver
11------------------------------------------------------------------------
12
13Required properties:
14 - compatible : should be "mediatek,<soc-model>-xhci", "mediatek,mtk-xhci",
15	soc-model is the name of SoC, such as mt8173, mt2712 etc, when using
16	"mediatek,mtk-xhci" compatible string, you need SoC specific ones in
17	addition, one of:
18	- "mediatek,mt8173-xhci"
19 - reg : specifies physical base address and size of the registers
20 - reg-names: should be "mac" for xHCI MAC and "ippc" for IP port control
21 - interrupts : interrupt used by the controller
22 - power-domains : a phandle to USB power domain node to control USB's
23	mtcmos
24 - vusb33-supply : regulator of USB avdd3.3v
25
26 - clocks : a list of phandle + clock-specifier pairs, one for each
27	entry in clock-names
28 - clock-names : must contain
29	"sys_ck": controller clock used by normal mode,
30	the following ones are optional:
31	"ref_ck": reference clock used by low power mode etc,
32	"mcu_ck": mcu_bus clock for register access,
33	"dma_ck": dma_bus clock for data transfer by DMA
34
35 - phys : see usb-hcd.txt in the current directory
36
37Optional properties:
38 - wakeup-source : enable USB remote wakeup;
39 - mediatek,syscon-wakeup : phandle to syscon used to access the register
40	of the USB wakeup glue layer between xHCI and SPM; it depends on
41	"wakeup-source", and has two arguments:
42	- the first one : register base address of the glue layer in syscon;
43	- the second one : hardware version of the glue layer
44		- 1 : used by mt8173 etc
45		- 2 : used by mt2712 etc
46 - mediatek,u3p-dis-msk : mask to disable u3ports, bit0 for u3port0,
47	bit1 for u3port1, ... etc;
48 - vbus-supply : reference to the VBUS regulator;
49 - usb3-lpm-capable : supports USB3.0 LPM
50 - pinctrl-names : a pinctrl state named "default" must be defined
51 - pinctrl-0 : pin control group
52	See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
53 - imod-interval-ns: default interrupt moderation interval is 5000ns
54
55additionally the properties from usb-hcd.txt (in the current directory) are
56supported.
57
58Example:
59usb30: usb@11270000 {
60	compatible = "mediatek,mt8173-xhci";
61	reg = <0 0x11270000 0 0x1000>,
62	      <0 0x11280700 0 0x0100>;
63	reg-names = "mac", "ippc";
64	interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
65	power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
66	clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>,
67		 <&pericfg CLK_PERI_USB0>,
68		 <&pericfg CLK_PERI_USB1>;
69	clock-names = "sys_ck", "ref_ck";
70	phys = <&phy_port0 PHY_TYPE_USB3>,
71	       <&phy_port1 PHY_TYPE_USB2>;
72	vusb33-supply = <&mt6397_vusb_reg>;
73	vbus-supply = <&usb_p1_vbus>;
74	usb3-lpm-capable;
75	mediatek,syscon-wakeup = <&pericfg 0x400 1>;
76	wakeup-source;
77	imod-interval-ns = <10000>;
78};
79
802nd: dual-role mode with xHCI driver
81------------------------------------------------------------------------
82
83In the case, xhci is added as subnode to mtu3. An example and the DT binding
84details of mtu3 can be found in:
85Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
86
87Required properties:
88 - compatible : should be "mediatek,<soc-model>-xhci", "mediatek,mtk-xhci",
89	soc-model is the name of SoC, such as mt8173, mt2712 etc, when using
90	"mediatek,mtk-xhci" compatible string, you need SoC specific ones in
91	addition, one of:
92	- "mediatek,mt8173-xhci"
93 - reg : specifies physical base address and size of the registers
94 - reg-names: should be "mac" for xHCI MAC
95 - interrupts : interrupt used by the host controller
96 - power-domains : a phandle to USB power domain node to control USB's
97	mtcmos
98 - vusb33-supply : regulator of USB avdd3.3v
99
100 - clocks : a list of phandle + clock-specifier pairs, one for each
101	entry in clock-names
102 - clock-names : must contain "sys_ck", and the following ones are optional:
103	"ref_ck", "mcu_ck" and "dma_ck"
104
105Optional properties:
106 - vbus-supply : reference to the VBUS regulator;
107 - usb3-lpm-capable : supports USB3.0 LPM
108
109Example:
110usb30: usb@11270000 {
111	compatible = "mediatek,mt8173-xhci";
112	reg = <0 0x11270000 0 0x1000>;
113	reg-names = "mac";
114	interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
115	power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
116	clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>;
117	clock-names = "sys_ck", "ref_ck";
118	vusb33-supply = <&mt6397_vusb_reg>;
119	usb3-lpm-capable;
120};
121