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