Merge branch 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / usb / mediatek,mtu3.txt
1 The device node for Mediatek USB3.0 DRD controller
2
3 Required 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 : a list of phandle + phy specifier pairs
21  - dr_mode : should be one of "host", "peripheral" or "otg",
22         refer to usb/generic.txt
23
24 Optional 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  - mediatek,enable-wakeup : supports ip sleep wakeup used by host mode
46  - mediatek,syscon-wakeup : phandle to syscon used to access USB wakeup
47         control register, it depends on "mediatek,enable-wakeup".
48  - mediatek,u3p-dis-msk : mask to disable u3ports, bit0 for u3port0,
49         bit1 for u3port1, ... etc;
50
51 Sub-nodes:
52 The xhci should be added as subnode to mtu3 as shown in the following example
53 if host mode is enabled. The DT binding details of xhci can be found in:
54 Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
55
56 Example:
57 ssusb: usb@11271000 {
58         compatible = "mediatek,mt8173-mtu3";
59         reg = <0 0x11271000 0 0x3000>,
60               <0 0x11280700 0 0x0100>;
61         reg-names = "mac", "ippc";
62         interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>;
63         phys = <&phy_port0 PHY_TYPE_USB3>,
64                <&phy_port1 PHY_TYPE_USB2>;
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         vusb33-supply = <&mt6397_vusb_reg>;
71         vbus-supply = <&usb_p0_vbus>;
72         extcon = <&extcon_usb>;
73         dr_mode = "otg";
74         mediatek,enable-wakeup;
75         mediatek,syscon-wakeup = <&pericfg>;
76         #address-cells = <2>;
77         #size-cells = <2>;
78         ranges;
79
80         usb_host: xhci@11270000 {
81                 compatible = "mediatek,mt8173-xhci";
82                 reg = <0 0x11270000 0 0x1000>;
83                 reg-names = "mac";
84                 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
85                 power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
86                 clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>;
87                 clock-names = "sys_ck", "ref_ck";
88                 vusb33-supply = <&mt6397_vusb_reg>;
89         };
90 };