1The device node for Mediatek USB3.0 DRD controller
2
3Required properties:
4 - compatible : should be "mediatek,<soc-model>-mtu3", "mediatek,mtu3",
5	soc-model is the name of SoC, such as mt8173, mt2712 etc,
6	when using "mediatek,mtu3" compatible string, you need SoC specific
7	ones in addition, one of:
8	- "mediatek,mt8173-mtu3"
9 - reg : specifies physical base address and size of the registers
10 - reg-names: should be "mac" for device IP and "ippc" for IP port control
11 - interrupts : interrupt used by the device IP
12 - power-domains : a phandle to USB power domain node to control USB's
13	mtcmos
14 - vusb33-supply : regulator of USB avdd3.3v
15 - clocks : a list of phandle + clock-specifier pairs, one for each
16	entry in clock-names
17 - clock-names : must contain "sys_ck" for clock of controller,
18	the following clocks are optional:
19	"ref_ck", "mcu_ck" and "dam_ck";
20 - phys : see usb-hcd.txt in the current directory
21 - dr_mode : should be one of "host", "peripheral" or "otg",
22	refer to usb/generic.txt
23
24Optional properties:
25 - #address-cells, #size-cells : should be '2' if the device has sub-nodes
26	with 'reg' property
27 - ranges : allows valid 1:1 translation between child's address space and
28	parent's address space
29 - extcon : external connector for vbus and idpin changes detection, needed
30	when supports dual-role mode.
31 - vbus-supply : reference to the VBUS regulator, needed when supports
32	dual-role mode.
33 - pinctrl-names : a pinctrl state named "default" is optional, and need be
34	defined if auto drd switch is enabled, that means the property dr_mode
35	is set as "otg", and meanwhile the property "mediatek,enable-manual-drd"
36	is not set.
37 - pinctrl-0 : pin control group
38	See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
39
40 - maximum-speed : valid arguments are "super-speed", "high-speed" and
41	"full-speed"; refer to usb/generic.txt
42 - enable-manual-drd : supports manual dual-role switch via debugfs; usually
43	used when receptacle is TYPE-A and also wants to support dual-role
44	mode.
45 - wakeup-source: enable USB remote wakeup of host mode.
46 - mediatek,syscon-wakeup : phandle to syscon used to access the register
47	of the USB wakeup glue layer between SSUSB and SPM; it depends on
48	"wakeup-source", and has two arguments:
49	- the first one : register base address of the glue layer in syscon;
50	- the second one : hardware version of the glue layer
51		- 1 : used by mt8173 etc
52		- 2 : used by mt2712 etc
53 - mediatek,u3p-dis-msk : mask to disable u3ports, bit0 for u3port0,
54	bit1 for u3port1, ... etc;
55
56additionally the properties from usb-hcd.txt (in the current directory) are
57supported.
58
59Sub-nodes:
60The xhci should be added as subnode to mtu3 as shown in the following example
61if host mode is enabled. The DT binding details of xhci can be found in:
62Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
63
64Example:
65ssusb: usb@11271000 {
66	compatible = "mediatek,mt8173-mtu3";
67	reg = <0 0x11271000 0 0x3000>,
68	      <0 0x11280700 0 0x0100>;
69	reg-names = "mac", "ippc";
70	interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>;
71	phys = <&phy_port0 PHY_TYPE_USB3>,
72	       <&phy_port1 PHY_TYPE_USB2>;
73	power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
74	clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>,
75		 <&pericfg CLK_PERI_USB0>,
76		 <&pericfg CLK_PERI_USB1>;
77	clock-names = "sys_ck", "ref_ck";
78	vusb33-supply = <&mt6397_vusb_reg>;
79	vbus-supply = <&usb_p0_vbus>;
80	extcon = <&extcon_usb>;
81	dr_mode = "otg";
82	wakeup-source;
83	mediatek,syscon-wakeup = <&pericfg 0x400 1>;
84	#address-cells = <2>;
85	#size-cells = <2>;
86	ranges;
87
88	usb_host: xhci@11270000 {
89		compatible = "mediatek,mt8173-xhci";
90		reg = <0 0x11270000 0 0x1000>;
91		reg-names = "mac";
92		interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
93		power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
94		clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>;
95		clock-names = "sys_ck", "ref_ck";
96		vusb33-supply = <&mt6397_vusb_reg>;
97	};
98};
99