GNU Linux-libre 5.4.274-gnu1
[releases.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_port>;
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_endpoint>;
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         rsnd_port: port {
331                 rsnd_endpoint: endpoint {
332                         remote-endpoint = <&dw_hdmi0_snd_in>;
333
334                         dai-format = "i2s";
335                         bitclock-master = <&rsnd_endpoint>;
336                         frame-master = <&rsnd_endpoint>;
337
338                         playback = <&ssi2>;
339                 };
340         };
341 };
342
343 &rwdt {
344         timeout-sec = <60>;
345         status = "okay";
346 };
347
348 &scif2 {
349         pinctrl-0 = <&scif2_pins>;
350         pinctrl-names = "default";
351
352         status = "okay";
353 };
354
355 &scif_clk {
356         clock-frequency = <14745600>;
357 };
358
359 &sdhi0 {
360         pinctrl-0 = <&sdhi0_pins>;
361         pinctrl-1 = <&sdhi0_pins_uhs>;
362         pinctrl-names = "default", "state_uhs";
363
364         vmmc-supply = <&reg_3p3v>;
365         vqmmc-supply = <&vccq_sdhi0>;
366         cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
367         bus-width = <4>;
368         sd-uhs-sdr50;
369         sd-uhs-sdr104;
370         status = "okay";
371 };
372
373 &sdhi2 {
374         status = "okay";
375         pinctrl-0 = <&sdhi2_pins>;
376         pinctrl-names = "default";
377
378         vmmc-supply = <&wlan_en_reg>;
379         bus-width = <4>;
380         non-removable;
381         cap-power-off-card;
382         keep-power-in-suspend;
383
384         #address-cells = <1>;
385         #size-cells = <0>;
386         wlcore: wlcore@2 {
387                 compatible = "ti,wl1837";
388                 reg = <2>;
389                 interrupt-parent = <&gpio2>;
390                 interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
391         };
392 };
393
394 &sdhi3 {
395         pinctrl-0 = <&sdhi3_pins>;
396         pinctrl-1 = <&sdhi3_pins>;
397         pinctrl-names = "default", "state_uhs";
398
399         vmmc-supply = <&reg_3p3v>;
400         vqmmc-supply = <&reg_1p8v>;
401         bus-width = <8>;
402         mmc-hs200-1_8v;
403         non-removable;
404         fixed-emmc-driver-type = <1>;
405         status = "okay";
406 };
407
408 &usb_extal_clk {
409         clock-frequency = <50000000>;
410 };
411
412 &usb2_phy0 {
413         pinctrl-0 = <&usb0_pins>;
414         pinctrl-names = "default";
415
416         vbus-supply = <&vbus0_usb2>;
417         status = "okay";
418 };
419
420 &usb2_phy1 {
421         pinctrl-0 = <&usb1_pins>;
422         pinctrl-names = "default";
423
424         status = "okay";
425 };
426
427 &usb3_peri0 {
428         phys = <&usb3_phy0>;
429         phy-names = "usb";
430
431         companion = <&xhci0>;
432
433         status = "okay";
434 };
435
436 &usb3_phy0 {
437         status = "okay";
438 };
439
440 &usb3s0_clk {
441         clock-frequency = <100000000>;
442 };
443
444 &xhci0 {
445         pinctrl-0 = <&usb30_pins>;
446         pinctrl-names = "default";
447
448         status = "okay";
449 };