GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm64 / boot / dts / renesas / ulcb-kf.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Device Tree Source for the Kingfisher (ULCB extension) board
4  *
5  * Copyright (C) 2017 Renesas Electronics Corp.
6  * Copyright (C) 2017 Cogent Embedded, Inc.
7  */
8
9 /*
10  * SSI-PCM3168A
11  *      aplay   -D plughw:0,2 xxx.wav
12  *      arecord -D plughw:0,3 xxx.wav
13  */
14
15 / {
16         aliases {
17                 serial1 = &hscif0;
18                 serial2 = &scif1;
19                 mmc2 = &sdhi3;
20         };
21
22         clksndsel: clksndsel {
23                 #clock-cells = <0>;
24                 compatible = "gpio-mux-clock";
25                 clocks = <&cs2000>, <&audio_clk_a>; /* clk8snd, clksnd */
26                 select-gpios = <&gpio_exp_75 13 GPIO_ACTIVE_HIGH>;
27         };
28
29         hdmi1-out {
30                 compatible = "hdmi-connector";
31                 type = "a";
32
33                 port {
34                         hdmi1_con: endpoint {
35                                 remote-endpoint = <&adv7513_out>;
36                         };
37                 };
38         };
39
40         accel_3v3: regulator-acc-3v3 {
41                 compatible = "regulator-fixed";
42                 regulator-name = "accel-3v3";
43                 regulator-min-microvolt = <3300000>;
44                 regulator-max-microvolt = <3300000>;
45         };
46
47         hdmi_1v8: regulator-hdmi-1v8 {
48                 compatible = "regulator-fixed";
49                 regulator-name = "hdmi-1v8";
50                 regulator-min-microvolt = <1800000>;
51                 regulator-max-microvolt = <1800000>;
52         };
53
54         hdmi_3v3: regulator-hdmi-3v3 {
55                 compatible = "regulator-fixed";
56                 regulator-name = "hdmi-3v3";
57                 regulator-min-microvolt = <3300000>;
58                 regulator-max-microvolt = <3300000>;
59         };
60
61         snd_3p3v: regulator-snd_3p3v {
62                 compatible = "regulator-fixed";
63                 regulator-name = "snd-3.3v";
64                 regulator-min-microvolt = <3300000>;
65                 regulator-max-microvolt = <3300000>;
66         };
67
68         snd_vcc5v: regulator-snd_vcc5v {
69                 compatible = "regulator-fixed";
70                 regulator-name = "snd-vcc5v";
71                 regulator-min-microvolt = <5000000>;
72                 regulator-max-microvolt = <5000000>;
73         };
74
75         wlan_en: regulator-wlan_en {
76                 compatible = "regulator-fixed";
77                 regulator-name = "wlan-en-regulator";
78
79                 regulator-min-microvolt = <3300000>;
80                 regulator-max-microvolt = <3300000>;
81
82                 gpio = <&gpio_exp_74 4 GPIO_ACTIVE_HIGH>;
83                 startup-delay-us = <70000>;
84                 enable-active-high;
85         };
86 };
87
88 &can0 {
89         pinctrl-0 = <&can0_pins>;
90         pinctrl-names = "default";
91         status = "okay";
92 };
93
94 &can1 {
95         pinctrl-0 = <&can1_pins>;
96         pinctrl-names = "default";
97         status = "okay";
98 };
99
100 &du {
101         ports {
102                 port@0 {
103                         du_out_rgb: endpoint {
104                                 remote-endpoint = <&adv7513_in>;
105                         };
106                 };
107         };
108 };
109
110 &ehci0 {
111         dr_mode = "otg";
112         status = "okay";
113 };
114
115 &hscif0 {
116         pinctrl-0 = <&hscif0_pins>;
117         pinctrl-names = "default";
118         uart-has-rtscts;
119
120         status = "okay";
121 };
122
123 &hsusb {
124         dr_mode = "otg";
125         status = "okay";
126 };
127
128 &i2c2 {
129         i2cswitch2: i2c-switch@71 {
130                 compatible = "nxp,pca9548";
131                 #address-cells = <1>;
132                 #size-cells = <0>;
133                 reg = <0x71>;
134                 reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
135
136                 /* HDMIoSDA, HDMIoSCL */
137                 i2c@4 {
138                         #address-cells = <1>;
139                         #size-cells = <0>;
140                         reg = <4>;
141
142                         hdmi@3d {
143                                 compatible = "adi,adv7513";
144                                 reg = <0x3d>;
145
146                                 pinctrl-0 = <&hdmi1_pins>;
147                                 pinctrl-names = "default";
148
149                                 interrupt-parent = <&gpio2>;
150                                 interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
151
152                                 clocks = <&cs2000>;
153                                 clock-names = "cec";
154
155                                 pd-gpios = <&gpio_exp_75 5 GPIO_ACTIVE_LOW>;
156
157                                 avdd-supply = <&hdmi_1v8>;
158                                 dvdd-supply = <&hdmi_1v8>;
159                                 pvdd-supply = <&hdmi_1v8>;
160                                 dvdd-3v-supply = <&hdmi_3v3>;
161                                 bgvdd-supply = <&hdmi_1v8>;
162
163                                 adi,input-depth = <8>;
164                                 adi,input-colorspace = "rgb";
165                                 adi,input-clock = "1x";
166
167                                 ports {
168                                         #address-cells = <1>;
169                                         #size-cells = <0>;
170
171                                         port@0 {
172                                                 reg = <0>;
173                                                 adv7513_in: endpoint {
174                                                         remote-endpoint = <&du_out_rgb>;
175                                                 };
176                                         };
177
178                                         port@1 {
179                                                 reg = <1>;
180                                                 adv7513_out: endpoint {
181                                                         remote-endpoint = <&hdmi1_con>;
182                                                 };
183                                         };
184                                 };
185                         };
186                 };
187
188                 /* Audio_SDA, Audio_SCL */
189                 i2c@7 {
190                         #address-cells = <1>;
191                         #size-cells = <0>;
192                         reg = <7>;
193
194                         accelerometer@1d {
195                                 compatible = "st,lsm9ds0-imu";
196                                 reg = <0x1d>;
197
198                                 vdd-supply = <&accel_3v3>;
199                                 vddio-supply = <&accel_3v3>;
200                         };
201
202                         pcm3168a: audio-codec@44 {
203                                 #sound-dai-cells = <0>;
204                                 compatible = "ti,pcm3168a";
205                                 reg = <0x44>;
206                                 clocks = <&clksndsel>;
207                                 clock-names = "scki";
208
209                                 VDD1-supply = <&snd_3p3v>;
210                                 VDD2-supply = <&snd_3p3v>;
211                                 VCCAD1-supply = <&snd_vcc5v>;
212                                 VCCAD2-supply = <&snd_vcc5v>;
213                                 VCCDA1-supply = <&snd_vcc5v>;
214                                 VCCDA2-supply = <&snd_vcc5v>;
215
216                                 ports {
217                                         #address-cells = <1>;
218                                         #size-cells = <0>;
219                                         mclk-fs = <512>;
220                                         port@0 {
221                                                 reg = <0>;
222                                                 pcm3168a_endpoint_p: endpoint {
223                                                         remote-endpoint = <&rsnd_for_pcm3168a_play>;
224                                                         clocks = <&clksndsel>;
225                                                 };
226                                         };
227                                         port@1 {
228                                                 reg = <1>;
229                                                 pcm3168a_endpoint_c: endpoint {
230                                                         remote-endpoint = <&rsnd_for_pcm3168a_capture>;
231                                                         clocks = <&clksndsel>;
232                                                 };
233                                         };
234                                 };
235                         };
236
237                         gyroscope@6b {
238                                 compatible = "st,lsm9ds0-gyro";
239                                 reg = <0x6b>;
240
241                                 vdd-supply = <&accel_3v3>;
242                                 vddio-supply = <&accel_3v3>;
243                         };
244                 };
245         };
246
247         /* U11 */
248         gpio_exp_74: gpio@74 {
249                 compatible = "ti,tca9539";
250                 reg = <0x74>;
251                 gpio-controller;
252                 #gpio-cells = <2>;
253                 interrupt-controller;
254                 #interrupt-cells = <2>;
255                 interrupt-parent = <&gpio6>;
256                 interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
257
258                 audio-out-off-hog {
259                         gpio-hog;
260                         gpios = <0 GPIO_ACTIVE_HIGH>; /* P00 */
261                         output-high;
262                         line-name = "Audio_Out_OFF";
263                 };
264
265                 hub-pwen-hog {
266                         gpio-hog;
267                         gpios = <6 GPIO_ACTIVE_HIGH>;
268                         output-high;
269                         line-name = "HUB pwen";
270                 };
271
272                 hub-rst-hog {
273                         gpio-hog;
274                         gpios = <7 GPIO_ACTIVE_HIGH>;
275                         output-high;
276                         line-name = "HUB rst";
277                 };
278
279                 otg-extlpn-hog {
280                         gpio-hog;
281                         gpios = <9 GPIO_ACTIVE_HIGH>;
282                         output-high;
283                         line-name = "OTG EXTLPn";
284                 };
285
286                 otg-offvbusn-hog {
287                         gpio-hog;
288                         gpios = <8 GPIO_ACTIVE_HIGH>;
289                         output-low;
290                         line-name = "OTG OFFVBUSn";
291                 };
292
293                 sd-wifi-mux-hog {
294                         gpio-hog;
295                         gpios = <5 GPIO_ACTIVE_HIGH>;
296                         output-low;     /* Connect WL1837 */
297                         line-name = "SD WiFi mux";
298                 };
299
300                 snd-rst-hog {
301                         gpio-hog;
302                         gpios = <15 GPIO_ACTIVE_HIGH>; /* P17 */
303                         output-high;
304                         line-name = "SND_RST";
305                 };
306         };
307
308         /* U5 */
309         gpio_exp_75: gpio@75 {
310                 compatible = "ti,tca9539";
311                 reg = <0x75>;
312                 gpio-controller;
313                 #gpio-cells = <2>;
314                 interrupt-controller;
315                 #interrupt-cells = <2>;
316                 interrupt-parent = <&gpio6>;
317                 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
318         };
319 };
320
321 &i2c4 {
322         i2cswitch4: i2c-switch@71 {
323                 compatible = "nxp,pca9548";
324                 #address-cells = <1>;
325                 #size-cells = <0>;
326                 reg = <0x71>;
327                 reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
328         };
329
330         gpio_exp_76: gpio@76 {
331                 compatible = "ti,tca9539";
332                 reg = <0x76>;
333                 gpio-controller;
334                 #gpio-cells = <2>;
335                 interrupt-controller;
336                 #interrupt-cells = <2>;
337                 interrupt-parent = <&gpio7>;
338                 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
339         };
340
341         gpio_exp_77: gpio@77 {
342                 compatible = "ti,tca9539";
343                 reg = <0x77>;
344                 gpio-controller;
345                 #gpio-cells = <2>;
346                 interrupt-controller;
347                 #interrupt-cells = <2>;
348                 interrupt-parent = <&gpio5>;
349                 interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
350         };
351 };
352
353 &ohci0 {
354         dr_mode = "otg";
355         status = "okay";
356 };
357
358 &pcie_bus_clk {
359         clock-frequency = <100000000>;
360 };
361
362 &pciec0 {
363         status = "okay";
364 };
365
366 &pciec1 {
367         status = "okay";
368 };
369
370 &pfc {
371         can0_pins: can0 {
372                 groups = "can0_data_a";
373                 function = "can0";
374         };
375
376         can1_pins: can1 {
377                 groups = "can1_data";
378                 function = "can1";
379         };
380
381         hdmi1_pins: hdmi1 {
382                 adv7513-interrupt {
383                         pins = "GP_2_14";
384                         bias-pull-up;
385                 };
386
387                 du {
388                         groups = "du_rgb888", "du_sync", "du_clk_out_0",
389                                  "du_disp";
390                         function = "du";
391                 };
392         };
393
394         hscif0_pins: hscif0 {
395                 groups = "hscif0_data", "hscif0_ctrl";
396                 function = "hscif0";
397         };
398
399         scif1_pins: scif1 {
400                 groups = "scif1_data_b";
401                 function = "scif1";
402         };
403
404         sdhi3_pins: sdhi3 {
405                 groups = "sdhi3_data4", "sdhi3_ctrl";
406                 function = "sdhi3";
407                 power-source = <3300>;
408         };
409
410         sound_pcm_pins: sound-pcm {
411                 groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
412                 function = "ssi";
413         };
414
415         usb0_pins: usb0 {
416                 groups = "usb0";
417                 function = "usb0";
418         };
419 };
420
421 &rcar_sound {
422         pinctrl-0 = <&sound_pins
423                      &sound_clk_pins
424                      &sound_pcm_pins>;
425
426         ports {
427                 /* rsnd_port0/1 are defined in ulcb.dtsi */
428                 rsnd_port2: port@2 {
429                         reg = <2>;
430                         rsnd_for_pcm3168a_play: endpoint {
431                                 remote-endpoint = <&pcm3168a_endpoint_p>;
432                                 bitclock-master;
433                                 frame-master;
434                                 dai-tdm-slot-num = <8>;
435                                 playback = <&ssi3>;
436                         };
437                 };
438                 rsnd_port3: port@3 {
439                         reg = <3>;
440                         rsnd_for_pcm3168a_capture: endpoint {
441                                 remote-endpoint = <&pcm3168a_endpoint_c>;
442                                 bitclock-master;
443                                 frame-master;
444                                 dai-tdm-slot-num = <6>;
445                                 capture = <&ssi4>;
446                         };
447                 };
448         };
449 };
450
451 &scif1 {
452         pinctrl-0 = <&scif1_pins>;
453         pinctrl-names = "default";
454
455         status = "okay";
456 };
457
458 &sdhi3 {
459         pinctrl-0 = <&sdhi3_pins>;
460         pinctrl-names = "default";
461
462         vmmc-supply = <&wlan_en>;
463         vqmmc-supply = <&wlan_en>;
464         bus-width = <4>;
465         no-1-8-v;
466         non-removable;
467         cap-power-off-card;
468         keep-power-in-suspend;
469         max-frequency = <26000000>;
470         status = "okay";
471
472         #address-cells = <1>;
473         #size-cells = <0>;
474         wlcore: wlcore@2 {
475                 compatible = "ti,wl1837";
476                 reg = <2>;
477                 interrupt-parent = <&gpio1>;
478                 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
479         };
480 };
481
482 &sound_card {
483         links = <&rsnd_port0    /* ak4613 */
484                  &rsnd_port1    /* HDMI0  */
485                  &rsnd_port2    /* pcm3168a playback */
486                  &rsnd_port3    /* pcm3168a capture  */
487                 >;
488 };
489
490 &ssi4 {
491         shared-pin;
492 };
493
494 &usb2_phy0 {
495         pinctrl-0 = <&usb0_pins>;
496         pinctrl-names = "default";
497
498         status = "okay";
499 };
500
501 &xhci0 {
502         status = "okay";
503 };