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