]> git.sur5r.net Git - u-boot/blob - arch/arm/dts/salvator-common.dtsi
ARM: rmobile: Sync Gen3 DTS with Linux v4.17
[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 = <12288000>;
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         phy-handle = <&phy0>;
259         phy-mode = "rgmii-txid";
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                 reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
268         };
269 };
270
271 &du {
272         pinctrl-0 = <&du_pins>;
273         pinctrl-names = "default";
274         status = "okay";
275
276         ports {
277                 port@0 {
278                         endpoint {
279                                 remote-endpoint = <&adv7123_in>;
280                         };
281                 };
282         };
283 };
284
285 &ehci0 {
286         dr_mode = "otg";
287         status = "okay";
288 };
289
290 &ehci1 {
291         status = "okay";
292 };
293
294 &extalr_clk {
295         clock-frequency = <32768>;
296 };
297
298 &hsusb {
299         dr_mode = "otg";
300         status = "okay";
301 };
302
303 &i2c2 {
304         pinctrl-0 = <&i2c2_pins>;
305         pinctrl-names = "default";
306
307         status = "okay";
308
309         clock-frequency = <100000>;
310
311         ak4613: codec@10 {
312                 compatible = "asahi-kasei,ak4613";
313                 #sound-dai-cells = <0>;
314                 reg = <0x10>;
315                 clocks = <&rcar_sound 3>;
316
317                 asahi-kasei,in1-single-end;
318                 asahi-kasei,in2-single-end;
319                 asahi-kasei,out1-single-end;
320                 asahi-kasei,out2-single-end;
321                 asahi-kasei,out3-single-end;
322                 asahi-kasei,out4-single-end;
323                 asahi-kasei,out5-single-end;
324                 asahi-kasei,out6-single-end;
325         };
326
327         cs2000: clk_multiplier@4f {
328                 #clock-cells = <0>;
329                 compatible = "cirrus,cs2000-cp";
330                 reg = <0x4f>;
331                 clocks = <&audio_clkout>, <&x12_clk>;
332                 clock-names = "clk_in", "ref_clk";
333
334                 assigned-clocks = <&cs2000>;
335                 assigned-clock-rates = <24576000>; /* 1/1 divide */
336         };
337 };
338
339 &i2c4 {
340         status = "okay";
341
342         pca9654: gpio@20 {
343                 compatible = "onnn,pca9654";
344                 reg = <0x20>;
345                 gpio-controller;
346                 #gpio-cells = <2>;
347         };
348
349         csa_vdd: adc@7c {
350                 compatible = "maxim,max9611";
351                 reg = <0x7c>;
352
353                 shunt-resistor-micro-ohms = <5000>;
354         };
355
356         csa_dvfs: adc@7f {
357                 compatible = "maxim,max9611";
358                 reg = <0x7f>;
359
360                 shunt-resistor-micro-ohms = <5000>;
361         };
362 };
363
364 &i2c_dvfs {
365         status = "okay";
366
367         pmic: pmic@30 {
368                 pinctrl-0 = <&irq0_pins>;
369                 pinctrl-names = "default";
370
371                 compatible = "rohm,bd9571mwv";
372                 reg = <0x30>;
373                 interrupt-parent = <&intc_ex>;
374                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
375                 interrupt-controller;
376                 #interrupt-cells = <2>;
377                 gpio-controller;
378                 #gpio-cells = <2>;
379
380                 regulators {
381                         dvfs: dvfs {
382                                 regulator-name = "dvfs";
383                                 regulator-min-microvolt = <750000>;
384                                 regulator-max-microvolt = <1030000>;
385                                 regulator-boot-on;
386                                 regulator-always-on;
387                         };
388                 };
389         };
390 };
391
392 &ohci0 {
393         dr_mode = "otg";
394         status = "okay";
395 };
396
397 &ohci1 {
398         status = "okay";
399 };
400
401 &pcie_bus_clk {
402         clock-frequency = <100000000>;
403 };
404
405 &pciec0 {
406         status = "okay";
407 };
408
409 &pciec1 {
410         status = "okay";
411 };
412
413 &pfc {
414         pinctrl-0 = <&scif_clk_pins>;
415         pinctrl-names = "default";
416
417         avb_pins: avb {
418                 mux {
419                         groups = "avb_link", "avb_mdc", "avb_mii";
420                         function = "avb";
421                 };
422
423                 pins_mdc {
424                         groups = "avb_mdc";
425                         drive-strength = <24>;
426                 };
427
428                 pins_mii_tx {
429                         pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
430                                "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
431                         drive-strength = <12>;
432                 };
433         };
434
435         du_pins: du {
436                 groups = "du_rgb888", "du_sync", "du_oddf", "du_clk_out_0";
437                 function = "du";
438         };
439
440         i2c2_pins: i2c2 {
441                 groups = "i2c2_a";
442                 function = "i2c2";
443         };
444
445         irq0_pins: irq0 {
446                 groups = "intc_ex_irq0";
447                 function = "intc_ex";
448         };
449
450         pwm1_pins: pwm1 {
451                 groups = "pwm1_a";
452                 function = "pwm1";
453         };
454
455         scif1_pins: scif1 {
456                 groups = "scif1_data_a", "scif1_ctrl";
457                 function = "scif1";
458         };
459
460         scif2_pins: scif2 {
461                 groups = "scif2_data_a";
462                 function = "scif2";
463         };
464
465         scif_clk_pins: scif_clk {
466                 groups = "scif_clk_a";
467                 function = "scif_clk";
468         };
469
470         sdhi0_pins: sd0 {
471                 groups = "sdhi0_data4", "sdhi0_ctrl";
472                 function = "sdhi0";
473                 power-source = <3300>;
474         };
475
476         sdhi0_pins_uhs: sd0_uhs {
477                 groups = "sdhi0_data4", "sdhi0_ctrl";
478                 function = "sdhi0";
479                 power-source = <1800>;
480         };
481
482         sdhi2_pins: sd2 {
483                 groups = "sdhi2_data8", "sdhi2_ctrl";
484                 function = "sdhi2";
485                 power-source = <1800>;
486         };
487
488         sdhi2_pins_uhs: sd2_uhs {
489                 groups = "sdhi2_data8", "sdhi2_ctrl";
490                 function = "sdhi2";
491                 power-source = <1800>;
492         };
493
494         sdhi3_pins: sd3 {
495                 groups = "sdhi3_data4", "sdhi3_ctrl";
496                 function = "sdhi3";
497                 power-source = <3300>;
498         };
499
500         sdhi3_pins_uhs: sd3_uhs {
501                 groups = "sdhi3_data4", "sdhi3_ctrl";
502                 function = "sdhi3";
503                 power-source = <1800>;
504         };
505
506         sound_pins: sound {
507                 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
508                 function = "ssi";
509         };
510
511         sound_clk_pins: sound_clk {
512                 groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
513                          "audio_clkout_a", "audio_clkout3_a";
514                 function = "audio_clk";
515         };
516
517         usb0_pins: usb0 {
518                 groups = "usb0";
519                 function = "usb0";
520         };
521
522         usb1_pins: usb1 {
523                 mux {
524                         groups = "usb1";
525                         function = "usb1";
526                 };
527
528                 ovc {
529                         pins = "GP_6_27";
530                         bias-pull-up;
531                 };
532
533                 pwen {
534                         pins = "GP_6_26";
535                         bias-pull-down;
536                 };
537         };
538
539         usb30_pins: usb30 {
540                 groups = "usb30";
541                 function = "usb30";
542         };
543 };
544
545 &pwm1 {
546         pinctrl-0 = <&pwm1_pins>;
547         pinctrl-names = "default";
548
549         status = "okay";
550 };
551
552 &rcar_sound {
553         pinctrl-0 = <&sound_pins &sound_clk_pins>;
554         pinctrl-names = "default";
555
556         /* Single DAI */
557         #sound-dai-cells = <0>;
558
559         /* audio_clkout0/1/2/3 */
560         #clock-cells = <1>;
561         clock-frequency = <12288000 11289600>;
562
563         status = "okay";
564
565         /* update <audio_clk_b> to <cs2000> */
566         clocks = <&cpg CPG_MOD 1005>,
567                  <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
568                  <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
569                  <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
570                  <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
571                  <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
572                  <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
573                  <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
574                  <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
575                  <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
576                  <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
577                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
578                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
579                  <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
580                  <&audio_clk_a>, <&cs2000>,
581                  <&audio_clk_c>,
582                  <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
583
584         rcar_sound,dai {
585                 dai0 {
586                         playback = <&ssi0 &src0 &dvc0>;
587                         capture  = <&ssi1 &src1 &dvc1>;
588                 };
589         };
590 };
591
592 &scif1 {
593         pinctrl-0 = <&scif1_pins>;
594         pinctrl-names = "default";
595
596         uart-has-rtscts;
597         status = "okay";
598 };
599
600 &scif2 {
601         pinctrl-0 = <&scif2_pins>;
602         pinctrl-names = "default";
603
604         status = "okay";
605 };
606
607 &scif_clk {
608         clock-frequency = <14745600>;
609 };
610
611 &sdhi0 {
612         pinctrl-0 = <&sdhi0_pins>;
613         pinctrl-1 = <&sdhi0_pins_uhs>;
614         pinctrl-names = "default", "state_uhs";
615
616         vmmc-supply = <&vcc_sdhi0>;
617         vqmmc-supply = <&vccq_sdhi0>;
618         cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
619         wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
620         bus-width = <4>;
621         sd-uhs-sdr50;
622         status = "okay";
623 };
624
625 &sdhi2 {
626         /* used for on-board 8bit eMMC */
627         pinctrl-0 = <&sdhi2_pins>;
628         pinctrl-1 = <&sdhi2_pins_uhs>;
629         pinctrl-names = "default", "state_uhs";
630
631         vmmc-supply = <&reg_3p3v>;
632         vqmmc-supply = <&reg_1p8v>;
633         bus-width = <8>;
634         mmc-hs200-1_8v;
635         non-removable;
636         fixed-emmc-driver-type = <1>;
637         status = "okay";
638 };
639
640 &sdhi3 {
641         pinctrl-0 = <&sdhi3_pins>;
642         pinctrl-1 = <&sdhi3_pins_uhs>;
643         pinctrl-names = "default", "state_uhs";
644
645         vmmc-supply = <&vcc_sdhi3>;
646         vqmmc-supply = <&vccq_sdhi3>;
647         cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
648         wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
649         bus-width = <4>;
650         sd-uhs-sdr50;
651         status = "okay";
652 };
653
654 &ssi1 {
655         shared-pin;
656 };
657
658 &usb_extal_clk {
659         clock-frequency = <50000000>;
660 };
661
662 &usb2_phy0 {
663         pinctrl-0 = <&usb0_pins>;
664         pinctrl-names = "default";
665
666         vbus-supply = <&vbus0_usb2>;
667         status = "okay";
668 };
669
670 &usb2_phy1 {
671         pinctrl-0 = <&usb1_pins>;
672         pinctrl-names = "default";
673
674         status = "okay";
675 };
676
677 &usb3_peri0 {
678         phys = <&usb3_phy0>;
679         phy-names = "usb";
680
681         status = "okay";
682 };
683
684 &usb3_phy0 {
685         status = "okay";
686 };
687
688 &usb3s0_clk {
689         clock-frequency = <100000000>;
690 };
691
692 &wdt0 {
693         timeout-sec = <60>;
694         status = "okay";
695 };
696
697 &xhci0 {
698         pinctrl-0 = <&usb30_pins>;
699         pinctrl-names = "default";
700
701         status = "okay";
702 };