ARM: dts: rockchip: rk3288 re-name dts files
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-evb-act8846.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
44 / {
45         compatible = "rockchip,rk3288-evb-act8846", "rockchip,rk3288";
46
47         backlight: backlight {
48                 compatible = "pwm-backlight";
49                 brightness-levels = <
50                           0   1   2   3   4   5   6   7
51                           8   9  10  11  12  13  14  15
52                          16  17  18  19  20  21  22  23
53                          24  25  26  27  28  29  30  31
54                          32  33  34  35  36  37  38  39
55                          40  41  42  43  44  45  46  47
56                          48  49  50  51  52  53  54  55
57                          56  57  58  59  60  61  62  63
58                          64  65  66  67  68  69  70  71
59                          72  73  74  75  76  77  78  79
60                          80  81  82  83  84  85  86  87
61                          88  89  90  91  92  93  94  95
62                          96  97  98  99 100 101 102 103
63                         104 105 106 107 108 109 110 111
64                         112 113 114 115 116 117 118 119
65                         120 121 122 123 124 125 126 127
66                         128 129 130 131 132 133 134 135
67                         136 137 138 139 140 141 142 143
68                         144 145 146 147 148 149 150 151
69                         152 153 154 155 156 157 158 159
70                         160 161 162 163 164 165 166 167
71                         168 169 170 171 172 173 174 175
72                         176 177 178 179 180 181 182 183
73                         184 185 186 187 188 189 190 191
74                         192 193 194 195 196 197 198 199
75                         200 201 202 203 204 205 206 207
76                         208 209 210 211 212 213 214 215
77                         216 217 218 219 220 221 222 223
78                         224 225 226 227 228 229 230 231
79                         232 233 234 235 236 237 238 239
80                         240 241 242 243 244 245 246 247
81                         248 249 250 251 252 253 254 255>;
82                 default-brightness-level = <128>;
83                 enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
84                 pinctrl-names = "default";
85                 pinctrl-0 = <&bl_en>;
86                 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
87         };
88
89         adc-keys {
90                 compatible = "adc-keys";
91                 io-channels = <&saradc 1>;
92                 io-channel-names = "buttons";
93                 poll-interval = <100>;
94                 keyup-threshold-microvolt = <1800000>;
95
96                 button-up {
97                         label = "Volume Up";
98                         linux,code = <KEY_VOLUMEUP>;
99                         press-threshold-microvolt = <100000>;
100                 };
101
102                 button-down {
103                         label = "Volume Down";
104                         linux,code = <KEY_VOLUMEDOWN>;
105                         press-threshold-microvolt = <300000>;
106                 };
107
108                 menu {
109                         label = "Menu";
110                         linux,code = <KEY_MENU>;
111                         press-threshold-microvolt = <640000>;
112                 };
113
114                 esc {
115                         label = "Esc";
116                         linux,code = <KEY_ESC>;
117                         press-threshold-microvolt = <1000000>;
118                 };
119
120                 home  {
121                         label = "Home";
122                         linux,code = <KEY_HOME>;
123                         press-threshold-microvolt = <1300000>;
124                 };
125         };
126
127         gpio-keys {
128                 compatible = "gpio-keys";
129                 #address-cells = <1>;
130                 #size-cells = <0>;
131                 autorepeat;
132
133                 pinctrl-names = "default";
134                 pinctrl-0 = <&pwrbtn>;
135
136                 button@0 {
137                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
138                         linux,code = <116>;
139                         label = "GPIO Key Power";
140                         linux,input-type = <1>;
141                         gpio-key,wakeup = <1>;
142                         debounce-interval = <100>;
143                 };
144         };
145
146         sdio_pwrseq: sdio-pwrseq {
147                 compatible = "mmc-pwrseq-simple";
148                 clocks = <&hym8563>;
149                 clock-names = "ext_clock";
150                 pinctrl-names = "default";
151                 pinctrl-0 = <&wifi_enable_h>;
152
153                 /*
154                  * On the module itself this is one of these (depending
155                  * on the actual card populated):
156                  * - SDIO_RESET_L_WL_REG_ON
157                  * - PDN (power down when low)
158                  */
159                 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
160         };
161
162         vcc_lcd: vcc-lcd {
163                 compatible = "regulator-fixed";
164                 enable-active-high;
165                 gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>;
166                 pinctrl-names = "default";
167                 pinctrl-0 = <&lcd_en>;
168                 regulator-name = "vcc_lcd";
169                 vin-supply = <&vcc_io>;
170         };
171
172         vcc_wl: vcc-wl {
173                 compatible = "regulator-fixed";
174                 enable-active-high;
175                 gpio = <&gpio7 9 GPIO_ACTIVE_HIGH>;
176                 pinctrl-names = "default";
177                 pinctrl-0 = <&wifi_pwr>;
178                 regulator-name = "vcc_wl";
179                 vin-supply = <&vcc_18>;
180         };
181 };
182
183 &cpu0 {
184         cpu0-supply = <&vdd_cpu>;
185 };
186
187 &edp {
188         vcc-supply = <&vdd10_lcd>;
189         vccio-supply = <&vcc18_lcd>;
190         status = "okay";
191 };
192
193 &edp_phy {
194         status = "okay";
195 };
196
197 &edp_panel {
198         status = "okay";
199         compatible ="lg,lp079qx1-sp0v", "simple-panel";
200         backlight = <&backlight>;
201         enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
202         pinctrl-0 = <&lcd_cs>;
203 };
204
205 &gpu {
206         status = "okay";
207         mali-supply = <&vdd_gpu>;
208 };
209
210 &i2c0 {
211         clock-frequency = <400000>;
212
213         vdd_cpu: syr827@40 {
214                 compatible = "silergy,syr827";
215                 fcs,suspend-voltage-selector = <1>;
216                 reg = <0x40>;
217                 regulator-name = "vdd_cpu";
218                 regulator-min-microvolt = <850000>;
219                 regulator-max-microvolt = <1350000>;
220                 regulator-always-on;
221                 regulator-boot-on;
222                 regulator-enable-ramp-delay = <300>;
223                 regulator-ramp-delay = <8000>;
224                 vin-supply = <&vcc_sys>;
225                 regulator-state-mem {
226                         regulator-off-in-suspend;
227                 };
228         };
229
230         vdd_gpu: syr828@41 {
231                 compatible = "silergy,syr828";
232                 fcs,suspend-voltage-selector = <1>;
233                 reg = <0x41>;
234                 regulator-name = "vdd_gpu";
235                 regulator-min-microvolt = <850000>;
236                 regulator-max-microvolt = <1350000>;
237                 regulator-always-on;
238                 regulator-ramp-delay = <6000>;
239                 vin-supply = <&vcc_sys>;
240                 regulator-state-mem {
241                         regulator-off-in-suspend;
242                 };
243         };
244
245         hym8563: hym8563@51 {
246                 compatible = "haoyu,hym8563";
247                 reg = <0x51>;
248
249                 interrupt-parent = <&gpio0>;
250                 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
251
252                 pinctrl-names = "default";
253                 pinctrl-0 = <&pmic_int>;
254
255                 #clock-cells = <0>;
256                 clock-output-names = "xin32k";
257         };
258
259         act8846: act8846@5a {
260                 compatible = "active-semi,act8846";
261                 reg = <0x5a>;
262                 status = "okay";
263
264                 vp1-supply = <&vcc_sys>;
265                 vp2-supply = <&vcc_sys>;
266                 vp3-supply = <&vcc_sys>;
267                 vp4-supply = <&vcc_sys>;
268                 inl1-supply = <&vcc_io>;
269                 inl2-supply = <&vcc_sys>;
270                 inl3-supply = <&vcc_20>;
271
272                 regulators {
273                         vcc_ddr: REG1 {
274                                 regulator-name = "VCC_DDR";
275                                 regulator-min-microvolt = <1200000>;
276                                 regulator-max-microvolt = <1200000>;
277                                 regulator-always-on;
278                         };
279
280                         vcc_io: REG2 {
281                                 regulator-name = "VCC_IO";
282                                 regulator-min-microvolt = <3300000>;
283                                 regulator-max-microvolt = <3300000>;
284                                 regulator-always-on;
285                         };
286
287                         vdd_log: REG3 {
288                                 regulator-name = "VDD_LOG";
289                                 regulator-min-microvolt = <1150000>;
290                                 regulator-max-microvolt = <1150000>;
291                                 regulator-always-on;
292                         };
293
294                         vcc_20: REG4 {
295                                 regulator-name = "VCC_20";
296                                 regulator-min-microvolt = <2000000>;
297                                 regulator-max-microvolt = <2000000>;
298                                 regulator-always-on;
299                         };
300
301                         vccio_sd: REG5 {
302                                 regulator-name = "VCCIO_SD";
303                                 regulator-min-microvolt = <1800000>;
304                                 regulator-max-microvolt = <3300000>;
305                                 regulator-always-on;
306                         };
307
308                         vdd10_lcd: REG6 {
309                                 regulator-name = "VDD10_LCD";
310                                 regulator-min-microvolt = <1000000>;
311                                 regulator-max-microvolt = <1000000>;
312                                 regulator-always-on;
313                         };
314
315                         vcca_codec: REG7 {
316                                 regulator-name = "VCCA_CODEC";
317                                 regulator-min-microvolt = <3300000>;
318                                 regulator-max-microvolt = <3300000>;
319                                 regulator-always-on;
320                         };
321
322                         vcca_tp: REG8 {
323                                 regulator-name = "VCCA_TP";
324                                 regulator-min-microvolt = <3300000>;
325                                 regulator-max-microvolt = <3300000>;
326                                 regulator-always-on;
327                         };
328
329                         vccio_pmu: REG9 {
330                                 regulator-name = "VCCIO_PMU";
331                                 regulator-min-microvolt = <3300000>;
332                                 regulator-max-microvolt = <3300000>;
333                                 regulator-always-on;
334                         };
335
336                         vdd_10: REG10 {
337                                 regulator-name = "VDD_10";
338                                 regulator-min-microvolt = <1000000>;
339                                 regulator-max-microvolt = <1000000>;
340                                 regulator-always-on;
341                         };
342
343                         vcc_18: REG11 {
344                                 regulator-name = "VCC_18";
345                                 regulator-min-microvolt = <1800000>;
346                                 regulator-max-microvolt = <1800000>;
347                                 regulator-always-on;
348                         };
349
350                         vcc18_lcd: REG12 {
351                                 regulator-name = "VCC18_LCD";
352                                 regulator-min-microvolt = <1800000>;
353                                 regulator-max-microvolt = <1800000>;
354                                 regulator-always-on;
355                         };
356                 };
357         };
358 };
359
360 &i2c1 {
361         status = "okay";
362         clock-frequency = <400000>;
363
364         mpu6050@68 {
365                 compatible = "invensense,mpu6050";
366                 status = "okay";
367                 pinctrl-names = "default";
368                 pinctrl-0 = <&mpu6050_irq_gpio>;
369                 reg = <0x68>;
370                 irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>;
371                 mpu-int_config = <0x10>;
372                 mpu-level_shifter = <0>;
373                 mpu-orientation = <0 1 0 1 0 0 0 0 1>;
374                 orientation-x= <0>;
375                 orientation-y= <1>;
376                 orientation-z= <0>;
377                 support-hw-poweroff = <1>;
378                 mpu-debug = <1>;
379         };
380 };
381
382 &rga {
383         status = "okay";
384 };
385
386 &sound {
387         status = "okay";
388 };
389
390 &uart2 {
391         status = "okay";
392 };
393
394 &pinctrl {
395         backlight {
396                 bl_en: bl-en {
397                         rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
398                 };
399         };
400
401         buttons {
402                 pwrbtn: pwrbtn {
403                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
404                 };
405         };
406
407         lcd {
408                 lcd_en: lcd-en  {
409                         rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_none>;
410                 };
411         };
412
413         wifi {
414                 wifi_pwr: wifi-pwr {
415                         rockchip,pins = <7 9 RK_FUNC_GPIO &pcfg_pull_none>;
416                 };
417         };
418
419         mpu6050 {
420                 mpu6050_irq_gpio: mpu6050-irq-gpio {
421                         rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_none>;
422                 };
423         };
424 };