Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[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                  <&versaclock6 1>,
44                  <&x21_clk>,
45                  <&x22_clk>,
46                  <&versaclock6 2>;
47         clock-names = "du.0", "du.1", "du.2", "du.3",
48                       "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
49 };
50
51 &ehci2 {
52         status = "okay";
53 };
54
55 &ehci3 {
56         dr_mode = "otg";
57         status = "okay";
58 };
59
60 &hdmi0 {
61         status = "okay";
62
63         ports {
64                 port@1 {
65                         reg = <1>;
66                         rcar_dw_hdmi0_out: endpoint {
67                                 remote-endpoint = <&hdmi0_con>;
68                         };
69                 };
70                 port@2 {
71                         reg = <2>;
72                         dw_hdmi0_snd_in: endpoint {
73                                 remote-endpoint = <&rsnd_endpoint1>;
74                         };
75                 };
76         };
77 };
78
79 &hdmi0_con {
80         remote-endpoint = <&rcar_dw_hdmi0_out>;
81 };
82
83 &hdmi1 {
84         status = "okay";
85
86         ports {
87                 port@1 {
88                         reg = <1>;
89                         rcar_dw_hdmi1_out: endpoint {
90                                 remote-endpoint = <&hdmi1_con>;
91                         };
92                 };
93                 port@2 {
94                         reg = <2>;
95                         dw_hdmi1_snd_in: endpoint {
96                                 remote-endpoint = <&rsnd_endpoint2>;
97                         };
98                 };
99         };
100 };
101
102 &hdmi1_con {
103         remote-endpoint = <&rcar_dw_hdmi1_out>;
104 };
105
106 &hsusb3 {
107         dr_mode = "otg";
108         status = "okay";
109 };
110
111 &ohci2 {
112         status = "okay";
113 };
114
115 &ohci3 {
116         dr_mode = "otg";
117         status = "okay";
118 };
119
120 &pca9654 {
121         pcie_sata_switch {
122                 gpio-hog;
123                 gpios = <7 GPIO_ACTIVE_HIGH>;
124                 output-low; /* enable SATA by default */
125                 line-name = "PCIE/SATA switch";
126         };
127 };
128
129 &pfc {
130         usb2_pins: usb2 {
131                 groups = "usb2";
132                 function = "usb2";
133         };
134
135         /*
136          * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins
137          *   (when SW31 is the default setting on Salvator-XS).
138          * - If SW31 is the default setting, you cannot use USB2.0 ch3 on
139          *   r8a7795 with Salvator-XS.
140          *   Hence the SW31 setting must be changed like 2) below.
141          *   1) Default setting of SW31: ON-ON-OFF-OFF-OFF-OFF:
142          *      - Connect GP6_3[01] to ADV7842.
143          *   2) Changed setting of SW31: OFF-OFF-ON-ON-ON-ON:
144          *      - Connect GP6_3[01] to BD082065 (USB2.0 ch3's host power).
145          *      - Connect GP6_{04,21} to ADV7842.
146          */
147         usb2_ch3_pins: usb2_ch3 {
148                 groups = "usb2_ch3";
149                 function = "usb2_ch3";
150         };
151 };
152
153 &rcar_sound {
154         ports {
155                 /* rsnd_port0 is on salvator-common */
156                 rsnd_port1: port@1 {
157                         reg = <1>;
158                         rsnd_endpoint1: endpoint {
159                                 remote-endpoint = <&dw_hdmi0_snd_in>;
160
161                                 dai-format = "i2s";
162                                 bitclock-master = <&rsnd_endpoint1>;
163                                 frame-master = <&rsnd_endpoint1>;
164
165                                 playback = <&ssi2>;
166                         };
167                 };
168                 rsnd_port2: port@2 {
169                         reg = <2>;
170                         rsnd_endpoint2: endpoint {
171                                 remote-endpoint = <&dw_hdmi1_snd_in>;
172
173                                 dai-format = "i2s";
174                                 bitclock-master = <&rsnd_endpoint2>;
175                                 frame-master = <&rsnd_endpoint2>;
176
177                                 playback = <&ssi3>;
178                         };
179                 };
180         };
181 };
182
183 /* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */
184 &sata {
185         status = "okay";
186 };
187
188 &sound_card {
189         dais = <&rsnd_port0     /* ak4613 */
190                 &rsnd_port1     /* HDMI0  */
191                 &rsnd_port2>;   /* HDMI1  */
192 };
193
194 &usb2_phy2 {
195         pinctrl-0 = <&usb2_pins>;
196         pinctrl-names = "default";
197
198         status = "okay";
199 };
200
201 &usb2_phy3 {
202         pinctrl-0 = <&usb2_ch3_pins>;
203         pinctrl-names = "default";
204
205         status = "okay";
206 };