ARM: dts: rk3288: support AP6335 wifi for rk3288-evb
[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
44 / {
45         compatible = "rockchip,rk3288-evb-rk808", "rockchip,rk3288";
46
47         ext_gmac: external-gmac-clock {
48                 compatible = "fixed-clock";
49                 clock-frequency = <125000000>;
50                 clock-output-names = "ext_gmac";
51                 #clock-cells = <0>;
52         };
53
54         sdio_pwrseq: sdio-pwrseq {
55                 compatible = "mmc-pwrseq-simple";
56                 clocks = <&rk808 1>;
57                 clock-names = "ext_clock";
58                 pinctrl-names = "default";
59                 pinctrl-0 = <&wifi_enable_h>;
60
61                 /*
62                  * On the module itself this is one of these (depending
63                  * on the actual card populated):
64                  * - SDIO_RESET_L_WL_REG_ON
65                  * - PDN (power down when low)
66                  */
67                 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
68         };
69 };
70
71 &cpu0 {
72         cpu0-supply = <&vdd_cpu>;
73 };
74
75 &i2c0 {
76         clock-frequency = <400000>;
77
78         rk808: pmic@1b {
79                 compatible = "rockchip,rk808";
80                 reg = <0x1b>;
81                 interrupt-parent = <&gpio0>;
82                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
83                 pinctrl-names = "default";
84                 pinctrl-0 = <&pmic_int &global_pwroff>;
85                 rockchip,system-power-controller;
86                 wakeup-source;
87                 #clock-cells = <1>;
88                 clock-output-names = "xin32k", "rk808-clkout2";
89
90                 vcc1-supply = <&vcc_sys>;
91                 vcc2-supply = <&vcc_sys>;
92                 vcc3-supply = <&vcc_sys>;
93                 vcc4-supply = <&vcc_sys>;
94                 vcc6-supply = <&vcc_sys>;
95                 vcc7-supply = <&vcc_sys>;
96                 vcc8-supply = <&vcc_18>;
97                 vcc9-supply = <&vcc_io>;
98                 vcc10-supply = <&vcc_io>;
99                 vcc11-supply = <&vcc_sys>;
100                 vcc12-supply = <&vcc_io>;
101                 vddio-supply = <&vccio_pmu>;
102
103                 regulators {
104                         vdd_cpu: DCDC_REG1 {
105                                 regulator-always-on;
106                                 regulator-boot-on;
107                                 regulator-min-microvolt = <750000>;
108                                 regulator-max-microvolt = <1350000>;
109                                 regulator-name = "vdd_arm";
110                                 regulator-state-mem {
111                                         regulator-off-in-suspend;
112                                 };
113                         };
114
115                         vdd_gpu: DCDC_REG2 {
116                                 regulator-always-on;
117                                 regulator-boot-on;
118                                 regulator-min-microvolt = <850000>;
119                                 regulator-max-microvolt = <1250000>;
120                                 regulator-name = "vdd_gpu";
121                                 regulator-state-mem {
122                                         regulator-on-in-suspend;
123                                         regulator-suspend-microvolt = <1000000>;
124                                 };
125                         };
126
127                         vcc_ddr: DCDC_REG3 {
128                                 regulator-always-on;
129                                 regulator-boot-on;
130                                 regulator-name = "vcc_ddr";
131                                 regulator-state-mem {
132                                         regulator-on-in-suspend;
133                                 };
134                         };
135
136                         vcc_io: DCDC_REG4 {
137                                 regulator-always-on;
138                                 regulator-boot-on;
139                                 regulator-min-microvolt = <3300000>;
140                                 regulator-max-microvolt = <3300000>;
141                                 regulator-name = "vcc_io";
142                                 regulator-state-mem {
143                                         regulator-on-in-suspend;
144                                         regulator-suspend-microvolt = <3300000>;
145                                 };
146                         };
147
148                         vccio_pmu: LDO_REG1 {
149                                 regulator-always-on;
150                                 regulator-boot-on;
151                                 regulator-min-microvolt = <3300000>;
152                                 regulator-max-microvolt = <3300000>;
153                                 regulator-name = "vccio_pmu";
154                                 regulator-state-mem {
155                                         regulator-on-in-suspend;
156                                         regulator-suspend-microvolt = <3300000>;
157                                 };
158                         };
159
160                         vcc_tp: LDO_REG2 {
161                                 regulator-always-on;
162                                 regulator-boot-on;
163                                 regulator-min-microvolt = <3300000>;
164                                 regulator-max-microvolt = <3300000>;
165                                 regulator-name = "vcc_tp";
166                                 regulator-state-mem {
167                                         regulator-off-in-suspend;
168                                 };
169                         };
170
171                         vdd_10: LDO_REG3 {
172                                 regulator-always-on;
173                                 regulator-boot-on;
174                                 regulator-min-microvolt = <1000000>;
175                                 regulator-max-microvolt = <1000000>;
176                                 regulator-name = "vdd_10";
177                                 regulator-state-mem {
178                                         regulator-on-in-suspend;
179                                         regulator-suspend-microvolt = <1000000>;
180                                 };
181                         };
182
183                         vcc18_lcd: LDO_REG4 {
184                                 regulator-always-on;
185                                 regulator-boot-on;
186                                 regulator-min-microvolt = <1800000>;
187                                 regulator-max-microvolt = <1800000>;
188                                 regulator-name = "vcc18_lcd";
189                                 regulator-state-mem {
190                                         regulator-on-in-suspend;
191                                         regulator-suspend-microvolt = <1800000>;
192                                 };
193                         };
194
195                         vccio_sd: LDO_REG5 {
196                                 regulator-always-on;
197                                 regulator-boot-on;
198                                 regulator-min-microvolt = <1800000>;
199                                 regulator-max-microvolt = <3300000>;
200                                 regulator-name = "vccio_sd";
201                                 regulator-state-mem {
202                                         regulator-on-in-suspend;
203                                         regulator-suspend-microvolt = <3300000>;
204                                 };
205                         };
206
207                         vdd10_lcd: LDO_REG6 {
208                                 regulator-always-on;
209                                 regulator-boot-on;
210                                 regulator-min-microvolt = <1000000>;
211                                 regulator-max-microvolt = <1000000>;
212                                 regulator-name = "vdd10_lcd";
213                                 regulator-state-mem {
214                                         regulator-on-in-suspend;
215                                         regulator-suspend-microvolt = <1000000>;
216                                 };
217                         };
218
219                         vcc_18: LDO_REG7 {
220                                 regulator-always-on;
221                                 regulator-boot-on;
222                                 regulator-min-microvolt = <1800000>;
223                                 regulator-max-microvolt = <1800000>;
224                                 regulator-name = "vcc_18";
225                                 regulator-state-mem {
226                                         regulator-on-in-suspend;
227                                         regulator-suspend-microvolt = <1800000>;
228                                 };
229                         };
230
231                         vcca_codec: LDO_REG8 {
232                                 regulator-always-on;
233                                 regulator-boot-on;
234                                 regulator-min-microvolt = <3300000>;
235                                 regulator-max-microvolt = <3300000>;
236                                 regulator-name = "vcca_codec";
237                                 regulator-state-mem {
238                                         regulator-on-in-suspend;
239                                         regulator-suspend-microvolt = <3300000>;
240                                 };
241                         };
242
243                         vcc_wl: SWITCH_REG1 {
244                                 regulator-always-on;
245                                 regulator-boot-on;
246                                 regulator-name = "vcc_wl";
247                                 regulator-state-mem {
248                                         regulator-on-in-suspend;
249                                 };
250                         };
251
252                         vcc_lcd: SWITCH_REG2 {
253                                 regulator-always-on;
254                                 regulator-boot-on;
255                                 regulator-name = "vcc_lcd";
256                                 regulator-state-mem {
257                                         regulator-on-in-suspend;
258                                 };
259                         };
260                 };
261         };
262 };
263
264 &gmac {
265         phy-supply = <&vcc_phy>;
266         phy-mode = "rgmii";
267         clock_in_out = "input";
268         snps,reset-gpio = <&gpio4 7 0>;
269         snps,reset-active-low;
270         snps,reset-delays-us = <0 10000 1000000>;
271         assigned-clocks = <&cru SCLK_MAC>;
272         assigned-clock-parents = <&ext_gmac>;
273         pinctrl-names = "default";
274         pinctrl-0 = <&rgmii_pins>;
275         tx_delay = <0x30>;
276         rx_delay = <0x10>;
277         status = "ok";
278 };
279
280 &lvds_panel {
281         power-supply = <&vcc_lcd>;
282 };
283
284 &panel {
285         power-supply = <&vcc_lcd>;
286 };