]> git.sur5r.net Git - u-boot/blob - arch/arm/dts/salvator-common.dtsi
ARM: dts: rmobile: Update DTS to match Linux 4.14
[u-boot] / arch / arm / dts / salvator-common.dtsi
1 /*
2  * Device Tree Source for common parts of Salvator-X board variants
3  *
4  * Copyright (C) 2015-2016 Renesas Electronics Corp.
5  *
6  * This file is licensed under the terms of the GNU General Public License
7  * version 2.  This program is licensed "as is" without any warranty of any
8  * kind, whether express or implied.
9  */
10
11 /*
12  * SSI-AK4613
13  *
14  * This command is required when Playback/Capture
15  *
16  *      amixer set "DVC Out" 100%
17  *      amixer set "DVC In" 100%
18  *
19  * You can use Mute
20  *
21  *      amixer set "DVC Out Mute" on
22  *      amixer set "DVC In Mute" on
23  *
24  * You can use Volume Ramp
25  *
26  *      amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
27  *      amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
28  *      amixer set "DVC Out Ramp" on
29  *      aplay xxx.wav &
30  *      amixer set "DVC Out"  80%  // Volume Down
31  *      amixer set "DVC Out" 100%  // Volume Up
32  */
33
34 #include <dt-bindings/gpio/gpio.h>
35
36 / {
37         aliases {
38                 serial0 = &scif2;
39                 serial1 = &scif1;
40                 ethernet0 = &avb;
41         };
42
43         chosen {
44                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
45                 stdout-path = "serial0:115200n8";
46         };
47
48         audio_clkout: audio-clkout {
49                 /*
50                  * This is same as <&rcar_sound 0>
51                  * but needed to avoid cs2000/rcar_sound probe dead-lock
52                  */
53                 compatible = "fixed-clock";
54                 #clock-cells = <0>;
55                 clock-frequency = <11289600>;
56         };
57
58         backlight: backlight {
59                 compatible = "pwm-backlight";
60                 pwms = <&pwm1 0 50000>;
61
62                 brightness-levels = <256 128 64 16 8 4 0>;
63                 default-brightness-level = <6>;
64
65                 power-supply = <&reg_12v>;
66                 enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
67         };
68
69         reg_1p8v: regulator0 {
70                 compatible = "regulator-fixed";
71                 regulator-name = "fixed-1.8V";
72                 regulator-min-microvolt = <1800000>;
73                 regulator-max-microvolt = <1800000>;
74                 regulator-boot-on;
75                 regulator-always-on;
76         };
77
78         reg_3p3v: regulator1 {
79                 compatible = "regulator-fixed";
80                 regulator-name = "fixed-3.3V";
81                 regulator-min-microvolt = <3300000>;
82                 regulator-max-microvolt = <3300000>;
83                 regulator-boot-on;
84                 regulator-always-on;
85         };
86
87         reg_12v: regulator2 {
88                 compatible = "regulator-fixed";
89                 regulator-name = "fixed-12V";
90                 regulator-min-microvolt = <12000000>;
91                 regulator-max-microvolt = <12000000>;
92                 regulator-boot-on;
93                 regulator-always-on;
94         };
95
96         rsnd_ak4613: sound {
97                 compatible = "simple-audio-card";
98
99                 simple-audio-card,format = "left_j";
100                 simple-audio-card,bitclock-master = <&sndcpu>;
101                 simple-audio-card,frame-master = <&sndcpu>;
102
103                 sndcpu: simple-audio-card,cpu {
104                         sound-dai = <&rcar_sound>;
105                 };
106
107                 sndcodec: simple-audio-card,codec {
108                         sound-dai = <&ak4613>;
109                 };
110         };
111
112         vbus0_usb2: regulator-vbus0-usb2 {
113                 compatible = "regulator-fixed";
114
115                 regulator-name = "USB20_VBUS0";
116                 regulator-min-microvolt = <5000000>;
117                 regulator-max-microvolt = <5000000>;
118
119                 gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
120                 enable-active-high;
121         };
122
123         vcc_sdhi0: regulator-vcc-sdhi0 {
124                 compatible = "regulator-fixed";
125
126                 regulator-name = "SDHI0 Vcc";
127                 regulator-min-microvolt = <3300000>;
128                 regulator-max-microvolt = <3300000>;
129
130                 gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
131                 enable-active-high;
132         };
133
134         vccq_sdhi0: regulator-vccq-sdhi0 {
135                 compatible = "regulator-gpio";
136
137                 regulator-name = "SDHI0 VccQ";
138                 regulator-min-microvolt = <1800000>;
139                 regulator-max-microvolt = <3300000>;
140
141                 gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
142                 gpios-states = <1>;
143                 states = <3300000 1
144                           1800000 0>;
145         };
146
147         vcc_sdhi3: regulator-vcc-sdhi3 {
148                 compatible = "regulator-fixed";
149
150                 regulator-name = "SDHI3 Vcc";
151                 regulator-min-microvolt = <3300000>;
152                 regulator-max-microvolt = <3300000>;
153
154                 gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>;
155                 enable-active-high;
156         };
157
158         vccq_sdhi3: regulator-vccq-sdhi3 {
159                 compatible = "regulator-gpio";
160
161                 regulator-name = "SDHI3 VccQ";
162                 regulator-min-microvolt = <1800000>;
163                 regulator-max-microvolt = <3300000>;
164
165                 gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
166                 gpios-states = <1>;
167                 states = <3300000 1
168                           1800000 0>;
169         };
170
171         hdmi0-out {
172                 compatible = "hdmi-connector";
173                 label = "HDMI0 OUT";
174                 type = "a";
175
176                 port {
177                         hdmi0_con: endpoint {
178                         };
179                 };
180         };
181
182         hdmi1-out {
183                 compatible = "hdmi-connector";
184                 label = "HDMI1 OUT";
185                 type = "a";
186
187                 port {
188                         hdmi1_con: endpoint {
189                         };
190                 };
191         };
192
193         vga {
194                 compatible = "vga-connector";
195
196                 port {
197                         vga_in: endpoint {
198                                 remote-endpoint = <&adv7123_out>;
199                         };
200                 };
201         };
202
203         vga-encoder {
204                 compatible = "adi,adv7123";
205
206                 ports {
207                         #address-cells = <1>;
208                         #size-cells = <0>;
209
210                         port@0 {
211                                 reg = <0>;
212                                 adv7123_in: endpoint {
213                                         remote-endpoint = <&du_out_rgb>;
214                                 };
215                         };
216                         port@1 {
217                                 reg = <1>;
218                                 adv7123_out: endpoint {
219                                         remote-endpoint = <&vga_in>;
220                                 };
221                         };
222                 };
223         };
224
225         x12_clk: x12 {
226                 compatible = "fixed-clock";
227                 #clock-cells = <0>;
228                 clock-frequency = <24576000>;
229         };
230
231         /* External DU dot clocks */
232         x21_clk: x21-clock {
233                 compatible = "fixed-clock";
234                 #clock-cells = <0>;
235                 clock-frequency = <33000000>;
236         };
237
238         x22_clk: x22-clock {
239                 compatible = "fixed-clock";
240                 #clock-cells = <0>;
241                 clock-frequency = <33000000>;
242         };
243
244         x23_clk: x23-clock {
245                 compatible = "fixed-clock";
246                 #clock-cells = <0>;
247                 clock-frequency = <25000000>;
248         };
249 };
250
251 &audio_clk_a {
252         clock-frequency = <22579200>;
253 };
254
255 &avb {
256         pinctrl-0 = <&avb_pins>;
257         pinctrl-names = "default";
258         renesas,no-ether-link;
259         phy-handle = <&phy0>;
260         status = "okay";
261
262         phy0: ethernet-phy@0 {
263                 rxc-skew-ps = <1500>;
264                 reg = <0>;
265                 interrupt-parent = <&gpio2>;
266                 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
267         };
268 };
269
270 &du {
271         pinctrl-0 = <&du_pins>;
272         pinctrl-names = "default";
273         status = "okay";
274
275         ports {
276                 port@0 {
277                         endpoint {
278                                 remote-endpoint = <&adv7123_in>;
279                         };
280                 };
281         };
282 };
283
284 &ehci0 {
285         status = "okay";
286 };
287
288 &ehci1 {
289         status = "okay";
290 };
291
292 &extalr_clk {
293         clock-frequency = <32768>;
294 };
295
296 &hsusb {
297         status = "okay";
298 };
299
300 &i2c2 {
301         pinctrl-0 = <&i2c2_pins>;
302         pinctrl-names = "default";
303
304         status = "okay";
305
306         clock-frequency = <100000>;
307
308         ak4613: codec@10 {
309                 compatible = "asahi-kasei,ak4613";
310                 #sound-dai-cells = <0>;
311                 reg = <0x10>;
312                 clocks = <&rcar_sound 3>;
313
314                 asahi-kasei,in1-single-end;
315                 asahi-kasei,in2-single-end;
316                 asahi-kasei,out1-single-end;
317                 asahi-kasei,out2-single-end;
318                 asahi-kasei,out3-single-end;
319                 asahi-kasei,out4-single-end;
320                 asahi-kasei,out5-single-end;
321                 asahi-kasei,out6-single-end;
322         };
323
324         cs2000: clk_multiplier@4f {
325                 #clock-cells = <0>;
326                 compatible = "cirrus,cs2000-cp";
327                 reg = <0x4f>;
328                 clocks = <&audio_clkout>, <&x12_clk>;
329                 clock-names = "clk_in", "ref_clk";
330
331                 assigned-clocks = <&cs2000>;
332                 assigned-clock-rates = <24576000>; /* 1/1 divide */
333         };
334 };
335
336 &i2c4 {
337         status = "okay";
338
339         csa_vdd: adc@7c {
340                 compatible = "maxim,max9611";
341                 reg = <0x7c>;
342
343                 shunt-resistor-micro-ohms = <5000>;
344         };
345
346         csa_dvfs: adc@7f {
347                 compatible = "maxim,max9611";
348                 reg = <0x7f>;
349
350                 shunt-resistor-micro-ohms = <5000>;
351         };
352 };
353
354 &i2c_dvfs {
355         status = "okay";
356 };
357
358 &ohci0 {
359         status = "okay";
360 };
361
362 &ohci1 {
363         status = "okay";
364 };
365
366 &pcie_bus_clk {
367         clock-frequency = <100000000>;
368 };
369
370 &pciec0 {
371         status = "okay";
372 };
373
374 &pciec1 {
375         status = "okay";
376 };
377
378 &pfc {
379         pinctrl-0 = <&scif_clk_pins>;
380         pinctrl-names = "default";
381
382         avb_pins: avb {
383                 mux {
384                         groups = "avb_link", "avb_phy_int", "avb_mdc",
385                                  "avb_mii";
386                         function = "avb";
387                 };
388
389                 pins_mdc {
390                         groups = "avb_mdc";
391                         drive-strength = <24>;
392                 };
393
394                 pins_mii_tx {
395                         pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
396                                "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
397                         drive-strength = <12>;
398                 };
399         };
400
401         du_pins: du {
402                 groups = "du_rgb888", "du_sync", "du_oddf", "du_clk_out_0";
403                 function = "du";
404         };
405
406         i2c2_pins: i2c2 {
407                 groups = "i2c2_a";
408                 function = "i2c2";
409         };
410
411         pwm1_pins: pwm1 {
412                 groups = "pwm1_a";
413                 function = "pwm1";
414         };
415
416         scif1_pins: scif1 {
417                 groups = "scif1_data_a", "scif1_ctrl";
418                 function = "scif1";
419         };
420
421         scif2_pins: scif2 {
422                 groups = "scif2_data_a";
423                 function = "scif2";
424         };
425
426         scif_clk_pins: scif_clk {
427                 groups = "scif_clk_a";
428                 function = "scif_clk";
429         };
430
431         sdhi0_pins: sd0 {
432                 groups = "sdhi0_data4", "sdhi0_ctrl";
433                 function = "sdhi0";
434                 power-source = <3300>;
435         };
436
437         sdhi0_pins_uhs: sd0_uhs {
438                 groups = "sdhi0_data4", "sdhi0_ctrl";
439                 function = "sdhi0";
440                 power-source = <1800>;
441         };
442
443         sdhi2_pins: sd2 {
444                 groups = "sdhi2_data8", "sdhi2_ctrl";
445                 function = "sdhi2";
446                 power-source = <1800>;
447         };
448
449         sdhi2_pins_uhs: sd2_uhs {
450                 groups = "sdhi2_data8", "sdhi2_ctrl";
451                 function = "sdhi2";
452                 power-source = <1800>;
453         };
454
455         sdhi3_pins: sd3 {
456                 groups = "sdhi3_data4", "sdhi3_ctrl";
457                 function = "sdhi3";
458                 power-source = <3300>;
459         };
460
461         sdhi3_pins_uhs: sd3_uhs {
462                 groups = "sdhi3_data4", "sdhi3_ctrl";
463                 function = "sdhi3";
464                 power-source = <1800>;
465         };
466
467         sound_pins: sound {
468                 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
469                 function = "ssi";
470         };
471
472         sound_clk_pins: sound_clk {
473                 groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
474                          "audio_clkout_a", "audio_clkout3_a";
475                 function = "audio_clk";
476         };
477
478         usb0_pins: usb0 {
479                 groups = "usb0";
480                 function = "usb0";
481         };
482
483         usb1_pins: usb1 {
484                 mux {
485                         groups = "usb1";
486                         function = "usb1";
487                 };
488
489                 ovc {
490                         pins = "GP_6_27";
491                         bias-pull-up;
492                 };
493
494                 pwen {
495                         pins = "GP_6_26";
496                         bias-pull-down;
497                 };
498         };
499 };
500
501 &pwm1 {
502         pinctrl-0 = <&pwm1_pins>;
503         pinctrl-names = "default";
504
505         status = "okay";
506 };
507
508 &rcar_sound {
509         pinctrl-0 = <&sound_pins &sound_clk_pins>;
510         pinctrl-names = "default";
511
512         /* Single DAI */
513         #sound-dai-cells = <0>;
514
515         /* audio_clkout0/1/2/3 */
516         #clock-cells = <1>;
517         clock-frequency = <12288000 11289600>;
518
519         status = "okay";
520
521         /* update <audio_clk_b> to <cs2000> */
522         clocks = <&cpg CPG_MOD 1005>,
523                  <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
524                  <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
525                  <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
526                  <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
527                  <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
528                  <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
529                  <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
530                  <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
531                  <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
532                  <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
533                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
534                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
535                  <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
536                  <&audio_clk_a>, <&cs2000>,
537                  <&audio_clk_c>,
538                  <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
539
540         rcar_sound,dai {
541                 dai0 {
542                         playback = <&ssi0 &src0 &dvc0>;
543                         capture  = <&ssi1 &src1 &dvc1>;
544                 };
545         };
546 };
547
548 &scif1 {
549         pinctrl-0 = <&scif1_pins>;
550         pinctrl-names = "default";
551
552         uart-has-rtscts;
553         status = "okay";
554 };
555
556 &scif2 {
557         pinctrl-0 = <&scif2_pins>;
558         pinctrl-names = "default";
559
560         status = "okay";
561 };
562
563 &scif_clk {
564         clock-frequency = <14745600>;
565 };
566
567 &sdhi0 {
568         pinctrl-0 = <&sdhi0_pins>;
569         pinctrl-1 = <&sdhi0_pins_uhs>;
570         pinctrl-names = "default", "state_uhs";
571
572         vmmc-supply = <&vcc_sdhi0>;
573         vqmmc-supply = <&vccq_sdhi0>;
574         cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
575         wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
576         bus-width = <4>;
577         sd-uhs-sdr50;
578         sd-uhs-sdr104;
579         status = "okay";
580
581         max-frequency = <208000000>;
582 };
583
584 &sdhi2 {
585         /* used for on-board 8bit eMMC */
586         pinctrl-0 = <&sdhi2_pins>;
587         pinctrl-1 = <&sdhi2_pins_uhs>;
588         pinctrl-names = "default", "state_uhs";
589
590         vmmc-supply = <&reg_3p3v>;
591         vqmmc-supply = <&reg_1p8v>;
592         bus-width = <8>;
593         mmc-ddr-1_8v;
594         mmc-hs200-1_8v;
595         non-removable;
596         status = "okay";
597
598         max-frequency = <200000000>;
599 };
600
601 &sdhi3 {
602         pinctrl-0 = <&sdhi3_pins>;
603         pinctrl-1 = <&sdhi3_pins_uhs>;
604         pinctrl-names = "default", "state_uhs";
605
606         vmmc-supply = <&vcc_sdhi3>;
607         vqmmc-supply = <&vccq_sdhi3>;
608         cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
609         wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
610         bus-width = <4>;
611         sd-uhs-sdr50;
612         sd-uhs-sdr104;
613         status = "okay";
614
615         max-frequency = <208000000>;
616 };
617
618 &ssi1 {
619         shared-pin;
620 };
621
622 &usb2_phy0 {
623         pinctrl-0 = <&usb0_pins>;
624         pinctrl-names = "default";
625
626         vbus-supply = <&vbus0_usb2>;
627         status = "okay";
628 };
629
630 &usb2_phy1 {
631         pinctrl-0 = <&usb1_pins>;
632         pinctrl-names = "default";
633
634         status = "okay";
635 };
636
637 &wdt0 {
638         timeout-sec = <60>;
639         status = "okay";
640 };
641
642 &xhci0 {
643         status = "okay";
644 };