Merge tag 'xfs-4.15-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / renesas / 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         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         dr_mode = "otg";
286         status = "okay";
287 };
288
289 &ehci1 {
290         status = "okay";
291 };
292
293 &extalr_clk {
294         clock-frequency = <32768>;
295 };
296
297 &hsusb {
298         dr_mode = "otg";
299         status = "okay";
300 };
301
302 &i2c2 {
303         pinctrl-0 = <&i2c2_pins>;
304         pinctrl-names = "default";
305
306         status = "okay";
307
308         clock-frequency = <100000>;
309
310         ak4613: codec@10 {
311                 compatible = "asahi-kasei,ak4613";
312                 #sound-dai-cells = <0>;
313                 reg = <0x10>;
314                 clocks = <&rcar_sound 3>;
315
316                 asahi-kasei,in1-single-end;
317                 asahi-kasei,in2-single-end;
318                 asahi-kasei,out1-single-end;
319                 asahi-kasei,out2-single-end;
320                 asahi-kasei,out3-single-end;
321                 asahi-kasei,out4-single-end;
322                 asahi-kasei,out5-single-end;
323                 asahi-kasei,out6-single-end;
324         };
325
326         cs2000: clk_multiplier@4f {
327                 #clock-cells = <0>;
328                 compatible = "cirrus,cs2000-cp";
329                 reg = <0x4f>;
330                 clocks = <&audio_clkout>, <&x12_clk>;
331                 clock-names = "clk_in", "ref_clk";
332
333                 assigned-clocks = <&cs2000>;
334                 assigned-clock-rates = <24576000>; /* 1/1 divide */
335         };
336 };
337
338 &i2c4 {
339         status = "okay";
340
341         csa_vdd: adc@7c {
342                 compatible = "maxim,max9611";
343                 reg = <0x7c>;
344
345                 shunt-resistor-micro-ohms = <5000>;
346         };
347
348         csa_dvfs: adc@7f {
349                 compatible = "maxim,max9611";
350                 reg = <0x7f>;
351
352                 shunt-resistor-micro-ohms = <5000>;
353         };
354 };
355
356 &i2c_dvfs {
357         status = "okay";
358 };
359
360 &ohci0 {
361         dr_mode = "otg";
362         status = "okay";
363 };
364
365 &ohci1 {
366         status = "okay";
367 };
368
369 &pcie_bus_clk {
370         clock-frequency = <100000000>;
371 };
372
373 &pciec0 {
374         status = "okay";
375 };
376
377 &pciec1 {
378         status = "okay";
379 };
380
381 &pfc {
382         pinctrl-0 = <&scif_clk_pins>;
383         pinctrl-names = "default";
384
385         avb_pins: avb {
386                 mux {
387                         groups = "avb_link", "avb_mdc", "avb_mii";
388                         function = "avb";
389                 };
390
391                 pins_mdc {
392                         groups = "avb_mdc";
393                         drive-strength = <24>;
394                 };
395
396                 pins_mii_tx {
397                         pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
398                                "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
399                         drive-strength = <12>;
400                 };
401         };
402
403         du_pins: du {
404                 groups = "du_rgb888", "du_sync", "du_oddf", "du_clk_out_0";
405                 function = "du";
406         };
407
408         i2c2_pins: i2c2 {
409                 groups = "i2c2_a";
410                 function = "i2c2";
411         };
412
413         pwm1_pins: pwm1 {
414                 groups = "pwm1_a";
415                 function = "pwm1";
416         };
417
418         scif1_pins: scif1 {
419                 groups = "scif1_data_a", "scif1_ctrl";
420                 function = "scif1";
421         };
422
423         scif2_pins: scif2 {
424                 groups = "scif2_data_a";
425                 function = "scif2";
426         };
427
428         scif_clk_pins: scif_clk {
429                 groups = "scif_clk_a";
430                 function = "scif_clk";
431         };
432
433         sdhi0_pins: sd0 {
434                 groups = "sdhi0_data4", "sdhi0_ctrl";
435                 function = "sdhi0";
436                 power-source = <3300>;
437         };
438
439         sdhi0_pins_uhs: sd0_uhs {
440                 groups = "sdhi0_data4", "sdhi0_ctrl";
441                 function = "sdhi0";
442                 power-source = <1800>;
443         };
444
445         sdhi2_pins: sd2 {
446                 groups = "sdhi2_data8", "sdhi2_ctrl";
447                 function = "sdhi2";
448                 power-source = <3300>;
449         };
450
451         sdhi2_pins_uhs: sd2_uhs {
452                 groups = "sdhi2_data8", "sdhi2_ctrl";
453                 function = "sdhi2";
454                 power-source = <1800>;
455         };
456
457         sdhi3_pins: sd3 {
458                 groups = "sdhi3_data4", "sdhi3_ctrl";
459                 function = "sdhi3";
460                 power-source = <3300>;
461         };
462
463         sdhi3_pins_uhs: sd3_uhs {
464                 groups = "sdhi3_data4", "sdhi3_ctrl";
465                 function = "sdhi3";
466                 power-source = <1800>;
467         };
468
469         sound_pins: sound {
470                 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
471                 function = "ssi";
472         };
473
474         sound_clk_pins: sound_clk {
475                 groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
476                          "audio_clkout_a", "audio_clkout3_a";
477                 function = "audio_clk";
478         };
479
480         usb0_pins: usb0 {
481                 groups = "usb0";
482                 function = "usb0";
483         };
484
485         usb1_pins: usb1 {
486                 mux {
487                         groups = "usb1";
488                         function = "usb1";
489                 };
490
491                 ovc {
492                         pins = "GP_6_27";
493                         bias-pull-up;
494                 };
495
496                 pwen {
497                         pins = "GP_6_26";
498                         bias-pull-down;
499                 };
500         };
501
502         usb30_pins: usb30 {
503                 groups = "usb30";
504                 function = "usb30";
505         };
506 };
507
508 &pwm1 {
509         pinctrl-0 = <&pwm1_pins>;
510         pinctrl-names = "default";
511
512         status = "okay";
513 };
514
515 &rcar_sound {
516         pinctrl-0 = <&sound_pins &sound_clk_pins>;
517         pinctrl-names = "default";
518
519         /* Single DAI */
520         #sound-dai-cells = <0>;
521
522         /* audio_clkout0/1/2/3 */
523         #clock-cells = <1>;
524         clock-frequency = <12288000 11289600>;
525
526         status = "okay";
527
528         /* update <audio_clk_b> to <cs2000> */
529         clocks = <&cpg CPG_MOD 1005>,
530                  <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
531                  <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
532                  <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
533                  <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
534                  <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
535                  <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
536                  <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
537                  <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
538                  <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
539                  <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
540                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
541                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
542                  <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
543                  <&audio_clk_a>, <&cs2000>,
544                  <&audio_clk_c>,
545                  <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
546
547         rcar_sound,dai {
548                 dai0 {
549                         playback = <&ssi0 &src0 &dvc0>;
550                         capture  = <&ssi1 &src1 &dvc1>;
551                 };
552         };
553 };
554
555 &scif1 {
556         pinctrl-0 = <&scif1_pins>;
557         pinctrl-names = "default";
558
559         uart-has-rtscts;
560         status = "okay";
561 };
562
563 &scif2 {
564         pinctrl-0 = <&scif2_pins>;
565         pinctrl-names = "default";
566
567         status = "okay";
568 };
569
570 &scif_clk {
571         clock-frequency = <14745600>;
572 };
573
574 &sdhi0 {
575         pinctrl-0 = <&sdhi0_pins>;
576         pinctrl-1 = <&sdhi0_pins_uhs>;
577         pinctrl-names = "default", "state_uhs";
578
579         vmmc-supply = <&vcc_sdhi0>;
580         vqmmc-supply = <&vccq_sdhi0>;
581         cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
582         wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
583         bus-width = <4>;
584         sd-uhs-sdr50;
585         status = "okay";
586 };
587
588 &sdhi2 {
589         /* used for on-board 8bit eMMC */
590         pinctrl-0 = <&sdhi2_pins>;
591         pinctrl-1 = <&sdhi2_pins_uhs>;
592         pinctrl-names = "default", "state_uhs";
593
594         vmmc-supply = <&reg_3p3v>;
595         vqmmc-supply = <&reg_1p8v>;
596         bus-width = <8>;
597         mmc-hs200-1_8v;
598         non-removable;
599         status = "okay";
600 };
601
602 &sdhi3 {
603         pinctrl-0 = <&sdhi3_pins>;
604         pinctrl-1 = <&sdhi3_pins_uhs>;
605         pinctrl-names = "default", "state_uhs";
606
607         vmmc-supply = <&vcc_sdhi3>;
608         vqmmc-supply = <&vccq_sdhi3>;
609         cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
610         wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
611         bus-width = <4>;
612         sd-uhs-sdr50;
613         status = "okay";
614 };
615
616 &ssi1 {
617         shared-pin;
618 };
619
620 &usb2_phy0 {
621         pinctrl-0 = <&usb0_pins>;
622         pinctrl-names = "default";
623
624         vbus-supply = <&vbus0_usb2>;
625         status = "okay";
626 };
627
628 &usb2_phy1 {
629         pinctrl-0 = <&usb1_pins>;
630         pinctrl-names = "default";
631
632         status = "okay";
633 };
634
635 &wdt0 {
636         timeout-sec = <60>;
637         status = "okay";
638 };
639
640 &xhci0 {
641         pinctrl-0 = <&usb30_pins>;
642         pinctrl-names = "default";
643
644         status = "okay";
645 };