Merge tag 'imx-dt-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / renesas / hihope-common.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Device Tree Source for the HiHope RZ/G2[MN] main board common parts
4  *
5  * Copyright (C) 2019 Renesas Electronics Corp.
6  */
7
8 #include <dt-bindings/gpio/gpio.h>
9
10 / {
11         aliases {
12                 serial0 = &scif2;
13                 serial1 = &hscif0;
14         };
15
16         chosen {
17                 bootargs = "ignore_loglevel";
18                 stdout-path = "serial0:115200n8";
19         };
20
21         hdmi0-out {
22                 compatible = "hdmi-connector";
23                 type = "a";
24
25                 port {
26                         hdmi0_con: endpoint {
27                                 remote-endpoint = <&rcar_dw_hdmi0_out>;
28                         };
29                 };
30         };
31
32         leds {
33                 compatible = "gpio-leds";
34
35                 bt_active_led {
36                         label = "blue:bt";
37                         gpios = <&gpio7  0 GPIO_ACTIVE_HIGH>;
38                         linux,default-trigger = "hci0-power";
39                         default-state = "off";
40                 };
41
42                 led0 {
43                         gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
44                 };
45
46                 led1 {
47                         gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
48                 };
49
50                 led2 {
51                         gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>;
52                 };
53
54                 led3 {
55                         gpios = <&gpio0  0 GPIO_ACTIVE_HIGH>;
56                 };
57
58                 wlan_active_led {
59                         label = "yellow:wlan";
60                         gpios = <&gpio7  1 GPIO_ACTIVE_HIGH>;
61                         linux,default-trigger = "phy0tx";
62                         default-state = "off";
63                 };
64         };
65
66         reg_1p8v: regulator0 {
67                 compatible = "regulator-fixed";
68                 regulator-name = "fixed-1.8V";
69                 regulator-min-microvolt = <1800000>;
70                 regulator-max-microvolt = <1800000>;
71                 regulator-boot-on;
72                 regulator-always-on;
73         };
74
75         reg_3p3v: regulator1 {
76                 compatible = "regulator-fixed";
77                 regulator-name = "fixed-3.3V";
78                 regulator-min-microvolt = <3300000>;
79                 regulator-max-microvolt = <3300000>;
80                 regulator-boot-on;
81                 regulator-always-on;
82         };
83
84         sound_card: sound {
85                 compatible = "audio-graph-card";
86
87                 label = "rcar-sound";
88
89                 dais = <&rsnd_port0>;
90         };
91
92         vbus0_usb2: regulator-vbus0-usb2 {
93                 compatible = "regulator-fixed";
94
95                 regulator-name = "USB20_VBUS0";
96                 regulator-min-microvolt = <5000000>;
97                 regulator-max-microvolt = <5000000>;
98
99                 gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
100                 enable-active-high;
101         };
102
103         vccq_sdhi0: regulator-vccq-sdhi0 {
104                 compatible = "regulator-gpio";
105
106                 regulator-name = "SDHI0 VccQ";
107                 regulator-min-microvolt = <1800000>;
108                 regulator-max-microvolt = <3300000>;
109
110                 gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
111                 gpios-states = <1>;
112                 states = <3300000 1
113                           1800000 0>;
114         };
115
116         wlan_en_reg: regulator-wlan_en {
117                 compatible = "regulator-fixed";
118                 regulator-name = "wlan-en-regulator";
119                 regulator-min-microvolt = <1800000>;
120                 regulator-max-microvolt = <1800000>;
121                 startup-delay-us = <70000>;
122
123                 gpio = <&gpio_expander 1 GPIO_ACTIVE_HIGH>;
124                 enable-active-high;
125         };
126
127         x302_clk: x302-clock {
128                 compatible = "fixed-clock";
129                 #clock-cells = <0>;
130                 clock-frequency = <33000000>;
131         };
132
133         x304_clk: x304-clock {
134                 compatible = "fixed-clock";
135                 #clock-cells = <0>;
136                 clock-frequency = <25000000>;
137         };
138 };
139
140 &audio_clk_a {
141         clock-frequency = <22579200>;
142 };
143
144 &du {
145         clocks = <&cpg CPG_MOD 724>,
146                  <&cpg CPG_MOD 723>,
147                  <&cpg CPG_MOD 722>,
148                  <&versaclock5 1>,
149                  <&x302_clk>,
150                  <&versaclock5 2>;
151         clock-names = "du.0", "du.1", "du.2",
152                       "dclkin.0", "dclkin.1", "dclkin.2";
153         status = "okay";
154 };
155
156 &ehci0 {
157         status = "okay";
158 };
159
160 &ehci1 {
161         status = "okay";
162 };
163
164 &extal_clk {
165         clock-frequency = <16666666>;
166 };
167
168 &extalr_clk {
169         clock-frequency = <32768>;
170 };
171
172 &gpio6 {
173         usb1-reset {
174                 gpio-hog;
175                 gpios = <10 GPIO_ACTIVE_LOW>;
176                 output-low;
177                 line-name = "usb1-reset";
178         };
179 };
180
181 &hdmi0 {
182         status = "okay";
183
184         ports {
185                 port@1 {
186                         reg = <1>;
187                         rcar_dw_hdmi0_out: endpoint {
188                                 remote-endpoint = <&hdmi0_con>;
189                         };
190                 };
191                 port@2 {
192                         reg = <2>;
193                         dw_hdmi0_snd_in: endpoint {
194                                 remote-endpoint = <&rsnd_endpoint0>;
195                         };
196                 };
197         };
198 };
199
200 &hscif0 {
201         pinctrl-0 = <&hscif0_pins>;
202         pinctrl-names = "default";
203
204         uart-has-rtscts;
205         status = "okay";
206
207         bluetooth {
208                 compatible = "ti,wl1837-st";
209                 enable-gpios = <&gpio_expander 2 GPIO_ACTIVE_HIGH>;
210         };
211 };
212
213 &hsusb {
214         dr_mode = "otg";
215         status = "okay";
216 };
217
218 &i2c4 {
219         clock-frequency = <400000>;
220         status = "okay";
221
222         gpio_expander: gpio@20 {
223                 compatible = "onnn,pca9654";
224                 reg = <0x20>;
225                 gpio-controller;
226                 #gpio-cells = <2>;
227         };
228
229         versaclock5: clock-generator@6a {
230                 compatible = "idt,5p49v5923";
231                 reg = <0x6a>;
232                 #clock-cells = <1>;
233                 clocks = <&x304_clk>;
234                 clock-names = "xin";
235         };
236 };
237
238 &ohci0 {
239         status = "okay";
240 };
241
242 &ohci1 {
243         status = "okay";
244 };
245
246 &pcie_bus_clk {
247         clock-frequency = <100000000>;
248 };
249
250 &pfc {
251         pinctrl-0 = <&scif_clk_pins>;
252         pinctrl-names = "default";
253
254         hscif0_pins: hscif0 {
255                 groups = "hscif0_data", "hscif0_ctrl";
256                 function = "hscif0";
257         };
258
259         scif2_pins: scif2 {
260                 groups = "scif2_data_a";
261                 function = "scif2";
262         };
263
264         scif_clk_pins: scif_clk {
265                 groups = "scif_clk_a";
266                 function = "scif_clk";
267         };
268
269         sdhi0_pins: sd0 {
270                 groups = "sdhi0_data4", "sdhi0_ctrl";
271                 function = "sdhi0";
272                 power-source = <3300>;
273         };
274
275         sdhi0_pins_uhs: sd0_uhs {
276                 groups = "sdhi0_data4", "sdhi0_ctrl";
277                 function = "sdhi0";
278                 power-source = <1800>;
279         };
280
281         sdhi2_pins: sd2 {
282                 groups = "sdhi2_data4", "sdhi2_ctrl";
283                 function = "sdhi2";
284                 power-source = <1800>;
285         };
286
287         sdhi3_pins: sd3 {
288                 groups = "sdhi3_data8", "sdhi3_ctrl", "sdhi3_ds";
289                 function = "sdhi3";
290                 power-source = <1800>;
291         };
292
293         sound_clk_pins: sound_clk {
294                 groups = "audio_clk_a_a";
295                 function = "audio_clk";
296         };
297
298         usb0_pins: usb0 {
299                 groups = "usb0";
300                 function = "usb0";
301         };
302
303         usb1_pins: usb1 {
304                 mux {
305                         groups = "usb1";
306                         function = "usb1";
307                 };
308
309                 ovc {
310                         pins = "GP_6_27";
311                         bias-pull-up;
312                 };
313         };
314
315         usb30_pins: usb30 {
316                 groups = "usb30";
317                 function = "usb30";
318         };
319 };
320
321 &rcar_sound {
322         pinctrl-0 = <&sound_clk_pins>;
323         pinctrl-names = "default";
324
325         status = "okay";
326
327         /* Single DAI */
328         #sound-dai-cells = <0>;
329
330         ports {
331                 rsnd_port0: port@0 {
332                         rsnd_endpoint0: endpoint {
333                                 remote-endpoint = <&dw_hdmi0_snd_in>;
334
335                                 dai-format = "i2s";
336                                 bitclock-master = <&rsnd_endpoint0>;
337                                 frame-master = <&rsnd_endpoint0>;
338
339                                 playback = <&ssi2>;
340                         };
341                 };
342         };
343 };
344
345 &rwdt {
346         timeout-sec = <60>;
347         status = "okay";
348 };
349
350 &scif2 {
351         pinctrl-0 = <&scif2_pins>;
352         pinctrl-names = "default";
353
354         status = "okay";
355 };
356
357 &scif_clk {
358         clock-frequency = <14745600>;
359 };
360
361 &sdhi0 {
362         pinctrl-0 = <&sdhi0_pins>;
363         pinctrl-1 = <&sdhi0_pins_uhs>;
364         pinctrl-names = "default", "state_uhs";
365
366         vmmc-supply = <&reg_3p3v>;
367         vqmmc-supply = <&vccq_sdhi0>;
368         cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
369         bus-width = <4>;
370         sd-uhs-sdr50;
371         sd-uhs-sdr104;
372         status = "okay";
373 };
374
375 &sdhi2 {
376         status = "okay";
377         pinctrl-0 = <&sdhi2_pins>;
378         pinctrl-names = "default";
379
380         vmmc-supply = <&wlan_en_reg>;
381         bus-width = <4>;
382         non-removable;
383         cap-power-off-card;
384         keep-power-in-suspend;
385
386         #address-cells = <1>;
387         #size-cells = <0>;
388         wlcore: wlcore@2 {
389                 compatible = "ti,wl1837";
390                 reg = <2>;
391                 interrupt-parent = <&gpio2>;
392                 interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
393         };
394 };
395
396 &sdhi3 {
397         pinctrl-0 = <&sdhi3_pins>;
398         pinctrl-1 = <&sdhi3_pins>;
399         pinctrl-names = "default", "state_uhs";
400
401         vmmc-supply = <&reg_3p3v>;
402         vqmmc-supply = <&reg_1p8v>;
403         bus-width = <8>;
404         mmc-hs200-1_8v;
405         non-removable;
406         fixed-emmc-driver-type = <1>;
407 };
408
409 &usb_extal_clk {
410         clock-frequency = <50000000>;
411 };
412
413 &usb2_phy0 {
414         pinctrl-0 = <&usb0_pins>;
415         pinctrl-names = "default";
416
417         vbus-supply = <&vbus0_usb2>;
418         status = "okay";
419 };
420
421 &usb2_phy1 {
422         pinctrl-0 = <&usb1_pins>;
423         pinctrl-names = "default";
424
425         status = "okay";
426 };
427
428 &usb3_peri0 {
429         phys = <&usb3_phy0>;
430         phy-names = "usb";
431
432         companion = <&xhci0>;
433
434         status = "okay";
435 };
436
437 &usb3_phy0 {
438         status = "okay";
439 };
440
441 &usb3s0_clk {
442         clock-frequency = <100000000>;
443 };
444
445 &xhci0 {
446         pinctrl-0 = <&usb30_pins>;
447         pinctrl-names = "default";
448
449         status = "okay";
450 };