Merge branch 'v4.9-shared/soc-hdr' into v4.9-armsoc/dts32
[cascardo/linux.git] / arch / arm / boot / dts / rk3288-firefly-reload-core.dtsi
1 /*
2  * Device tree file for Firefly Rockchip RK3288 Core board
3  * Copyright (c) 2016 Randy Li <ayaka@soulik.info>
4  *
5  * This file is dual-licensed: you can use it either under the terms
6  * of the GPL or the X11 license, at your option. Note that this dual
7  * licensing only applies to this file, and not this project as a
8  * whole.
9  *
10  *  a) This file is free software; you can redistribute it and/or
11  *     modify it under the terms of the GNU General Public License as
12  *     published by the Free Software Foundation; either version 2 of the
13  *     License, or (at your option) any later version.
14  *
15  *     This file is distributed in the hope that it will be useful,
16  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *     GNU General Public License for more details.
19  *
20  * Or, alternatively,
21  *
22  *  b) Permission is hereby granted, free of charge, to any person
23  *     obtaining a copy of this software and associated documentation
24  *     files (the "Software"), to deal in the Software without
25  *     restriction, including without limitation the rights to use,
26  *     copy, modify, merge, publish, distribute, sublicense, and/or
27  *     sell copies of the Software, and to permit persons to whom the
28  *     Software is furnished to do so, subject to the following
29  *     conditions:
30  *
31  *     The above copyright notice and this permission notice shall be
32  *     included in all copies or substantial portions of the Software.
33  *
34  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41  *     OTHER DEALINGS IN THE SOFTWARE.
42  */
43
44 #include <dt-bindings/input/input.h>
45 #include "rk3288.dtsi"
46
47 / {
48         memory {
49                 device_type = "memory";
50                 reg = <0 0x80000000>;
51         };
52
53         dovdd_1v8: dovdd-1v8-regulator {
54                 compatible = "regulator-fixed";
55                 regulator-name = "dovdd_1v8";
56                 regulator-min-microvolt = <1800000>;
57                 regulator-max-microvolt = <1800000>;
58                 vin-supply = <&vcc28_dvp>;
59         };
60
61         ext_gmac: external-gmac-clock {
62                 compatible = "fixed-clock";
63                 #clock-cells = <0>;
64                 clock-frequency = <125000000>;
65                 clock-output-names = "ext_gmac";
66         };
67
68         vbat_wl: vcc_sys: vsys-regulator {
69                 compatible = "regulator-fixed";
70                 regulator-name = "vcc_sys";
71                 regulator-min-microvolt = <5000000>;
72                 regulator-max-microvolt = <5000000>;
73                 regulator-always-on;
74                 regulator-boot-on;
75         };
76
77         vcc_flash: flash-regulator {
78                 compatible = "regulator-fixed";
79                 regulator-name = "vcc_flash";
80                 regulator-min-microvolt = <1800000>;
81                 regulator-max-microvolt = <1800000>;
82                 vin-supply = <&vcc_io>;
83         };
84
85         vcc_5v: usb-regulator {
86                 compatible = "regulator-fixed";
87                 regulator-name = "vcc_5v";
88                 regulator-min-microvolt = <5000000>;
89                 regulator-max-microvolt = <5000000>;
90                 regulator-always-on;
91                 regulator-boot-on;
92                 vin-supply = <&vcc_sys>;
93         };
94 };
95
96 &cpu0 {
97         cpu0-supply = <&vdd_cpu>;
98 };
99
100 &emmc {
101         bus-width = <8>;
102         cap-mmc-highspeed;
103         disable-wp;
104         mmc-ddr-1_8v;
105         mmc-hs200-1_8v;
106         non-removable;
107         num-slots = <1>;
108         pinctrl-names = "default";
109         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
110         vmmc-supply = <&vcc_io>;
111         vqmmc-supply = <&vcc_flash>;
112         status = "okay";
113 };
114
115 &gmac {
116         assigned-clocks = <&cru SCLK_MAC>;
117         assigned-clock-parents = <&ext_gmac>;
118         clock_in_out = "input";
119         pinctrl-names = "default";
120         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
121         phy-supply = <&vcc_lan>;
122         phy-mode = "rgmii";
123         snps,reset-active-low;
124         snps,reset-delays-us = <0 10000 1000000>;
125         snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
126         tx_delay = <0x30>;
127         rx_delay = <0x10>;
128         status = "ok";
129 };
130
131 &i2c0 {
132         clock-frequency = <400000>;
133         status = "okay";
134
135         vdd_cpu: syr827@40 {
136                 compatible = "silergy,syr827";
137                 fcs,suspend-voltage-selector = <1>;
138                 reg = <0x40>;
139                 regulator-name = "vdd_cpu";
140                 regulator-min-microvolt = <850000>;
141                 regulator-max-microvolt = <1350000>;
142                 regulator-always-on;
143                 regulator-boot-on;
144                 regulator-enable-ramp-delay = <300>;
145                 regulator-ramp-delay = <8000>;
146                 vin-supply = <&vcc_sys>;
147         };
148
149         vdd_gpu: syr828@41 {
150                 compatible = "silergy,syr828";
151                 fcs,suspend-voltage-selector = <1>;
152                 reg = <0x41>;
153                 regulator-name = "vdd_gpu";
154                 regulator-min-microvolt = <850000>;
155                 regulator-max-microvolt = <1350000>;
156                 regulator-always-on;
157                 vin-supply = <&vcc_sys>;
158         };
159
160         act8846: act8846@5a {
161                 compatible = "active-semi,act8846";
162                 reg = <0x5a>;
163                 pinctrl-names = "default";
164                 pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
165                 system-power-controller;
166
167                 vp1-supply = <&vcc_sys>;
168                 vp2-supply = <&vcc_sys>;
169                 vp3-supply = <&vcc_sys>;
170                 vp4-supply = <&vcc_sys>;
171                 inl1-supply = <&vcc_sys>;
172                 inl2-supply = <&vcc_sys>;
173                 inl3-supply = <&vcc_20>;
174
175                 regulators {
176                         vcc_ddr: REG1 {
177                                 regulator-name = "vcc_ddr";
178                                 regulator-min-microvolt = <1200000>;
179                                 regulator-max-microvolt = <1200000>;
180                                 regulator-always-on;
181                         };
182
183                         vcc_io: REG2 {
184                                 regulator-name = "vcc_io";
185                                 regulator-min-microvolt = <3300000>;
186                                 regulator-max-microvolt = <3300000>;
187                                 regulator-always-on;
188                         };
189
190                         vdd_log: REG3 {
191                                 regulator-name = "vdd_log";
192                                 regulator-min-microvolt = <1100000>;
193                                 regulator-max-microvolt = <1100000>;
194                                 regulator-always-on;
195                         };
196
197                         vcc_20: REG4 {
198                                 regulator-name = "vcc_20";
199                                 regulator-min-microvolt = <2000000>;
200                                 regulator-max-microvolt = <2000000>;
201                                 regulator-always-on;
202                         };
203
204                         vccio_sd: REG5 {
205                                 regulator-name = "vccio_sd";
206                                 regulator-min-microvolt = <3300000>;
207                                 regulator-max-microvolt = <3300000>;
208                                 regulator-always-on;
209                         };
210
211                         vdd10_lcd: REG6 {
212                                 regulator-name = "vdd10_lcd";
213                                 regulator-min-microvolt = <1000000>;
214                                 regulator-max-microvolt = <1000000>;
215                                 regulator-always-on;
216                         };
217
218                         vcca_33: REG7  {
219                                 regulator-name = "vcca_33";
220                                 regulator-min-microvolt = <3300000>;
221                                 regulator-max-microvolt = <3300000>;
222                         };
223
224                         vcc_lan: REG8 {
225                                 regulator-name = "vcca_lan";
226                                 regulator-min-microvolt = <3300000>;
227                                 regulator-max-microvolt = <3300000>;
228                         };
229
230                         vccio_pmu: REG9 {
231                                 regulator-name = "vccio_pmu";
232                                 regulator-min-microvolt = <3300000>;
233                                 regulator-max-microvolt = <3300000>;
234                         };
235
236                         vdd_10: REG10 {
237                                 regulator-name = "vdd_10";
238                                 regulator-min-microvolt = <1000000>;
239                                 regulator-max-microvolt = <1000000>;
240                                 regulator-always-on;
241                         };
242
243                         vccio_wl: vcc_18: REG11 {
244                                 regulator-name = "vcc_18";
245                                 regulator-min-microvolt = <1800000>;
246                                 regulator-max-microvolt = <1800000>;
247                                 regulator-always-on;
248                         };
249
250                         vcc18_lcd: REG12 {
251                                 regulator-name = "vcc18_lcd";
252                                 regulator-min-microvolt = <1800000>;
253                                 regulator-max-microvolt = <1800000>;
254                                 regulator-always-on;
255                         };
256                 };
257         };
258 };
259
260 &io_domains {
261         status = "okay";
262
263         audio-supply = <&vcca_33>;
264         bb-supply = <&vcc_io>;
265         dvp-supply = <&dovdd_1v8>;
266         flash0-supply = <&vcc_flash>;
267         flash1-supply = <&vcc_lan>;
268         gpio30-supply = <&vcc_io>;
269         gpio1830-supply = <&vcc_io>;
270         lcdc-supply = <&vcc_io>;
271         sdcard-supply = <&vccio_sd>;
272         wifi-supply = <&vccio_wl>;
273 };
274
275 &pinctrl {
276         pcfg_output_high: pcfg-output-high {
277                 output-high;
278         };
279
280         pcfg_output_low: pcfg-output-low {
281                 output-low;
282         };
283
284         pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
285                 bias-pull-up;
286                 drive-strength = <12>;
287         };
288
289         act8846 {
290                 pwr_hold: pwr-hold {
291                         rockchip,pins = <0 1 RK_FUNC_GPIO &pcfg_output_high>;
292                 };
293
294                 pmic_vsel: pmic-vsel {
295                         rockchip,pins = <7 14 RK_FUNC_GPIO &pcfg_output_low>;
296                 };
297         };
298
299         gmac {
300                 phy_int: phy-int {
301                         rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
302                 };
303
304                 phy_pmeb: phy-pmeb {
305                         rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
306                 };
307
308                 phy_rst: phy-rst {
309                         rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
310                 };
311         };
312 };
313
314 &tsadc {
315         rockchip,hw-tshut-mode = <0>;
316         rockchip,hw-tshut-polarity = <0>;
317         status = "okay";
318 };
319
320 &vopb {
321         status = "okay";
322 };
323
324 &vopb_mmu {
325         status = "okay";
326 };
327
328 &vopl {
329         status = "okay";
330 };
331
332 &vopl_mmu {
333         status = "okay";
334 };
335
336 &wdt {
337         status = "okay";
338 };