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