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