Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[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" and "ref_ck" for clock of controller;
18         "wakeup_deb_p0" and "wakeup_deb_p1" are optional, they are
19         depends on "mediatek,enable-wakeup"
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  - pinctl-names : a pinctrl state named "default" must be defined,
34         "id_float" and "id_ground" are optinal which depends on
35         "mediatek,enable-manual-drd"
36  - pinctrl-0 : pin control group
37         See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
38
39  - maximum-speed : valid arguments are "super-speed", "high-speed" and
40         "full-speed"; refer to usb/generic.txt
41  - enable-manual-drd : supports manual dual-role switch via debugfs; usually
42         used when receptacle is TYPE-A and also wants to support dual-role
43         mode.
44  - mediatek,enable-wakeup : supports ip sleep wakeup used by host mode
45  - mediatek,syscon-wakeup : phandle to syscon used to access USB wakeup
46         control register, it depends on "mediatek,enable-wakeup".
47
48 Sub-nodes:
49 The xhci should be added as subnode to mtu3 as shown in the following example
50 if host mode is enabled. The DT binding details of xhci can be found in:
51 Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
52
53 Example:
54 ssusb: usb@11271000 {
55         compatible = "mediatek,mt8173-mtu3";
56         reg = <0 0x11271000 0 0x3000>,
57               <0 0x11280700 0 0x0100>;
58         reg-names = "mac", "ippc";
59         interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>;
60         phys = <&phy_port0 PHY_TYPE_USB3>,
61                <&phy_port1 PHY_TYPE_USB2>;
62         power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
63         clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>,
64                  <&pericfg CLK_PERI_USB0>,
65                  <&pericfg CLK_PERI_USB1>;
66         clock-names = "sys_ck", "ref_ck",
67                       "wakeup_deb_p0",
68                       "wakeup_deb_p1";
69         vusb33-supply = <&mt6397_vusb_reg>;
70         vbus-supply = <&usb_p0_vbus>;
71         extcon = <&extcon_usb>;
72         dr_mode = "otg";
73         mediatek,enable-wakeup;
74         mediatek,syscon-wakeup = <&pericfg>;
75         #address-cells = <2>;
76         #size-cells = <2>;
77         ranges;
78
79         usb_host: xhci@11270000 {
80                 compatible = "mediatek,mt8173-xhci";
81                 reg = <0 0x11270000 0 0x1000>;
82                 reg-names = "mac";
83                 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
84                 power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
85                 clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>;
86                 clock-names = "sys_ck", "ref_ck";
87                 vusb33-supply = <&mt6397_vusb_reg>;
88         };
89 };