]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/rk3288-firefly-reload.dts
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[karo-tx-linux.git] / arch / arm / boot / dts / rk3288-firefly-reload.dts
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 /dts-v1/;
45 #include "rk3288-firefly-reload-core.dtsi"
46
47 / {
48         model = "Firefly-RK3288-reload";
49         compatible = "firefly,firefly-rk3288-reload", "rockchip,rk3288";
50
51         adc-keys {
52                 compatible = "adc-keys";
53                 io-channels = <&saradc 1>;
54                 io-channel-names = "buttons";
55                 keyup-threshold-microvolt = <1800000>;
56
57                 button-recovery {
58                         label = "Recovery";
59                         linux,code = <KEY_VENDOR>;
60                         press-threshold-microvolt = <0>;
61                 };
62         };
63
64         gpio-keys {
65                 compatible = "gpio-keys";
66
67                 power {
68                         wakeup-source;
69                         gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
70                         label = "GPIO Power";
71                         linux,code = <KEY_POWER>;
72                         pinctrl-names = "default";
73                         pinctrl-0 = <&pwr_key>;
74                 };
75         };
76
77         ir-receiver {
78                 compatible = "gpio-ir-receiver";
79                 gpios = <&gpio7 RK_PA0 GPIO_ACTIVE_LOW>;
80         };
81
82         leds {
83                 compatible = "gpio-leds";
84
85                 power {
86                         gpios = <&gpio8 RK_PA2 GPIO_ACTIVE_LOW>;
87                         label = "firefly:blue:power";
88                         pinctrl-names = "default";
89                         pinctrl-0 = <&power_led>;
90                         panic-indicator;
91                 };
92
93                 work {
94                         gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
95                         label = "firefly:blue:user";
96                         linux,default-trigger = "rc-feedback";
97                         pinctrl-names = "default";
98                         pinctrl-0 = <&work_led>;
99                 };
100         };
101
102         sdio_pwrseq: sdio-pwrseq {
103                 compatible = "mmc-pwrseq-simple";
104                 clocks = <&hym8563>;
105                 clock-names = "ext_clock";
106                 pinctrl-names = "default";
107                 pinctrl-0 = <&wifi_enable>;
108                 reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
109         };
110
111         sound {
112                 compatible = "simple-audio-card";
113                 simple-audio-card,name = "SPDIF";
114                 simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
115                         cpu { sound-dai = <&spdif>; };
116                         codec { sound-dai = <&spdif_out>; };
117                 };
118         };
119
120         spdif_out: spdif-out {
121                 compatible = "linux,spdif-dit";
122                 #sound-dai-cells = <0>;
123         };
124
125         vcc_host_5v: usb-host-regulator {
126                 compatible = "regulator-fixed";
127                 enable-active-high;
128                 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
129                 pinctrl-names = "default";
130                 pinctrl-0 = <&host_vbus_drv>;
131                 regulator-name = "vcc_host_5v";
132                 regulator-min-microvolt = <5000000>;
133                 regulator-max-microvolt = <5000000>;
134                 regulator-always-on;
135                 vin-supply = <&vcc_5v>;
136         };
137
138         vcc_5v: vcc_sys: vsys-regulator {
139                 compatible = "regulator-fixed";
140                 regulator-name = "vcc_5v";
141                 regulator-min-microvolt = <5000000>;
142                 regulator-max-microvolt = <5000000>;
143                 regulator-always-on;
144                 regulator-boot-on;
145         };
146
147         vcc_sd: sdmmc-regulator {
148                 compatible = "regulator-fixed";
149                 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
150                 pinctrl-names = "default";
151                 pinctrl-0 = <&sdmmc_pwr>;
152                 regulator-name = "vcc_sd";
153                 regulator-min-microvolt = <3300000>;
154                 regulator-max-microvolt = <3300000>;
155                 startup-delay-us = <100000>;
156                 vin-supply = <&vcc_io>;
157         };
158
159         vcc_otg_5v: usb-otg-regulator {
160                 compatible = "regulator-fixed";
161                 enable-active-high;
162                 gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
163                 pinctrl-names = "default";
164                 pinctrl-0 = <&otg_vbus_drv>;
165                 regulator-name = "vcc_otg_5v";
166                 regulator-min-microvolt = <5000000>;
167                 regulator-max-microvolt = <5000000>;
168                 regulator-always-on;
169                 vin-supply = <&vcc_5v>;
170         };
171
172         dovdd_1v8: dovdd-1v8-regulator {
173                 compatible = "regulator-fixed";
174                 enable-active-high;
175                 gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
176                 pinctrl-names = "default";
177                 pinctrl-0 = <&dvp_pwr>;
178                 regulator-name = "dovdd_1v8";
179                 regulator-min-microvolt = <1800000>;
180                 regulator-max-microvolt = <1800000>;
181                 vin-supply = <&vcc_io>;
182         };
183
184         vcc28_dvp: vcc28-dvp-regulator {
185                 compatible = "regulator-fixed";
186                 enable-active-high;
187                 gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
188                 pinctrl-names = "default";
189                 pinctrl-0 = <&dvp_pwr>;
190                 regulator-name = "vcc28_dvp";
191                 regulator-min-microvolt = <2800000>;
192                 regulator-max-microvolt = <2800000>;
193                 vin-supply = <&vcc_io>;
194         };
195
196         af_28: af_28-regulator {
197                 compatible = "regulator-fixed";
198                 enable-active-high;
199                 gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
200                 pinctrl-names = "default";
201                 pinctrl-0 = <&dvp_pwr>;
202                 regulator-name = "af_28";
203                 regulator-min-microvolt = <2800000>;
204                 regulator-max-microvolt = <2800000>;
205                 vin-supply = <&vcc_io>;
206         };
207
208         dvdd_1v2: af_28-regulator {
209                 compatible = "regulator-fixed";
210                 enable-active-high;
211                 gpio = <&gpio7 RK_PB4 GPIO_ACTIVE_HIGH>;
212                 pinctrl-names = "default";
213                 pinctrl-0 = <&cif_pwr>;
214                 regulator-name = "dvdd_1v2";
215                 regulator-min-microvolt = <1200000>;
216                 regulator-max-microvolt = <1200000>;
217                 vin-supply = <&vcc_io>;
218         };
219
220         vbat_wl: wifi-regulator {
221                 compatible = "regulator-fixed";
222                 regulator-name = "vbat_wl";
223                 regulator-min-microvolt = <3300000>;
224                 regulator-max-microvolt = <3300000>;
225                 vin-supply = <&vcc_io>;
226         };
227 };
228
229 &i2c0 {
230         hym8563: hym8563@51 {
231                 compatible = "haoyu,hym8563";
232                 reg = <0x51>;
233                 #clock-cells = <0>;
234                 clock-frequency = <32768>;
235                 clock-output-names = "xin32k";
236                 interrupt-parent = <&gpio7>;
237                 interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
238                 pinctrl-names = "default";
239                 pinctrl-0 = <&rtc_int>;
240         };
241 };
242
243 &i2c2 {
244         status = "okay";
245
246         codec: es8328@10 {
247                 compatible = "everest,es8328";
248                 DVDD-supply = <&vcca_33>;
249                 AVDD-supply = <&vcca_33>;
250                 PVDD-supply = <&vcca_33>;
251                 HPVDD-supply = <&vcca_33>;
252                 clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
253                 clock-names = "i2s_hclk", "i2s_clk";
254                 reg = <0x10>;
255         };
256 };
257
258 &i2s {
259         status = "okay";
260 };
261
262 &saradc {
263         status = "okay";
264 };
265
266 &sdmmc {
267         bus-width = <4>;
268         cap-mmc-highspeed;
269         cap-sd-highspeed;
270         card-detect-delay = <200>;
271         disable-wp;
272         num-slots = <1>;
273         pinctrl-names = "default";
274         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
275         vmmc-supply = <&vcc_sd>;
276         vqmmc-supply = <&vccio_sd>;
277         status = "okay";
278 };
279
280 &sdio0 {
281         bus-width = <4>;
282         cap-sd-highspeed;
283         cap-sdio-irq;
284         disable-wp;
285         mmc-pwrseq = <&sdio_pwrseq>;
286         non-removable;
287         num-slots = <1>;
288         pinctrl-names = "default";
289         pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
290         sd-uhs-sdr12;
291         sd-uhs-sdr25;
292         sd-uhs-sdr50;
293         sd-uhs-ddr50;
294         vmmc-supply = <&vbat_wl>;
295         vqmmc-supply = <&vccio_wl>;
296         status = "okay";
297 };
298
299 &spdif {
300         status = "okay";
301 };
302
303 &uart0 {
304         pinctrl-names = "default";
305         pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
306         status = "okay";
307 };
308
309 &uart1 {
310         status = "okay";
311 };
312
313 &uart2 {
314         status = "okay";
315 };
316
317 &uart3 {
318         status = "okay";
319 };
320
321 &usbphy {
322         status = "okay";
323 };
324
325 &usb_host1 {
326         pinctrl-names = "default";
327         pinctrl-0 = <&usbhub_rst>;
328         status = "okay";
329 };
330
331 &usb_otg {
332         status = "okay";
333 };
334
335 &pinctrl {
336         ir {
337                 ir_int: ir-int {
338                         rockchip,pins = <7 0 RK_FUNC_GPIO &pcfg_pull_up>;
339                 };
340         };
341
342         dvp {
343                 dvp_pwr: dvp-pwr {
344                         rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_none>;
345                 };
346
347                 cif_pwr: cif-pwr {
348                         rockchip,pins = <7 12 RK_FUNC_GPIO &pcfg_pull_none>;
349                 };
350         };
351
352         hym8563 {
353                 rtc_int: rtc-int {
354                         rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_up>;
355                 };
356         };
357
358         keys {
359                 pwr_key: pwr-key {
360                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
361                 };
362         };
363
364         leds {
365                 power_led: power-led {
366                         rockchip,pins = <8 2 RK_FUNC_GPIO &pcfg_pull_none>;
367                 };
368
369                 work_led: work-led {
370                         rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_none>;
371                 };
372         };
373
374         sdmmc {
375                 /*
376                  * Default drive strength isn't enough to achieve even
377                  * high-speed mode on firefly board so bump up to 12ma.
378                  */
379                 sdmmc_bus4: sdmmc-bus4 {
380                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
381                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
382                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
383                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
384                 };
385
386                 sdmmc_clk: sdmmc-clk {
387                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>;
388                 };
389
390                 sdmmc_cmd: sdmmc-cmd {
391                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
392                 };
393
394                 sdmmc_pwr: sdmmc-pwr {
395                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
396                 };
397         };
398
399         sdio {
400                 wifi_enable: wifi-enable {
401                         rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
402                 };
403         };
404
405         usb_host {
406                 host_vbus_drv: host-vbus-drv {
407                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
408                 };
409
410                 usbhub_rst: usbhub-rst {
411                         rockchip,pins = <8 3 RK_FUNC_GPIO &pcfg_output_high>;
412                 };
413         };
414
415         usb_otg {
416                 otg_vbus_drv: otg-vbus-drv {
417                         rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
418                 };
419         };
420 };