Merge tag 'fbdev-v4.21' of git://github.com/bzolnier/linux
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / display / msm / dsi.txt
1 Qualcomm Technologies Inc. adreno/snapdragon DSI output
2
3 DSI Controller:
4 Required properties:
5 - compatible:
6   * "qcom,mdss-dsi-ctrl"
7 - reg: Physical base address and length of the registers of controller
8 - reg-names: The names of register regions. The following regions are required:
9   * "dsi_ctrl"
10 - interrupts: The interrupt signal from the DSI block.
11 - power-domains: Should be <&mmcc MDSS_GDSC>.
12 - clocks: Phandles to device clocks.
13 - clock-names: the following clocks are required:
14   * "mdp_core"
15   * "iface"
16   * "bus"
17   * "core_mmss"
18   * "byte"
19   * "pixel"
20   * "core"
21   For DSIv2, we need an additional clock:
22    * "src"
23   For DSI6G v2.0 onwards, we need also need the clock:
24    * "byte_intf"
25 - assigned-clocks: Parents of "byte" and "pixel" for the given platform.
26 - assigned-clock-parents: The Byte clock and Pixel clock PLL outputs provided
27   by a DSI PHY block. See [1] for details on clock bindings.
28 - vdd-supply: phandle to vdd regulator device node
29 - vddio-supply: phandle to vdd-io regulator device node
30 - vdda-supply: phandle to vdda regulator device node
31 - phys: phandle to DSI PHY device node
32 - phy-names: the name of the corresponding PHY device
33 - syscon-sfpb: A phandle to mmss_sfpb syscon node (only for DSIv2)
34 - ports: Contains 2 DSI controller ports as child nodes. Each port contains
35   an endpoint subnode as defined in [2] and [3].
36
37 Optional properties:
38 - panel@0: Node of panel connected to this DSI controller.
39   See files in [4] for each supported panel.
40 - qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is
41   driving a panel which needs 2 DSI links.
42 - qcom,master-dsi: Boolean value indicating if the DSI controller is driving
43   the master link of the 2-DSI panel.
44 - qcom,sync-dual-dsi: Boolean value indicating if the DSI controller is
45   driving a 2-DSI panel whose 2 links need receive command simultaneously.
46 - pinctrl-names: the pin control state names; should contain "default"
47 - pinctrl-0: the default pinctrl state (active)
48 - pinctrl-n: the "sleep" pinctrl state
49 - ports: contains DSI controller input and output ports as children, each
50   containing one endpoint subnode.
51
52   DSI Endpoint properties:
53   - remote-endpoint: For port@0, set to phandle of the connected panel/bridge's
54     input endpoint. For port@1, set to the MDP interface output. See [2] for
55     device graph info.
56
57   - data-lanes: this describes how the physical DSI data lanes are mapped
58     to the logical lanes on the given platform. The value contained in
59     index n describes what physical lane is mapped to the logical lane n
60     (DATAn, where n lies between 0 and 3). The clock lane position is fixed
61     and can't be changed. Hence, they aren't a part of the DT bindings. See
62     [3] for more info on the data-lanes property.
63
64     For example:
65
66     data-lanes = <3 0 1 2>;
67
68     The above mapping describes that the logical data lane DATA0 is mapped to
69     the physical data lane DATA3, logical DATA1 to physical DATA0, logic DATA2
70     to phys DATA1 and logic DATA3 to phys DATA2.
71
72     There are only a limited number of physical to logical mappings possible:
73     <0 1 2 3>
74     <1 2 3 0>
75     <2 3 0 1>
76     <3 0 1 2>
77     <0 3 2 1>
78     <1 0 3 2>
79     <2 1 0 3>
80     <3 2 1 0>
81
82 DSI PHY:
83 Required properties:
84 - compatible: Could be the following
85   * "qcom,dsi-phy-28nm-hpm"
86   * "qcom,dsi-phy-28nm-lp"
87   * "qcom,dsi-phy-20nm"
88   * "qcom,dsi-phy-28nm-8960"
89   * "qcom,dsi-phy-14nm"
90   * "qcom,dsi-phy-10nm"
91 - reg: Physical base address and length of the registers of PLL, PHY. Some
92   revisions require the PHY regulator base address, whereas others require the
93   PHY lane base address. See below for each PHY revision.
94 - reg-names: The names of register regions. The following regions are required:
95   For DSI 28nm HPM/LP/8960 PHYs and 20nm PHY:
96   * "dsi_pll"
97   * "dsi_phy"
98   * "dsi_phy_regulator"
99   For DSI 14nm and 10nm PHYs:
100   * "dsi_pll"
101   * "dsi_phy"
102   * "dsi_phy_lane"
103 - clock-cells: Must be 1. The DSI PHY block acts as a clock provider, creating
104   2 clocks: A byte clock (index 0), and a pixel clock (index 1).
105 - power-domains: Should be <&mmcc MDSS_GDSC>.
106 - clocks: Phandles to device clocks. See [1] for details on clock bindings.
107 - clock-names: the following clocks are required:
108   * "iface"
109   * "ref" (only required for new DTS files/entries)
110   For 28nm HPM/LP, 28nm 8960 PHYs:
111 - vddio-supply: phandle to vdd-io regulator device node
112   For 20nm PHY:
113 - vddio-supply: phandle to vdd-io regulator device node
114 - vcca-supply: phandle to vcca regulator device node
115   For 14nm PHY:
116 - vcca-supply: phandle to vcca regulator device node
117   For 10nm PHY:
118 - vdds-supply: phandle to vdds regulator device node
119
120 Optional properties:
121 - qcom,dsi-phy-regulator-ldo-mode: Boolean value indicating if the LDO mode PHY
122   regulator is wanted.
123 - qcom,mdss-mdp-transfer-time-us:       Specifies the dsi transfer time for command mode
124                                         panels in microseconds. Driver uses this number to adjust
125                                         the clock rate according to the expected transfer time.
126                                         Increasing this value would slow down the mdp processing
127                                         and can result in slower performance.
128                                         Decreasing this value can speed up the mdp processing,
129                                         but this can also impact power consumption.
130                                         As a rule this time should not be higher than the time
131                                         that would be expected with the processing at the
132                                         dsi link rate since anyways this would be the maximum
133                                         transfer time that could be achieved.
134                                         If ping pong split is enabled, this time should not be higher
135                                         than two times the dsi link rate time.
136                                         If the property is not specified, then the default value is 14000 us.
137
138 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
139 [2] Documentation/devicetree/bindings/graph.txt
140 [3] Documentation/devicetree/bindings/media/video-interfaces.txt
141 [4] Documentation/devicetree/bindings/display/panel/
142
143 Example:
144         dsi0: dsi@fd922800 {
145                 compatible = "qcom,mdss-dsi-ctrl";
146                 qcom,dsi-host-index = <0>;
147                 interrupt-parent = <&mdp>;
148                 interrupts = <4 0>;
149                 reg-names = "dsi_ctrl";
150                 reg = <0xfd922800 0x200>;
151                 power-domains = <&mmcc MDSS_GDSC>;
152                 clock-names =
153                         "bus",
154                         "byte",
155                         "core",
156                         "core_mmss",
157                         "iface",
158                         "mdp_core",
159                         "pixel";
160                 clocks =
161                         <&mmcc MDSS_AXI_CLK>,
162                         <&mmcc MDSS_BYTE0_CLK>,
163                         <&mmcc MDSS_ESC0_CLK>,
164                         <&mmcc MMSS_MISC_AHB_CLK>,
165                         <&mmcc MDSS_AHB_CLK>,
166                         <&mmcc MDSS_MDP_CLK>,
167                         <&mmcc MDSS_PCLK0_CLK>;
168
169                 assigned-clocks =
170                                  <&mmcc BYTE0_CLK_SRC>,
171                                  <&mmcc PCLK0_CLK_SRC>;
172                 assigned-clock-parents =
173                                  <&dsi_phy0 0>,
174                                  <&dsi_phy0 1>;
175
176                 vdda-supply = <&pma8084_l2>;
177                 vdd-supply = <&pma8084_l22>;
178                 vddio-supply = <&pma8084_l12>;
179
180                 phys = <&dsi_phy0>;
181                 phy-names ="dsi-phy";
182
183                 qcom,dual-dsi-mode;
184                 qcom,master-dsi;
185                 qcom,sync-dual-dsi;
186
187                 qcom,mdss-mdp-transfer-time-us = <12000>;
188
189                 pinctrl-names = "default", "sleep";
190                 pinctrl-0 = <&dsi_active>;
191                 pinctrl-1 = <&dsi_suspend>;
192
193                 ports {
194                         #address-cells = <1>;
195                         #size-cells = <0>;
196
197                         port@0 {
198                                 reg = <0>;
199                                 dsi0_in: endpoint {
200                                         remote-endpoint = <&mdp_intf1_out>;
201                                 };
202                         };
203
204                         port@1 {
205                                 reg = <1>;
206                                 dsi0_out: endpoint {
207                                         remote-endpoint = <&panel_in>;
208                                         data-lanes = <0 1 2 3>;
209                                 };
210                         };
211                 };
212
213                 panel: panel@0 {
214                         compatible = "sharp,lq101r1sx01";
215                         reg = <0>;
216                         link2 = <&secondary>;
217
218                         power-supply = <...>;
219                         backlight = <...>;
220
221                         port {
222                                 panel_in: endpoint {
223                                         remote-endpoint = <&dsi0_out>;
224                                 };
225                         };
226                 };
227         };
228
229         dsi_phy0: dsi-phy@fd922a00 {
230                 compatible = "qcom,dsi-phy-28nm-hpm";
231                 qcom,dsi-phy-index = <0>;
232                 reg-names =
233                         "dsi_pll",
234                         "dsi_phy",
235                         "dsi_phy_regulator";
236                 reg =   <0xfd922a00 0xd4>,
237                         <0xfd922b00 0x2b0>,
238                         <0xfd922d80 0x7b>;
239                 clock-names = "iface";
240                 clocks = <&mmcc MDSS_AHB_CLK>;
241                 #clock-cells = <1>;
242                 vddio-supply = <&pma8084_l12>;
243
244                 qcom,dsi-phy-regulator-ldo-mode;
245         };