Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / rk3288-rock2-som.dtsi
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 #include <dt-bindings/pwm/pwm.h>
42 #include "rk3288.dtsi"
43
44 / {
45         memory@0 {
46                 reg = <0x0 0x80000000>;
47                 device_type = "memory";
48         };
49
50         emmc_pwrseq: emmc-pwrseq {
51                 compatible = "mmc-pwrseq-emmc";
52                 pinctrl-0 = <&emmc_reset>;
53                 pinctrl-names = "default";
54                 reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
55         };
56
57         ext_gmac: external-gmac-clock {
58                 compatible = "fixed-clock";
59                 #clock-cells = <0>;
60                 clock-frequency = <125000000>;
61                 clock-output-names = "ext_gmac";
62         };
63
64         vcc_flash: flash-regulator {
65                 compatible = "regulator-fixed";
66                 regulator-name = "vcc_sys";
67                 regulator-min-microvolt = <1800000>;
68                 regulator-max-microvolt = <1800000>;
69                 startup-delay-us = <150>;
70                 vin-supply = <&vcc_io>;
71         };
72
73         vcc_sys: vsys-regulator {
74                 compatible = "regulator-fixed";
75                 regulator-name = "vcc_sys";
76                 regulator-min-microvolt = <5000000>;
77                 regulator-max-microvolt = <5000000>;
78                 regulator-always-on;
79                 regulator-boot-on;
80         };
81 };
82
83 &cpu0 {
84         cpu0-supply = <&vdd_cpu>;
85 };
86
87 &emmc {
88         bus-width = <8>;
89         cap-mmc-highspeed;
90         disable-wp;
91         non-removable;
92         num-slots = <1>;
93         mmc-pwrseq = <&emmc_pwrseq>;
94         pinctrl-names = "default";
95         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
96         vmmc-supply = <&vcc_io>;
97         vqmmc-supply = <&vcc_flash>;
98         status = "okay";
99 };
100
101 &gmac {
102         assigned-clocks = <&cru SCLK_MAC>;
103         assigned-clock-parents = <&ext_gmac>;
104         clock_in_out = "input";
105         phy-mode = "rgmii";
106         phy-supply = <&vccio_pmu>;
107         pinctrl-names = "default";
108         pinctrl-0 = <&rgmii_pins &phy_rst>;
109         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
110         snps,reset-active-low;
111         snps,reset-delays-us = <0 10000 30000>;
112         rx_delay = <0x10>;
113         tx_delay = <0x30>;
114 };
115
116 &gpu {
117         mali-supply = <&vdd_gpu>;
118         status = "okay";
119 };
120
121 &i2c0 {
122         status = "okay";
123
124         act8846: act8846@5a {
125                 compatible = "active-semi,act8846";
126                 reg = <0x5a>;
127                 system-power-controller;
128                 inl1-supply = <&vcc_io>;
129                 inl2-supply = <&vcc_sys>;
130                 inl3-supply = <&vcc_20>;
131                 vp1-supply = <&vcc_sys>;
132                 vp2-supply = <&vcc_sys>;
133                 vp3-supply = <&vcc_sys>;
134                 vp4-supply = <&vcc_sys>;
135
136                 regulators {
137                         vcc_ddr: REG1 {
138                                 regulator-name = "VCC_DDR";
139                                 regulator-min-microvolt = <1200000>;
140                                 regulator-max-microvolt = <1200000>;
141                                 regulator-always-on;
142                         };
143
144                         vcc_io: vccio_codec: REG2 {
145                                 regulator-name = "VCC_IO";
146                                 regulator-min-microvolt = <3300000>;
147                                 regulator-max-microvolt = <3300000>;
148                                 regulator-always-on;
149                         };
150
151                         vdd_log: REG3 {
152                                 regulator-name = "VDD_LOG";
153                                 regulator-min-microvolt = <1000000>;
154                                 regulator-max-microvolt = <1000000>;
155                                 regulator-always-on;
156                         };
157
158                         vcc_20: REG4 {
159                                 regulator-name = "VCC_20";
160                                 regulator-min-microvolt = <2000000>;
161                                 regulator-max-microvolt = <2000000>;
162                                 regulator-always-on;
163                         };
164
165                         vccio_sd: REG5 {
166                                 regulator-name = "VCCIO_SD";
167                                 regulator-min-microvolt = <3300000>;
168                                 regulator-max-microvolt = <3300000>;
169                                 regulator-always-on;
170                         };
171
172                         vdd10_lcd: REG6 {
173                                 regulator-name = "VDD10_LCD";
174                                 regulator-min-microvolt = <1000000>;
175                                 regulator-max-microvolt = <1000000>;
176                                 regulator-always-on;
177                         };
178
179                         vcca_codec: REG7 {
180                                 regulator-name = "VCCA_CODEC";
181                                 regulator-min-microvolt = <3300000>;
182                                 regulator-max-microvolt = <3300000>;
183                                 regulator-always-on;
184                         };
185
186                         vcca_tp: REG8 {
187                                 regulator-name = "VCCA_TP";
188                                 regulator-min-microvolt = <3300000>;
189                                 regulator-max-microvolt = <3300000>;
190                                 regulator-always-on;
191                         };
192
193                         vccio_pmu: REG9 {
194                                 regulator-name = "VCCIO_PMU";
195                                 regulator-min-microvolt = <3300000>;
196                                 regulator-max-microvolt = <3300000>;
197                                 regulator-always-on;
198                         };
199
200                         vdd_10: REG10 {
201                                 regulator-name = "VDD_10";
202                                 regulator-min-microvolt = <1000000>;
203                                 regulator-max-microvolt = <1000000>;
204                                 regulator-always-on;
205                         };
206
207                         vcc_18: REG11 {
208                                 regulator-name = "VCC_18";
209                                 regulator-min-microvolt = <1800000>;
210                                 regulator-max-microvolt = <1800000>;
211                                 regulator-always-on;
212                         };
213
214                         vcc18_lcd: REG12 {
215                                 regulator-name = "VCC18_LCD";
216                                 regulator-min-microvolt = <1800000>;
217                                 regulator-max-microvolt = <1800000>;
218                                 regulator-always-on;
219                         };
220                 };
221         };
222
223         vdd_cpu: syr827@40 {
224                 compatible = "silergy,syr827";
225                 reg = <0x40>;
226                 fcs,suspend-voltage-selector = <1>;
227                 regulator-always-on;
228                 regulator-boot-on;
229                 regulator-enable-ramp-delay = <300>;
230                 regulator-name = "vdd_cpu";
231                 regulator-min-microvolt = <850000>;
232                 regulator-max-microvolt = <1350000>;
233                 regulator-ramp-delay = <8000>;
234                 vin-supply = <&vcc_sys>;
235         };
236
237         vdd_gpu: syr828@41 {
238                 compatible = "silergy,syr828";
239                 reg = <0x41>;
240                 fcs,suspend-voltage-selector = <1>;
241                 regulator-always-on;
242                 regulator-enable-ramp-delay = <300>;
243                 regulator-min-microvolt = <850000>;
244                 regulator-max-microvolt = <1350000>;
245                 regulator-name = "vdd_gpu";
246                 regulator-ramp-delay = <8000>;
247                 vin-supply = <&vcc_sys>;
248         };
249 };
250
251 &io_domains {
252         status = "okay";
253
254         audio-supply = <&vcc_io>;
255         bb-supply = <&vcc_io>;
256         dvp-supply = <&vcc_18>;
257         flash0-supply = <&vcc_flash>;
258         flash1-supply = <&vccio_pmu>;
259         gpio30-supply = <&vccio_pmu>;
260         gpio1830 = <&vcc_io>;
261         lcdc-supply = <&vcc_io>;
262         sdcard-supply = <&vccio_sd>;
263         wifi-supply = <&vcc_18>;
264 };
265
266 &pinctrl {
267         pcfg_output_high: pcfg-output-high {
268                 output-high;
269         };
270
271         emmc {
272                         emmc_reset: emmc-reset {
273                                 rockchip,pins = <3 9 RK_FUNC_GPIO &pcfg_pull_none>;
274                         };
275         };
276
277         gmac {
278                 phy_rst: phy-rst {
279                         rockchip,pins = <4 8 RK_FUNC_GPIO  &pcfg_output_high>;
280                 };
281         };
282 };
283
284 &tsadc {
285         rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
286         rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
287         status = "okay";
288 };
289
290 &vopb {
291         status = "okay";
292 };
293
294 &vopb_mmu {
295         status = "okay";
296 };
297
298 &vopl {
299         status = "okay";
300 };
301
302 &vopl_mmu {
303         status = "okay";
304 };
305
306 &wdt {
307         status = "okay";
308 };