arm: dts: rk3288-evb: modify panel to edp_panel
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-evb-rk808.dts
1 /*
2  * This file is dual-licensed: you can use it either under the terms
3  * of the GPL or the X11 license, at your option. Note that this dual
4  * licensing only applies to this file, and not this project as a
5  * whole.
6  *
7  *  a) This file is free software; you can redistribute it and/or
8  *     modify it under the terms of the GNU General Public License as
9  *     published by the Free Software Foundation; either version 2 of the
10  *     License, or (at your option) any later version.
11  *
12  *     This file is distributed in the hope that it will be useful,
13  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *     GNU General Public License for more details.
16  *
17  * Or, alternatively,
18  *
19  *  b) Permission is hereby granted, free of charge, to any person
20  *     obtaining a copy of this software and associated documentation
21  *     files (the "Software"), to deal in the Software without
22  *     restriction, including without limitation the rights to use,
23  *     copy, modify, merge, publish, distribute, sublicense, and/or
24  *     sell copies of the Software, and to permit persons to whom the
25  *     Software is furnished to do so, subject to the following
26  *     conditions:
27  *
28  *     The above copyright notice and this permission notice shall be
29  *     included in all copies or substantial portions of the Software.
30  *
31  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38  *     OTHER DEALINGS IN THE SOFTWARE.
39  */
40
41 /dts-v1/;
42 #include "rk3288-evb.dtsi"
43 #include "rk3288-android.dtsi"
44
45 / {
46         compatible = "rockchip,rk3288-evb-rk808", "rockchip,rk3288";
47
48         ext_gmac: external-gmac-clock {
49                 compatible = "fixed-clock";
50                 clock-frequency = <125000000>;
51                 clock-output-names = "ext_gmac";
52                 #clock-cells = <0>;
53         };
54
55         sdio_pwrseq: sdio-pwrseq {
56                 compatible = "mmc-pwrseq-simple";
57                 clocks = <&rk808 1>;
58                 clock-names = "ext_clock";
59                 pinctrl-names = "default";
60                 pinctrl-0 = <&wifi_enable_h>;
61
62                 /*
63                  * On the module itself this is one of these (depending
64                  * on the actual card populated):
65                  * - SDIO_RESET_L_WL_REG_ON
66                  * - PDN (power down when low)
67                  */
68                 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
69         };
70 };
71
72 &cpu0 {
73         cpu0-supply = <&vdd_cpu>;
74 };
75
76 &i2c0 {
77         clock-frequency = <400000>;
78
79         rk808: pmic@1b {
80                 compatible = "rockchip,rk808";
81                 reg = <0x1b>;
82                 interrupt-parent = <&gpio0>;
83                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
84                 pinctrl-names = "default";
85                 pinctrl-0 = <&pmic_int &global_pwroff>;
86                 rockchip,system-power-controller;
87                 wakeup-source;
88                 #clock-cells = <1>;
89                 clock-output-names = "xin32k", "rk808-clkout2";
90
91                 vcc1-supply = <&vcc_sys>;
92                 vcc2-supply = <&vcc_sys>;
93                 vcc3-supply = <&vcc_sys>;
94                 vcc4-supply = <&vcc_sys>;
95                 vcc6-supply = <&vcc_sys>;
96                 vcc7-supply = <&vcc_sys>;
97                 vcc8-supply = <&vcc_18>;
98                 vcc9-supply = <&vcc_io>;
99                 vcc10-supply = <&vcc_io>;
100                 vcc11-supply = <&vcc_sys>;
101                 vcc12-supply = <&vcc_io>;
102                 vddio-supply = <&vccio_pmu>;
103
104                 regulators {
105                         vdd_cpu: DCDC_REG1 {
106                                 regulator-always-on;
107                                 regulator-boot-on;
108                                 regulator-min-microvolt = <750000>;
109                                 regulator-max-microvolt = <1350000>;
110                                 regulator-name = "vdd_arm";
111                                 regulator-state-mem {
112                                         regulator-off-in-suspend;
113                                 };
114                         };
115
116                         vdd_gpu: DCDC_REG2 {
117                                 regulator-always-on;
118                                 regulator-boot-on;
119                                 regulator-min-microvolt = <850000>;
120                                 regulator-max-microvolt = <1250000>;
121                                 regulator-name = "vdd_gpu";
122                                 regulator-ramp-delay = <6000>;
123                                 regulator-state-mem {
124                                         regulator-on-in-suspend;
125                                         regulator-suspend-microvolt = <1000000>;
126                                 };
127                         };
128
129                         vcc_ddr: DCDC_REG3 {
130                                 regulator-always-on;
131                                 regulator-boot-on;
132                                 regulator-name = "vcc_ddr";
133                                 regulator-state-mem {
134                                         regulator-on-in-suspend;
135                                 };
136                         };
137
138                         vcc_io: DCDC_REG4 {
139                                 regulator-always-on;
140                                 regulator-boot-on;
141                                 regulator-min-microvolt = <3300000>;
142                                 regulator-max-microvolt = <3300000>;
143                                 regulator-name = "vcc_io";
144                                 regulator-state-mem {
145                                         regulator-on-in-suspend;
146                                         regulator-suspend-microvolt = <3300000>;
147                                 };
148                         };
149
150                         vccio_pmu: LDO_REG1 {
151                                 regulator-always-on;
152                                 regulator-boot-on;
153                                 regulator-min-microvolt = <3300000>;
154                                 regulator-max-microvolt = <3300000>;
155                                 regulator-name = "vccio_pmu";
156                                 regulator-state-mem {
157                                         regulator-on-in-suspend;
158                                         regulator-suspend-microvolt = <3300000>;
159                                 };
160                         };
161
162                         vcc_tp: LDO_REG2 {
163                                 regulator-always-on;
164                                 regulator-boot-on;
165                                 regulator-min-microvolt = <3300000>;
166                                 regulator-max-microvolt = <3300000>;
167                                 regulator-name = "vcc_tp";
168                                 regulator-state-mem {
169                                         regulator-off-in-suspend;
170                                 };
171                         };
172
173                         vdd_10: LDO_REG3 {
174                                 regulator-always-on;
175                                 regulator-boot-on;
176                                 regulator-min-microvolt = <1000000>;
177                                 regulator-max-microvolt = <1000000>;
178                                 regulator-name = "vdd_10";
179                                 regulator-state-mem {
180                                         regulator-on-in-suspend;
181                                         regulator-suspend-microvolt = <1000000>;
182                                 };
183                         };
184
185                         vcc18_lcd: LDO_REG4 {
186                                 regulator-always-on;
187                                 regulator-boot-on;
188                                 regulator-min-microvolt = <1800000>;
189                                 regulator-max-microvolt = <1800000>;
190                                 regulator-name = "vcc18_lcd";
191                                 regulator-state-mem {
192                                         regulator-on-in-suspend;
193                                         regulator-suspend-microvolt = <1800000>;
194                                 };
195                         };
196
197                         vccio_sd: LDO_REG5 {
198                                 regulator-always-on;
199                                 regulator-boot-on;
200                                 regulator-min-microvolt = <1800000>;
201                                 regulator-max-microvolt = <3300000>;
202                                 regulator-name = "vccio_sd";
203                                 regulator-state-mem {
204                                         regulator-on-in-suspend;
205                                         regulator-suspend-microvolt = <3300000>;
206                                 };
207                         };
208
209                         vdd10_lcd: LDO_REG6 {
210                                 regulator-always-on;
211                                 regulator-boot-on;
212                                 regulator-min-microvolt = <1000000>;
213                                 regulator-max-microvolt = <1000000>;
214                                 regulator-name = "vdd10_lcd";
215                                 regulator-state-mem {
216                                         regulator-on-in-suspend;
217                                         regulator-suspend-microvolt = <1000000>;
218                                 };
219                         };
220
221                         vcc_18: LDO_REG7 {
222                                 regulator-always-on;
223                                 regulator-boot-on;
224                                 regulator-min-microvolt = <1800000>;
225                                 regulator-max-microvolt = <1800000>;
226                                 regulator-name = "vcc_18";
227                                 regulator-state-mem {
228                                         regulator-on-in-suspend;
229                                         regulator-suspend-microvolt = <1800000>;
230                                 };
231                         };
232
233                         vcca_codec: LDO_REG8 {
234                                 regulator-always-on;
235                                 regulator-boot-on;
236                                 regulator-min-microvolt = <3300000>;
237                                 regulator-max-microvolt = <3300000>;
238                                 regulator-name = "vcca_codec";
239                                 regulator-state-mem {
240                                         regulator-on-in-suspend;
241                                         regulator-suspend-microvolt = <3300000>;
242                                 };
243                         };
244
245                         vcc_wl: SWITCH_REG1 {
246                                 regulator-always-on;
247                                 regulator-boot-on;
248                                 regulator-name = "vcc_wl";
249                                 regulator-state-mem {
250                                         regulator-on-in-suspend;
251                                 };
252                         };
253
254                         vcc_lcd: SWITCH_REG2 {
255                                 regulator-always-on;
256                                 regulator-boot-on;
257                                 regulator-name = "vcc_lcd";
258                                 regulator-state-mem {
259                                         regulator-on-in-suspend;
260                                 };
261                         };
262                 };
263         };
264 };
265
266 &edp_panel {
267         power-supply = <&vcc_lcd>;
268 };
269
270 &gmac {
271         phy-supply = <&vcc_phy>;
272         phy-mode = "rgmii";
273         clock_in_out = "input";
274         snps,reset-gpio = <&gpio4 7 0>;
275         snps,reset-active-low;
276         snps,reset-delays-us = <0 10000 1000000>;
277         assigned-clocks = <&cru SCLK_MAC>;
278         assigned-clock-parents = <&ext_gmac>;
279         pinctrl-names = "default";
280         pinctrl-0 = <&rgmii_pins>;
281         tx_delay = <0x30>;
282         rx_delay = <0x10>;
283         status = "ok";
284 };
285
286 &lvds_panel {
287         power-supply = <&vcc_lcd>;
288 };