Merge tag 'lsk-v4.4-16.07-android'
[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         };
109
110         vdd_gpu: syr828@41 {
111                 compatible = "silergy,syr828";
112                 fcs,suspend-voltage-selector = <1>;
113                 reg = <0x41>;
114                 regulator-name = "vdd_gpu";
115                 regulator-min-microvolt = <850000>;
116                 regulator-max-microvolt = <1350000>;
117                 regulator-always-on;
118                 vin-supply = <&vcc_sys>;
119         };
120
121         hym8563: hym8563@51 {
122                 compatible = "haoyu,hym8563";
123                 reg = <0x51>;
124
125                 interrupt-parent = <&gpio0>;
126                 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
127
128                 pinctrl-names = "default";
129                 pinctrl-0 = <&pmic_int>;
130
131                 #clock-cells = <0>;
132                 clock-output-names = "xin32k";
133         };
134
135         act8846: act8846@5a {
136                 compatible = "active-semi,act8846";
137                 reg = <0x5a>;
138                 status = "okay";
139
140                 vp1-supply = <&vcc_sys>;
141                 vp2-supply = <&vcc_sys>;
142                 vp3-supply = <&vcc_sys>;
143                 vp4-supply = <&vcc_sys>;
144                 inl1-supply = <&vcc_io>;
145                 inl2-supply = <&vcc_sys>;
146                 inl3-supply = <&vcc_20>;
147
148                 regulators {
149                         vcc_ddr: REG1 {
150                                 regulator-name = "VCC_DDR";
151                                 regulator-min-microvolt = <1200000>;
152                                 regulator-max-microvolt = <1200000>;
153                                 regulator-always-on;
154                         };
155
156                         vcc_io: REG2 {
157                                 regulator-name = "VCC_IO";
158                                 regulator-min-microvolt = <3300000>;
159                                 regulator-max-microvolt = <3300000>;
160                                 regulator-always-on;
161                         };
162
163                         vdd_log: REG3 {
164                                 regulator-name = "VDD_LOG";
165                                 regulator-min-microvolt = <1000000>;
166                                 regulator-max-microvolt = <1000000>;
167                                 regulator-always-on;
168                         };
169
170                         vcc_20: REG4 {
171                                 regulator-name = "VCC_20";
172                                 regulator-min-microvolt = <2000000>;
173                                 regulator-max-microvolt = <2000000>;
174                                 regulator-always-on;
175                         };
176
177                         vccio_sd: REG5 {
178                                 regulator-name = "VCCIO_SD";
179                                 regulator-min-microvolt = <1800000>;
180                                 regulator-max-microvolt = <3300000>;
181                                 regulator-always-on;
182                         };
183
184                         vdd10_lcd: REG6 {
185                                 regulator-name = "VDD10_LCD";
186                                 regulator-min-microvolt = <1000000>;
187                                 regulator-max-microvolt = <1000000>;
188                                 regulator-always-on;
189                         };
190
191                         vcca_codec: REG7 {
192                                 regulator-name = "VCCA_CODEC";
193                                 regulator-min-microvolt = <3300000>;
194                                 regulator-max-microvolt = <3300000>;
195                                 regulator-always-on;
196                         };
197
198                         vcca_tp: REG8 {
199                                 regulator-name = "VCCA_TP";
200                                 regulator-min-microvolt = <3300000>;
201                                 regulator-max-microvolt = <3300000>;
202                                 regulator-always-on;
203                         };
204
205                         vccio_pmu: REG9 {
206                                 regulator-name = "VCCIO_PMU";
207                                 regulator-min-microvolt = <3300000>;
208                                 regulator-max-microvolt = <3300000>;
209                                 regulator-always-on;
210                         };
211
212                         vdd_10: REG10 {
213                                 regulator-name = "VDD_10";
214                                 regulator-min-microvolt = <1000000>;
215                                 regulator-max-microvolt = <1000000>;
216                                 regulator-always-on;
217                         };
218
219                         vcc_18: REG11 {
220                                 regulator-name = "VCC_18";
221                                 regulator-min-microvolt = <1800000>;
222                                 regulator-max-microvolt = <1800000>;
223                                 regulator-always-on;
224                         };
225
226                         vcc18_lcd: REG12 {
227                                 regulator-name = "VCC18_LCD";
228                                 regulator-min-microvolt = <1800000>;
229                                 regulator-max-microvolt = <1800000>;
230                                 regulator-always-on;
231                         };
232                 };
233         };
234 };
235
236 &lvds_panel {
237         power-supply = <&vcc_lcd>;
238 };
239
240 &panel {
241         power-supply = <&vcc_lcd>;
242 };
243
244 &pinctrl {
245         lcd {
246                 lcd_en: lcd-en  {
247                         rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_none>;
248                 };
249         };
250
251         wifi {
252                 wifi_pwr: wifi-pwr {
253                         rockchip,pins = <7 9 RK_FUNC_GPIO &pcfg_pull_none>;
254                 };
255         };
256 };