Documentation: bindings: add otg-vbus-gpios property for Rockchip USB2PHY
[firefly-linux-kernel-4.4.55.git] / Documentation / devicetree / bindings / phy / phy-rockchip-inno-usb2.txt
1 ROCKCHIP USB2.0 PHY WITH INNO IP BLOCK
2
3 Required properties (phy (parent) node):
4  - compatible : should be one of the listed compatibles:
5         * "rockchip,rk3328-usb2phy"
6         * "rockchip,rk3366-usb2phy"
7         * "rockchip,rk3399-usb2phy"
8  - reg : the address offset of grf for usb-phy configuration.
9  - #clock-cells : should be 0.
10  - clock-output-names : specify the 480m output clock name.
11
12 Optional properties:
13  - clocks : phandle + phy specifier pair, for the input clock of phy.
14  - clock-names : input clock name of phy, must be "phyclk".
15  - assigned-clocks : phandle of usb 480m clock.
16  - assigned-clock-parents : parent of usb 480m clock, select between
17                  usb-phy output 480m and xin24m.
18                  Refer to clk/clock-bindings.txt for generic clock
19                  consumer properties.
20  - rockchip,u2phy-tuning; when set, tuning u2phy to improve usb2 SI.
21  - otg-vbus-gpios : assign the gpio to control vbus of otg port.
22
23 Required nodes : a sub-node is required for each port the phy provides.
24                  The sub-node name is used to identify host or otg port,
25                  and shall be the following entries:
26         * "otg-port" : the name of otg port.
27         * "host-port" : the name of host port.
28
29 Required properties (port (child) node):
30  - #phy-cells : must be 0. See ./phy-bindings.txt for details.
31  - interrupts : specify an interrupt for each entry in interrupt-names.
32  - interrupt-names : a list which shall be the following entries:
33         * "otg-id" : for the otg id interrupt.
34         * "otg-bvalid" : for the otg vbus interrupt.
35         * "linestate" : for the host/otg linestate interrupt.
36
37 Optional properties:
38  - phy-supply : phandle to a regulator that provides power to VBUS.
39                 See ./phy-bindings.txt for details.
40  - rockchip,utmi-avalid : when set, the usb2 phy will use avalid
41                 status bit to get vbus status. If not, it will use
42                 bvalid status bit to get vbus status by default.
43  - rockchip,vbus-always-on: when set, indicates that the otg vbus
44                 is always powered on.
45
46 Example:
47
48 grf: syscon@ff770000 {
49         compatible = "rockchip,rk3366-grf", "syscon", "simple-mfd";
50         #address-cells = <1>;
51         #size-cells = <1>;
52
53 ...
54
55         u2phy: usb2-phy@700 {
56                 compatible = "rockchip,rk3366-usb2phy";
57                 reg = <0x700 0x2c>;
58                 #clock-cells = <0>;
59                 clock-output-names = "sclk_otgphy0_480m";
60
61                 u2phy_otg: otg-port {
62                         #phy-cells = <0>;
63                         interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
64                                      <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>,
65                                      <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
66                         interrupt-names = "otg-id", "otg-bvalid", "linestate";
67                         status = "okay";
68                 };
69
70                 u2phy_host: host-port {
71                         #phy-cells = <0>;
72                         interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
73                         interrupt-names = "linestate";
74                         status = "okay";
75                 };
76         };
77 };
78
79 Required properties (usb2phy grf node):
80  - compatible : should be one of the listed compatibles:
81                 "rockchip,rk3328-usb2phy-grf", "syscon", "simple-mfd";
82  - reg : the address offset of grf for usb-phy configuration.
83  - #address-cells : should be 1.
84  - #size-cells : should be 1.
85
86 Required nodes : a sub-node is required for the phy provides.
87                  The sub-node name is used to identify each phy,
88                  and shall be the following entries:
89
90 Example:
91
92 usb2phy_grf: syscon@ff450000 {
93         compatible = "rockchip,rk3328-usb2phy-grf", "syscon",
94                      "simple-mfd";
95         reg = <0x0 0xff450000 0x0 0x10000>;
96         #address-cells = <1>;
97         #size-cells = <1>;
98
99         u2phy: usb2-phy@100 {
100                 compatible = "rockchip,rk3328-usb2phy";
101                 reg = <0x100 0x10>;
102                 clocks = <&xin24m>;
103                 clock-names = "phyclk";
104                 #clock-cells = <0>;
105                 assigned-clocks = <&cru USB480M>;
106                 assigned-clock-parents = <&u2phy>;
107                 clock-output-names = "usb480m_phy";
108                 status = "disabled";
109
110                 u2phy_host: host-port {
111                         #phy-cells = <0>;
112                         interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
113                         interrupt-names = "linestate";
114                         status = "disabled";
115                 };
116         };
117 };
118