ARM64: DTS: Add rk3399-firefly uart4 device, node as /dev/ttyS1
[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 #include "rk3288-android.dtsi"
44
45 / {
46         compatible = "rockchip,rk3288-evb-act8846", "rockchip,rk3288";
47
48         sdio_pwrseq: sdio-pwrseq {
49                 compatible = "mmc-pwrseq-simple";
50                 clocks = <&hym8563>;
51                 clock-names = "ext_clock";
52                 pinctrl-names = "default";
53                 pinctrl-0 = <&wifi_enable_h>;
54
55                 /*
56                  * On the module itself this is one of these (depending
57                  * on the actual card populated):
58                  * - SDIO_RESET_L_WL_REG_ON
59                  * - PDN (power down when low)
60                  */
61                 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
62         };
63
64         vcc_lcd: vcc-lcd {
65                 compatible = "regulator-fixed";
66                 enable-active-high;
67                 gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>;
68                 pinctrl-names = "default";
69                 pinctrl-0 = <&lcd_en>;
70                 regulator-name = "vcc_lcd";
71                 vin-supply = <&vcc_io>;
72         };
73
74         vcc_wl: vcc-wl {
75                 compatible = "regulator-fixed";
76                 enable-active-high;
77                 gpio = <&gpio7 9 GPIO_ACTIVE_HIGH>;
78                 pinctrl-names = "default";
79                 pinctrl-0 = <&wifi_pwr>;
80                 regulator-name = "vcc_wl";
81                 vin-supply = <&vcc_18>;
82         };
83 };
84
85 &cpu0 {
86         cpu0-supply = <&vdd_cpu>;
87 };
88
89 &edp {
90         vcc-supply = <&vdd10_lcd>;
91         vccio-supply = <&vcc18_lcd>;
92 };
93
94 &gpu {
95         status = "okay";
96         mali-supply = <&vdd_gpu>;
97 };
98
99 &i2c0 {
100         clock-frequency = <400000>;
101
102         vdd_cpu: syr827@40 {
103                 compatible = "silergy,syr827";
104                 fcs,suspend-voltage-selector = <1>;
105                 reg = <0x40>;
106                 regulator-name = "vdd_cpu";
107                 regulator-min-microvolt = <850000>;
108                 regulator-max-microvolt = <1350000>;
109                 regulator-always-on;
110                 regulator-boot-on;
111                 regulator-enable-ramp-delay = <300>;
112                 regulator-ramp-delay = <8000>;
113                 vin-supply = <&vcc_sys>;
114                 regulator-state-mem {
115                         regulator-off-in-suspend;
116                 };
117         };
118
119         vdd_gpu: syr828@41 {
120                 compatible = "silergy,syr828";
121                 fcs,suspend-voltage-selector = <1>;
122                 reg = <0x41>;
123                 regulator-name = "vdd_gpu";
124                 regulator-min-microvolt = <850000>;
125                 regulator-max-microvolt = <1350000>;
126                 regulator-always-on;
127                 regulator-ramp-delay = <6000>;
128                 vin-supply = <&vcc_sys>;
129                 regulator-state-mem {
130                         regulator-off-in-suspend;
131                 };
132         };
133
134         hym8563: hym8563@51 {
135                 compatible = "haoyu,hym8563";
136                 reg = <0x51>;
137
138                 interrupt-parent = <&gpio0>;
139                 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
140
141                 pinctrl-names = "default";
142                 pinctrl-0 = <&pmic_int>;
143
144                 #clock-cells = <0>;
145                 clock-output-names = "xin32k";
146         };
147
148         act8846: act8846@5a {
149                 compatible = "active-semi,act8846";
150                 reg = <0x5a>;
151                 status = "okay";
152
153                 vp1-supply = <&vcc_sys>;
154                 vp2-supply = <&vcc_sys>;
155                 vp3-supply = <&vcc_sys>;
156                 vp4-supply = <&vcc_sys>;
157                 inl1-supply = <&vcc_io>;
158                 inl2-supply = <&vcc_sys>;
159                 inl3-supply = <&vcc_20>;
160
161                 regulators {
162                         vcc_ddr: REG1 {
163                                 regulator-name = "VCC_DDR";
164                                 regulator-min-microvolt = <1200000>;
165                                 regulator-max-microvolt = <1200000>;
166                                 regulator-always-on;
167                         };
168
169                         vcc_io: REG2 {
170                                 regulator-name = "VCC_IO";
171                                 regulator-min-microvolt = <3300000>;
172                                 regulator-max-microvolt = <3300000>;
173                                 regulator-always-on;
174                         };
175
176                         vdd_log: REG3 {
177                                 regulator-name = "VDD_LOG";
178                                 regulator-min-microvolt = <1150000>;
179                                 regulator-max-microvolt = <1150000>;
180                                 regulator-always-on;
181                         };
182
183                         vcc_20: REG4 {
184                                 regulator-name = "VCC_20";
185                                 regulator-min-microvolt = <2000000>;
186                                 regulator-max-microvolt = <2000000>;
187                                 regulator-always-on;
188                         };
189
190                         vccio_sd: REG5 {
191                                 regulator-name = "VCCIO_SD";
192                                 regulator-min-microvolt = <1800000>;
193                                 regulator-max-microvolt = <3300000>;
194                                 regulator-always-on;
195                         };
196
197                         vdd10_lcd: REG6 {
198                                 regulator-name = "VDD10_LCD";
199                                 regulator-min-microvolt = <1000000>;
200                                 regulator-max-microvolt = <1000000>;
201                                 regulator-always-on;
202                         };
203
204                         vcca_codec: REG7 {
205                                 regulator-name = "VCCA_CODEC";
206                                 regulator-min-microvolt = <3300000>;
207                                 regulator-max-microvolt = <3300000>;
208                                 regulator-always-on;
209                         };
210
211                         vcca_tp: REG8 {
212                                 regulator-name = "VCCA_TP";
213                                 regulator-min-microvolt = <3300000>;
214                                 regulator-max-microvolt = <3300000>;
215                                 regulator-always-on;
216                         };
217
218                         vccio_pmu: REG9 {
219                                 regulator-name = "VCCIO_PMU";
220                                 regulator-min-microvolt = <3300000>;
221                                 regulator-max-microvolt = <3300000>;
222                                 regulator-always-on;
223                         };
224
225                         vdd_10: REG10 {
226                                 regulator-name = "VDD_10";
227                                 regulator-min-microvolt = <1000000>;
228                                 regulator-max-microvolt = <1000000>;
229                                 regulator-always-on;
230                         };
231
232                         vcc_18: REG11 {
233                                 regulator-name = "VCC_18";
234                                 regulator-min-microvolt = <1800000>;
235                                 regulator-max-microvolt = <1800000>;
236                                 regulator-always-on;
237                         };
238
239                         vcc18_lcd: REG12 {
240                                 regulator-name = "VCC18_LCD";
241                                 regulator-min-microvolt = <1800000>;
242                                 regulator-max-microvolt = <1800000>;
243                                 regulator-always-on;
244                         };
245                 };
246         };
247 };
248
249 &edp_panel {
250         power-supply = <&vcc_lcd>;
251 };
252
253 &i2c1 {
254         status = "okay";
255         clock-frequency = <400000>;
256
257         mpu6050@68 {
258                 compatible = "invensense,mpu6050";
259                 status = "okay";
260                 pinctrl-names = "default";
261                 pinctrl-0 = <&mpu6050_irq_gpio>;
262                 reg = <0x68>;
263                 irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>;
264                 mpu-int_config = <0x10>;
265                 mpu-level_shifter = <0>;
266                 mpu-orientation = <0 1 0 1 0 0 0 0 1>;
267                 orientation-x= <0>;
268                 orientation-y= <1>;
269                 orientation-z= <0>;
270                 support-hw-poweroff = <1>;
271                 mpu-debug = <1>;
272         };
273 };
274
275 &lvds_panel {
276         power-supply = <&vcc_lcd>;
277 };
278
279 &pinctrl {
280         lcd {
281                 lcd_en: lcd-en  {
282                         rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_none>;
283                 };
284         };
285
286         wifi {
287                 wifi_pwr: wifi-pwr {
288                         rockchip,pins = <7 9 RK_FUNC_GPIO &pcfg_pull_none>;
289                 };
290         };
291
292         mpu6050 {
293                 mpu6050_irq_gpio: mpu6050-irq-gpio {
294                         rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_none>;
295                 };
296         };
297 };