Merge branch 'asoc-4.19' into asoc-4.20 for rt5682 deps.
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / renesas / r8a7795-salvator-xs.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Device Tree Source for the Salvator-X 2nd version board with R-Car H3 ES2.0
4  *
5  * Copyright (C) 2015-2017 Renesas Electronics Corp.
6  */
7
8 /dts-v1/;
9 #include "r8a7795.dtsi"
10 #include "salvator-xs.dtsi"
11
12 / {
13         model = "Renesas Salvator-X 2nd version board based on r8a7795 ES2.0+";
14         compatible = "renesas,salvator-xs", "renesas,r8a7795";
15
16         memory@48000000 {
17                 device_type = "memory";
18                 /* first 128MB is reserved for secure area. */
19                 reg = <0x0 0x48000000 0x0 0x38000000>;
20         };
21
22         memory@500000000 {
23                 device_type = "memory";
24                 reg = <0x5 0x00000000 0x0 0x40000000>;
25         };
26
27         memory@600000000 {
28                 device_type = "memory";
29                 reg = <0x6 0x00000000 0x0 0x40000000>;
30         };
31
32         memory@700000000 {
33                 device_type = "memory";
34                 reg = <0x7 0x00000000 0x0 0x40000000>;
35         };
36 };
37
38 &du {
39         clocks = <&cpg CPG_MOD 724>,
40                  <&cpg CPG_MOD 723>,
41                  <&cpg CPG_MOD 722>,
42                  <&cpg CPG_MOD 721>,
43                  <&cpg CPG_MOD 727>,
44                  <&versaclock6 1>,
45                  <&x21_clk>,
46                  <&x22_clk>,
47                  <&versaclock6 2>;
48         clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0",
49                       "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
50 };
51
52 &ehci2 {
53         status = "okay";
54 };
55
56 &ehci3 {
57         dr_mode = "otg";
58         status = "okay";
59 };
60
61 &hsusb3 {
62         dr_mode = "otg";
63         status = "okay";
64 };
65
66 &sound_card {
67         dais = <&rsnd_port0     /* ak4613 */
68                 &rsnd_port1     /* HDMI0  */
69                 &rsnd_port2>;   /* HDMI1  */
70 };
71
72 &hdmi0 {
73         status = "okay";
74
75         ports {
76                 port@1 {
77                         reg = <1>;
78                         rcar_dw_hdmi0_out: endpoint {
79                                 remote-endpoint = <&hdmi0_con>;
80                         };
81                 };
82                 port@2 {
83                         reg = <2>;
84                         dw_hdmi0_snd_in: endpoint {
85                                 remote-endpoint = <&rsnd_endpoint1>;
86                         };
87                 };
88         };
89 };
90
91 &hdmi0_con {
92         remote-endpoint = <&rcar_dw_hdmi0_out>;
93 };
94
95 &hdmi1 {
96         status = "okay";
97
98         ports {
99                 port@1 {
100                         reg = <1>;
101                         rcar_dw_hdmi1_out: endpoint {
102                                 remote-endpoint = <&hdmi1_con>;
103                         };
104                 };
105                 port@2 {
106                         reg = <2>;
107                         dw_hdmi1_snd_in: endpoint {
108                                 remote-endpoint = <&rsnd_endpoint2>;
109                         };
110                 };
111         };
112 };
113
114 &hdmi1_con {
115         remote-endpoint = <&rcar_dw_hdmi1_out>;
116 };
117
118 &ohci2 {
119         status = "okay";
120 };
121
122 &ohci3 {
123         dr_mode = "otg";
124         status = "okay";
125 };
126
127 &rcar_sound {
128         ports {
129                 /* rsnd_port0 is on salvator-common */
130                 rsnd_port1: port@1 {
131                         rsnd_endpoint1: endpoint {
132                                 remote-endpoint = <&dw_hdmi0_snd_in>;
133
134                                 dai-format = "i2s";
135                                 bitclock-master = <&rsnd_endpoint1>;
136                                 frame-master = <&rsnd_endpoint1>;
137
138                                 playback = <&ssi2>;
139                         };
140                 };
141                 rsnd_port2: port@2 {
142                         rsnd_endpoint2: endpoint {
143                                 remote-endpoint = <&dw_hdmi1_snd_in>;
144
145                                 dai-format = "i2s";
146                                 bitclock-master = <&rsnd_endpoint2>;
147                                 frame-master = <&rsnd_endpoint2>;
148
149                                 playback = <&ssi3>;
150                         };
151                 };
152         };
153 };
154
155 &pfc {
156         usb2_pins: usb2 {
157                 groups = "usb2";
158                 function = "usb2";
159         };
160
161         /*
162          * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins
163          *   (when SW31 is the default setting on Salvator-XS).
164          * - If SW31 is the default setting, you cannot use USB2.0 ch3 on
165          *   r8a7795 with Salvator-XS.
166          *   Hence the SW31 setting must be changed like 2) below.
167          *   1) Default setting of SW31: ON-ON-OFF-OFF-OFF-OFF:
168          *      - Connect GP6_3[01] to ADV7842.
169          *   2) Changed setting of SW31: OFF-OFF-ON-ON-ON-ON:
170          *      - Connect GP6_3[01] to BD082065 (USB2.0 ch3's host power).
171          *      - Connect GP6_{04,21} to ADV7842.
172          */
173         usb2_ch3_pins: usb2_ch3 {
174                 groups = "usb2_ch3";
175                 function = "usb2_ch3";
176         };
177 };
178
179 &usb2_phy2 {
180         pinctrl-0 = <&usb2_pins>;
181         pinctrl-names = "default";
182
183         status = "okay";
184 };
185
186 &usb2_phy3 {
187         pinctrl-0 = <&usb2_ch3_pins>;
188         pinctrl-names = "default";
189
190         status = "okay";
191 };