Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / usb / mt8173-mtu3.txt
1 The device node for Mediatek USB3.0 DRD controller
2
3 Required properties:
4  - compatible : should be "mediatek,mt8173-mtu3"
5  - reg : specifies physical base address and size of the registers
6  - reg-names: should be "mac" for device IP and "ippc" for IP port control
7  - interrupts : interrupt used by the device IP
8  - power-domains : a phandle to USB power domain node to control USB's
9         mtcmos
10  - vusb33-supply : regulator of USB avdd3.3v
11  - clocks : a list of phandle + clock-specifier pairs, one for each
12         entry in clock-names
13  - clock-names : must contain "sys_ck" and "ref_ck" for clock of controller;
14         "wakeup_deb_p0" and "wakeup_deb_p1" are optional, they are
15         depends on "mediatek,enable-wakeup"
16  - phys : a list of phandle + phy specifier pairs
17  - dr_mode : should be one of "host", "peripheral" or "otg",
18         refer to usb/generic.txt
19
20 Optional properties:
21  - #address-cells, #size-cells : should be '2' if the device has sub-nodes
22         with 'reg' property
23  - ranges : allows valid 1:1 translation between child's address space and
24         parent's address space
25  - extcon : external connector for vbus and idpin changes detection, needed
26         when supports dual-role mode.
27  - vbus-supply : reference to the VBUS regulator, needed when supports
28         dual-role mode.
29  - pinctl-names : a pinctrl state named "default" must be defined,
30         "id_float" and "id_ground" are optinal which depends on
31         "mediatek,enable-manual-drd"
32  - pinctrl-0 : pin control group
33         See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
34
35  - maximum-speed : valid arguments are "super-speed", "high-speed" and
36         "full-speed"; refer to usb/generic.txt
37  - enable-manual-drd : supports manual dual-role switch via debugfs; usually
38         used when receptacle is TYPE-A and also wants to support dual-role
39         mode.
40  - mediatek,enable-wakeup : supports ip sleep wakeup used by host mode
41  - mediatek,syscon-wakeup : phandle to syscon used to access USB wakeup
42         control register, it depends on "mediatek,enable-wakeup".
43
44 Sub-nodes:
45 The xhci should be added as subnode to mtu3 as shown in the following example
46 if host mode is enabled. The DT binding details of xhci can be found in:
47 Documentation/devicetree/bindings/usb/mt8173-xhci.txt
48
49 Example:
50 ssusb: usb@11271000 {
51         compatible = "mediatek,mt8173-mtu3";
52         reg = <0 0x11271000 0 0x3000>,
53               <0 0x11280700 0 0x0100>;
54         reg-names = "mac", "ippc";
55         interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>;
56         phys = <&phy_port0 PHY_TYPE_USB3>,
57                <&phy_port1 PHY_TYPE_USB2>;
58         power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
59         clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>,
60                  <&pericfg CLK_PERI_USB0>,
61                  <&pericfg CLK_PERI_USB1>;
62         clock-names = "sys_ck", "ref_ck",
63                       "wakeup_deb_p0",
64                       "wakeup_deb_p1";
65         vusb33-supply = <&mt6397_vusb_reg>;
66         vbus-supply = <&usb_p0_vbus>;
67         extcon = <&extcon_usb>;
68         dr_mode = "otg";
69         mediatek,enable-wakeup;
70         mediatek,syscon-wakeup = <&pericfg>;
71         #address-cells = <2>;
72         #size-cells = <2>;
73         ranges;
74         status = "disabled";
75
76         usb_host: xhci@11270000 {
77                 compatible = "mediatek,mt8173-xhci";
78                 reg = <0 0x11270000 0 0x1000>;
79                 reg-names = "mac";
80                 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
81                 power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
82                 clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>;
83                 clock-names = "sys_ck", "ref_ck";
84                 vusb33-supply = <&mt6397_vusb_reg>;
85                 status = "disabled";
86         };
87 };